Encrypt the datas in postgresql

余生颓废 提交于 2019-12-24 01:57:18

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!