postgresql – Debian Stretch没有加密功能

时间:2019-03-23 14:10:39

标签: postgresql debian postgresql-9.6 crypt debian-stretch

我在Debian Stretch(9)上安装了PostgreSQL 9.6。当我想使用crypt()gen_salt()函数时,它说:

ERROR:  function gen_salt(unknown, integer) does not exist
LINE 1: select gen_salt('bf', 8)
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

如何使这些功能正常工作?


Installed postgresql packages

1 个答案:

答案 0 :(得分:1)

您必须使用SQL启用它:

g++ -c refreturn.cc -g -std=c++1z; g++ -o refreturn refreturn.o
refreturn.cc: In member function ‘int& Value::bar()’:
refreturn.cc:12:13: warning: reference to local variable ‘tc’ returned [-Wreturn-local-addr]
         int tc = 10;
             ^

Compilation finished at Sat Mar 23 07:29:31

您必须在使用pgcrypto functions的每个数据库上执行此操作。