gpt4 book ai didi

postgresql - 即使启用了 pgcrypto 扩展,AWS RDS Postgres 加密函数也不起作用

转载 作者:行者123 更新时间:2023-11-29 13:09:55 26 4
gpt4 key购买 nike

我有全新的 AWS RDS Postgres (v 11) 实例。我已经安装了 pgcrypto 扩展,但它不允许再次这样做:

CREATE EXTENSION pgcrypto;
Error in query (7): ERROR: extension "pgcrypto" already exists

但是我不能使用扩展功能:

select gen_salt('bf');
Error in query (7): ERROR: function gen_salt(unknown) does not exist
LINE 1: select gen_salt('bf')
HINT: No function matches the given name and argument types. You might need to add explicit type casts.

我做错了什么?

最佳答案

问题是扩展可能是在模式处于事件状态时添加的。感谢@Antti Haapala 提供同一问题的链接:https://dba.stackexchange.com/questions/135093/in-rds-digest-function-is-undefined-after-creating-pgcrypto-extension .

我在没有选择架构时做了以下操作:

DROP EXTENSION pgcrypto;
Query executed OK, 0 rows affected. (0.031 s)

CREATE EXTENSION pgcrypto;
Query executed OK, 0 rows affected. (0.046 s)

SELECT gen_salt('bf');
gen_salt
$2a$06$kyj11fcRtpwxrqgCfZEIaO

现在一切正常。

关于postgresql - 即使启用了 pgcrypto 扩展,AWS RDS Postgres 加密函数也不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56311405/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com