Questions tagged «pgcrypto»

3
如何在PostgreSQL 8.4中安装pgcrypto?
我正在使用Ubuntu Server 10.10,并且已使用安装了PostgreSQL 8.4 apt-get install postgresql。我想使用内置sha1()功能,但似乎必须先安装pgcrypto。但是我不知道如何安装。 没有pgcrypto,如果我尝试使用安装它apt-get install pgcrypto,我不找到以任何文件pgcrypto在我的系统(我想find / -name "pgcrypto*")。 如何安装pgcrypto,以便可以digest('word-to-hash','sha1')在数据库查询中使用该功能? 更新:我正在努力在另一台Ubuntu计算机上安装pgcrypto。使用sudo apt-get install postgresql-contrib-8.4如何安装软件包后,如何将其安装到当前的PostgreSQL数据库中?

1
psql 9.5:gen_random_uuid()不起作用
SELECT gen_random_uuid() 产生输出 ERROR: function gen_random_uuid() does not exist SQL state: 42883 Hint: No function matches the given name and argument types. You might need to add explicit type casts. 我CREATE EXTENSION pgcrypto;在选定的数据库上运行并且SELECT gen_random_bytes(1)运行完美(gen_random_bytes不适用于pgcrypto未手动创建扩展名的其他数据库)。 % psql --version psql (PostgreSQL) 9.5.3 Ubuntu版本是16.04。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.