Reputation: 101
I don't know if a similar question was asked before, but I didn't find what i need. I have a table in Postgres database that contains a lot of rows and I need to encrypt one column of this table (and its relative data). In other questions found was mentioned pgcrypto to encrypt columns, but in every example a brand new table is created and pgcrypto is used for INSERT statement and SELECT. Is possible to encrypt column and its preexisting data? I hope everything is clear
Upvotes: 2
Views: 11665
Reputation: 66
With pgcrypto module you can do it.
https://www.postgresql.org/docs/current/static/encryption-options.html
There are some examples:
http://www.postgresonline.com/article_pfriendly/165.html
Upvotes: 2