Searching encrypted field in Postgres
问题 I'm attempting to query an encrypted field in postgres using "pgp_sym_encrypt". I'm running my test by setting all the first names in my table to an encrypted value: update person set first_name = pgp_sym_encrypt('test', 'password'); Then selecting on it: select * from person where first_name = pgp_sym_encrypt('test', 'password'); This returns no results. If I change it to use the normal postgres encryption it will return all the rows in the table: update person set first_name = encrypt('test