diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/regress/expected/text.out | 10 | ||||
-rw-r--r-- | src/test/regress/sql/text.sql | 8 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/test/regress/expected/text.out b/src/test/regress/expected/text.out index 4b1c62bf53c..1587046d95a 100644 --- a/src/test/regress/expected/text.out +++ b/src/test/regress/expected/text.out @@ -149,13 +149,13 @@ select concat_ws(',', variadic array[1,2,3]); 1,2,3 (1 row) -select concat_ws(',', variadic NULL); +select concat_ws(',', variadic NULL::int[]); concat_ws ----------- (1 row) -select concat(variadic NULL) is NULL; +select concat(variadic NULL::int[]) is NULL; ?column? ---------- t @@ -170,6 +170,8 @@ select concat(variadic '{}'::int[]) = ''; --should fail select concat_ws(',', variadic 10); ERROR: VARIADIC argument must be an array +LINE 1: select concat_ws(',', variadic 10); + ^ /* * format */ @@ -315,8 +317,8 @@ select format('%2$s, %1$s', variadic array[1, 2]); 2, 1 (1 row) --- variadic argument can be NULL, but should not be referenced -select format('Hello', variadic NULL); +-- variadic argument can be array type NULL, but should not be referenced +select format('Hello', variadic NULL::int[]); format -------- Hello diff --git a/src/test/regress/sql/text.sql b/src/test/regress/sql/text.sql index c4ed74b39d4..60c15b54c0f 100644 --- a/src/test/regress/sql/text.sql +++ b/src/test/regress/sql/text.sql @@ -47,8 +47,8 @@ select quote_literal(e'\\'); -- check variadic labeled argument select concat(variadic array[1,2,3]); select concat_ws(',', variadic array[1,2,3]); -select concat_ws(',', variadic NULL); -select concat(variadic NULL) is NULL; +select concat_ws(',', variadic NULL::int[]); +select concat(variadic NULL::int[]) is NULL; select concat(variadic '{}'::int[]) = ''; --should fail select concat_ws(',', variadic 10); @@ -93,8 +93,8 @@ select format('%s, %s', variadic array[true, false]::text[]); -- check variadic with positional placeholders select format('%2$s, %1$s', variadic array['first', 'second']); select format('%2$s, %1$s', variadic array[1, 2]); --- variadic argument can be NULL, but should not be referenced -select format('Hello', variadic NULL); +-- variadic argument can be array type NULL, but should not be referenced +select format('Hello', variadic NULL::int[]); -- variadic argument allows simulating more than FUNC_MAX_ARGS parameters select format(string_agg('%s',','), variadic array_agg(i)) from generate_series(1,200) g(i); |