在PostgreSQL中加密数据 [英] Encrypt the datas in postgresql
问题描述
我是PostgreSQL的初学者。现在,我正在使用Windows Server 2008 OS中安装的PostgreSQL 9.3版本。我打算加密用户表中的数据。我已经浏览了大多数与之相关的网站,但是我并不清楚,加密功能也不起作用。在执行此查询时出现错误。
I am beginner in PostgreSQL. Right now, I am using PostgreSQL 9.3 Version installed in Windows Server 2008 OS. I am planing to encrypt the data in user table. I have go through most of the web sites related that, but I did not get clear idea and also encrypt function is not working. I getting error while execute this query.
select encrypt('123456789012345','1234','aes');.
错误消息:错误:函数加密(未知,未知,未知)确实不存在
。
有人可以帮我解决这个问题。
Can anyone help me to solve this issue.
注意,
RAM
Regards, RAM
推荐答案
您可能需要
CREATE EXTENSION pgcrypto;
首先。
但是,加密事物不会使它们以某种方式安全。请不要以为仅加密数据就能真正达到您要达到的安全目标。
However, encrypting things doesn't make them somehow "secure". Please don't assume that simply encrypting the data will actually achieve the security goal(s) you're trying to achieve.
请参阅:
- 在Postgres中存储加密数据
- https://dba.stackexchange.com/q/24370/7788
- https://dba.stackexchange.com/q/59154 / 7788
- Storing encrypted data in Postgres
- https://dba.stackexchange.com/q/24370/7788
- https://dba.stackexchange.com/q/59154/7788
...还有许多其他内容。
... and many others.
这篇关于在PostgreSQL中加密数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!