diff options
Diffstat (limited to 'src/test/regress/sql/guc.sql')
-rw-r--r-- | src/test/regress/sql/guc.sql | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/regress/sql/guc.sql b/src/test/regress/sql/guc.sql index 3de8a6b55d6..6a062a0a5ba 100644 --- a/src/test/regress/sql/guc.sql +++ b/src/test/regress/sql/guc.sql @@ -258,6 +258,19 @@ select myfunc(0); select current_setting('work_mem'); select myfunc(1), current_setting('work_mem'); +-- check current_setting()'s behavior with invalid setting name + +select current_setting('nosuch.setting'); -- FAIL +select current_setting('nosuch.setting', false); -- FAIL +select current_setting('nosuch.setting', true) is null; + +-- after this, all three cases should yield 'nada' +set nosuch.setting = 'nada'; + +select current_setting('nosuch.setting'); +select current_setting('nosuch.setting', false); +select current_setting('nosuch.setting', true); + -- Normally, CREATE FUNCTION should complain about invalid values in -- function SET options; but not if check_function_bodies is off, -- because that creates ordering hazards for pg_dump |