Skip to content

Instantly share code, notes, and snippets.

@steve-chavez
Created September 25, 2017 18:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steve-chavez/8d7033ea5655096903f3b52f8ed09a15 to your computer and use it in GitHub Desktop.
Save steve-chavez/8d7033ea5655096903f3b52f8ed09a15 to your computer and use it in GitHub Desktop.
A PostgreSQL minor bug when using a SET LOCAL guc
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