问题
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');.
Error Message : ERROR: function encrypt(unknown, unknown, unknown) does not exist
.
Can anyone help me to solve this issue.
Regards, RAM
回答1:
You probably need to
CREATE EXTENSION pgcrypto;
first.
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.
See:
- Storing encrypted data in Postgres
- https://dba.stackexchange.com/q/24370/7788
- https://dba.stackexchange.com/q/59154/7788
... and many others.
来源:https://stackoverflow.com/questions/26376605/encrypt-the-datas-in-postgresql