v.22.10Improvement
Add tryDecrypt function that returns NULL on decryption failure
Add function tryDecrypt that returns NULL when decrypt fails (e.g. decrypt with incorrect key) instead of throwing an exception. #41206 (Duc Canh Le).Why it matters
This feature addresses the issue where decryption failures (such as using an incorrect key) cause exceptions that interrupt query execution. WithtryDecrypt, users can handle decryption errors gracefully by receiving NULL values, enabling more robust and fault-tolerant query processing.How to use it
Use thetryDecrypt function in SQL queries to decrypt data safely. For example:SELECT tryDecrypt(encrypted_column, 'encryption_key') FROM tableThis will return decrypted values or
NULL if decryption fails.