1

I am relatively new to SQL and PostgreSQL and was wondering, if there is a way to use the like key word and pgp_sym_decrypt without decrypting the entire column to use the like statement (i.e)

SELECT pgp_sym_decrypt("Column_Name", 'Password_Number') FROM Table_Name 
WHERE pgp_sym_decrypt("Column_Name", 'Password_Number') LIKE '%a%';

Thanks for the help.

1 Answer 1

1

No, and this will cause a linear search of the entire table when it's used. The decrypted value to be evaluated for like will have to be done for every record in the table.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.