diff options
| author | Bruce Momjian | 2003-06-24 23:14:49 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2003-06-24 23:14:49 +0000 |
| commit | 46bf65148002f03a4775e6fbb2c4f758184062c5 (patch) | |
| tree | 35508e7d4793489135efdbdff9b0fd2325c3b3e3 /src/test | |
| parent | 50e53236aff06a6193059b5a92e60561645338ab (diff) | |
Array mega-patch.
Joe Conway
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/regress/expected/arrays.out | 28 | ||||
| -rw-r--r-- | src/test/regress/sql/arrays.sql | 8 |
2 files changed, 4 insertions, 32 deletions
diff --git a/src/test/regress/expected/arrays.out b/src/test/regress/expected/arrays.out index 617cf09a9a0..c5f638bd465 100644 --- a/src/test/regress/expected/arrays.out +++ b/src/test/regress/expected/arrays.out @@ -178,19 +178,13 @@ SELECT ARRAY(select f2 from arrtest_f order by f2) AS "ARRAY"; (1 row) -- functions -SELECT singleton_array(42) AS "{42}"; - {42} ------- - {42} -(1 row) - -SELECT array_append(singleton_array(42), 6) AS "{42,6}"; +SELECT array_append(array[42], 6) AS "{42,6}"; {42,6} -------- {42,6} (1 row) -SELECT array_prepend(6, singleton_array(42)) AS "{6,42}"; +SELECT array_prepend(6, array[42]) AS "{6,42}"; {6,42} -------- {6,42} @@ -214,24 +208,6 @@ SELECT array_cat(ARRAY[[3,4],[5,6]], ARRAY[1,2]) AS "{{3,4},{5,6},{1,2}}"; {{3,4},{5,6},{1,2}} (1 row) -SELECT array_subscript(n, 2) AS "1.2" FROM arrtest2; - 1.2 ------ - 1.2 -(1 row) - -SELECT array_assign(n, 2, 9.99) AS "{1.1,9.99,1.3}" FROM arrtest2; - {1.1,9.99,1.3} ----------------- - {1.1,9.99,1.3} -(1 row) - -SELECT array_subscript(array_assign(n, 2, 9.99), 2) AS "9.99" FROM arrtest2; - 9.99 ------- - 9.99 -(1 row) - -- operators SELECT a FROM arrtest WHERE b = ARRAY[[[113,142],[1,147]]]; a diff --git a/src/test/regress/sql/arrays.sql b/src/test/regress/sql/arrays.sql index 82eff24125d..e39044e40ac 100644 --- a/src/test/regress/sql/arrays.sql +++ b/src/test/regress/sql/arrays.sql @@ -130,15 +130,11 @@ SELECT ARRAY[ARRAY['hello'],ARRAY['world']]; SELECT ARRAY(select f2 from arrtest_f order by f2) AS "ARRAY"; -- functions -SELECT singleton_array(42) AS "{42}"; -SELECT array_append(singleton_array(42), 6) AS "{42,6}"; -SELECT array_prepend(6, singleton_array(42)) AS "{6,42}"; +SELECT array_append(array[42], 6) AS "{42,6}"; +SELECT array_prepend(6, array[42]) AS "{6,42}"; SELECT array_cat(ARRAY[1,2], ARRAY[3,4]) AS "{{1,2},{3,4}}"; SELECT array_cat(ARRAY[1,2], ARRAY[[3,4],[5,6]]) AS "{{1,2},{3,4},{5,6}}"; SELECT array_cat(ARRAY[[3,4],[5,6]], ARRAY[1,2]) AS "{{3,4},{5,6},{1,2}}"; -SELECT array_subscript(n, 2) AS "1.2" FROM arrtest2; -SELECT array_assign(n, 2, 9.99) AS "{1.1,9.99,1.3}" FROM arrtest2; -SELECT array_subscript(array_assign(n, 2, 9.99), 2) AS "9.99" FROM arrtest2; -- operators SELECT a FROM arrtest WHERE b = ARRAY[[[113,142],[1,147]]]; |
