diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/regress/expected/arrays.out | 16 | ||||
| -rw-r--r-- | src/test/regress/sql/arrays.sql | 8 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/test/regress/expected/arrays.out b/src/test/regress/expected/arrays.out index 7225d6e4429..3ab18be9a79 100644 --- a/src/test/regress/expected/arrays.out +++ b/src/test/regress/expected/arrays.out @@ -1192,3 +1192,19 @@ select unnest(array[1,2,3,null,4,null,null,5,6]::text[]); 6 (9 rows) +-- Insert/update on a column that is array of composite +create temp table t1 (f1 int8_tbl[]); +insert into t1 (f1[5].q1) values(42); +select * from t1; + f1 +----------------- + [5:5]={"(42,)"} +(1 row) + +update t1 set f1[5].q2 = 43; +select * from t1; + f1 +------------------- + [5:5]={"(42,43)"} +(1 row) + diff --git a/src/test/regress/sql/arrays.sql b/src/test/regress/sql/arrays.sql index 5e4933c31d3..f65bc452e2e 100644 --- a/src/test/regress/sql/arrays.sql +++ b/src/test/regress/sql/arrays.sql @@ -404,3 +404,11 @@ select unnest(array[1,2,3,4.5]::float8[]); select unnest(array[1,2,3,4.5]::numeric[]); select unnest(array[1,2,3,null,4,null,null,5,6]); select unnest(array[1,2,3,null,4,null,null,5,6]::text[]); + +-- Insert/update on a column that is array of composite + +create temp table t1 (f1 int8_tbl[]); +insert into t1 (f1[5].q1) values(42); +select * from t1; +update t1 set f1[5].q2 = 43; +select * from t1; |
