postgresql - 在Debian上没有加密功能

问题描述 投票:0回答:1

我在Debian Stretch上安装了PostgreSQL 9.6(9)。当我想使用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

postgresql debian postgresql-9.6 crypt debian-stretch
1个回答
1
投票

您必须使用SQL启用它:

CREATE EXTENSION pgcrypto;

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

© www.soinside.com 2019 - 2024. All rights reserved.