diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/regress/expected/guc.out | 22 | ||||
| -rw-r--r-- | src/test/regress/expected/rules.out | 2 | ||||
| -rw-r--r-- | src/test/regress/sql/guc.sql | 9 | ||||
| -rw-r--r-- | src/test/regress/sql/rules.sql | 1 |
4 files changed, 34 insertions, 0 deletions
diff --git a/src/test/regress/expected/guc.out b/src/test/regress/expected/guc.out index 7f9e29c765c..d6fb879f500 100644 --- a/src/test/regress/expected/guc.out +++ b/src/test/regress/expected/guc.out @@ -31,6 +31,28 @@ SELECT '2006-08-13 12:34:56'::timestamptz; 2006-08-13 12:34:56-07 (1 row) +-- Check handling of list GUCs +SET search_path = 'pg_catalog', Foo, 'Bar', ''; +SHOW search_path; + search_path +---------------------------- + pg_catalog, foo, "Bar", "" +(1 row) + +SET search_path = null; -- means empty list +SHOW search_path; + search_path +------------- + +(1 row) + +SET search_path = null, null; -- syntax error +ERROR: syntax error at or near "," +LINE 1: SET search_path = null, null; + ^ +SET enable_seqscan = null; -- error +ERROR: NULL is an invalid value for enable_seqscan +RESET search_path; -- SET LOCAL has no effect outside of a transaction SET LOCAL vacuum_cost_delay TO 50; WARNING: SET LOCAL can only be used in transaction blocks diff --git a/src/test/regress/expected/rules.out b/src/test/regress/expected/rules.out index 77e25ca029e..2bf968ae3d3 100644 --- a/src/test/regress/expected/rules.out +++ b/src/test/regress/expected/rules.out @@ -3572,6 +3572,7 @@ CREATE FUNCTION func_with_set_params() RETURNS integer SET extra_float_digits TO 2 SET work_mem TO '4MB' SET datestyle to iso, mdy + SET temp_tablespaces to NULL SET local_preload_libraries TO "Mixed/Case", 'c:/''a"/path', '', '0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789' IMMUTABLE STRICT; SELECT pg_get_functiondef('func_with_set_params()'::regprocedure); @@ -3585,6 +3586,7 @@ SELECT pg_get_functiondef('func_with_set_params()'::regprocedure); SET extra_float_digits TO '2' + SET work_mem TO '4MB' + SET "DateStyle" TO 'iso, mdy' + + SET temp_tablespaces TO NULL + SET local_preload_libraries TO 'Mixed/Case', 'c:/''a"/path', '', '0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789'+ AS $function$select 1;$function$ + diff --git a/src/test/regress/sql/guc.sql b/src/test/regress/sql/guc.sql index f65f84a2632..bafaf067e82 100644 --- a/src/test/regress/sql/guc.sql +++ b/src/test/regress/sql/guc.sql @@ -12,6 +12,15 @@ SHOW vacuum_cost_delay; SHOW datestyle; SELECT '2006-08-13 12:34:56'::timestamptz; +-- Check handling of list GUCs +SET search_path = 'pg_catalog', Foo, 'Bar', ''; +SHOW search_path; +SET search_path = null; -- means empty list +SHOW search_path; +SET search_path = null, null; -- syntax error +SET enable_seqscan = null; -- error +RESET search_path; + -- SET LOCAL has no effect outside of a transaction SET LOCAL vacuum_cost_delay TO 50; SHOW vacuum_cost_delay; diff --git a/src/test/regress/sql/rules.sql b/src/test/regress/sql/rules.sql index fdd3ff1d161..3f240bec7b0 100644 --- a/src/test/regress/sql/rules.sql +++ b/src/test/regress/sql/rules.sql @@ -1217,6 +1217,7 @@ CREATE FUNCTION func_with_set_params() RETURNS integer SET extra_float_digits TO 2 SET work_mem TO '4MB' SET datestyle to iso, mdy + SET temp_tablespaces to NULL SET local_preload_libraries TO "Mixed/Case", 'c:/''a"/path', '', '0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789' IMMUTABLE STRICT; SELECT pg_get_functiondef('func_with_set_params()'::regprocedure); |
