Created
September 25, 2017 18:34
-
-
Save steve-chavez/8d7033ea5655096903f3b52f8ed09a15 to your computer and use it in GitHub Desktop.
A PostgreSQL minor bug when using a SET LOCAL guc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select current_setting('response.smth', true) is null; -- gives true | |
begin; | |
set local "response.smth" = 'value'; | |
commit; -- or rollback | |
select current_setting('response.smth', true) is null; -- gives false since current_setting('response.smth') now is equal to '' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment