jiw*_*ene 0 postgresql debian crypt postgresql-9.6 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.
Run Code Online (Sandbox Code Playgroud)
我怎样才能让这些功能正常工作?
您必须使用 SQL 启用它:
CREATE EXTENSION pgcrypto;
Run Code Online (Sandbox Code Playgroud)
您必须在每个使用pgcrypto 函数的数据库上执行此操作。
| 归档时间: |
|
| 查看次数: |
1044 次 |
| 最近记录: |