diff options
Diffstat (limited to 'src/test/regress/sql/arrays.sql')
-rw-r--r-- | src/test/regress/sql/arrays.sql | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/regress/sql/arrays.sql b/src/test/regress/sql/arrays.sql index 3ab7f392be4..f774faf8568 100644 --- a/src/test/regress/sql/arrays.sql +++ b/src/test/regress/sql/arrays.sql @@ -2,6 +2,9 @@ -- ARRAYS -- +-- directory paths are passed to us in environment variables +\getenv abs_srcdir PG_ABS_SRCDIR + CREATE TABLE arrtest ( a int2[], b int4[][][], @@ -12,6 +15,16 @@ CREATE TABLE arrtest ( g varchar(5)[] ); +CREATE TABLE array_op_test ( + seqno int4, + i int4[], + t text[] +); + +\set filename :abs_srcdir '/data/array.data' +COPY array_op_test FROM :'filename'; +ANALYZE array_op_test; + -- -- only the 'e' array is 0-based, the others are 1-based. -- @@ -153,6 +166,10 @@ UPDATE arrtest_s SET a[:] = '{23, 24, 25}'; -- fail, too small INSERT INTO arrtest_s VALUES(NULL, NULL); UPDATE arrtest_s SET a[:] = '{11, 12, 13, 14, 15}'; -- fail, no good with null +-- we want to work with a point_tbl that includes a null +CREATE TEMP TABLE point_tbl AS SELECT * FROM public.point_tbl; +INSERT INTO POINT_TBL(f1) VALUES (NULL); + -- check with fixed-length-array type, such as point SELECT f1[0:1] FROM POINT_TBL; SELECT f1[0:] FROM POINT_TBL; |