diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/regress/expected/arrays.out | 9 | ||||
| -rw-r--r-- | src/test/regress/sql/arrays.sql | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/test/regress/expected/arrays.out b/src/test/regress/expected/arrays.out index 0f611bf7d78..c82cd3919b9 100644 --- a/src/test/regress/expected/arrays.out +++ b/src/test/regress/expected/arrays.out @@ -785,6 +785,9 @@ select '{}}'::text[]; ERROR: malformed array literal: "{}}" select '{ }}'::text[]; ERROR: malformed array literal: "{ }}" +select array[]; +ERROR: cannot determine type of empty array +HINT: Explicitly cast to the desired type, for example ARRAY[]::integer[]. -- none of the above should be accepted -- all of the following should be accepted select '{}'::text[]; @@ -826,6 +829,12 @@ select '{ {"@ 0","@ 1 hour 42 mins 20 secs"} (1 row) +select array[]::text[]; + array +------- + {} +(1 row) + -- all of the above should be accepted -- tests for array aggregates CREATE TEMP TABLE arraggtest ( f1 INT[], f2 TEXT[][], f3 FLOAT[]); diff --git a/src/test/regress/sql/arrays.sql b/src/test/regress/sql/arrays.sql index a60bf560fa8..192648a39b6 100644 --- a/src/test/regress/sql/arrays.sql +++ b/src/test/regress/sql/arrays.sql @@ -280,6 +280,7 @@ select E'{{1,2},\\{2,3}}'::text[]; select '{{"1 2" x},{3}}'::text[]; select '{}}'::text[]; select '{ }}'::text[]; +select array[]; -- none of the above should be accepted -- all of the following should be accepted @@ -292,6 +293,7 @@ select '{ 0 second, @ 1 hour @ 42 minutes @ 20 seconds }'::interval[]; +select array[]::text[]; -- all of the above should be accepted -- tests for array aggregates |
