aboutsummaryrefslogtreecommitdiff
path: root/src/test/regress/sql/arrays.sql
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1997-04-27 18:13:54 +0000
committerMarc G. Fournier <scrappy@hub.org>1997-04-27 18:13:54 +0000
commita426ff583d6fdc46be5c66d70ac5f159b0b46672 (patch)
tree0a96f80332e43566ad20ba54a59246c1eac4aaa2 /src/test/regress/sql/arrays.sql
parent832c0a4ff1f9949dd69304606374deb9bfa27dfc (diff)
downloadpostgresql-a426ff583d6fdc46be5c66d70ac5f159b0b46672.tar.gz
postgresql-a426ff583d6fdc46be5c66d70ac5f159b0b46672.zip
There, I'll leave this alone until Thomas catchs up *grin*
Diffstat (limited to 'src/test/regress/sql/arrays.sql')
-rw-r--r--src/test/regress/sql/arrays.sql42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/test/regress/sql/arrays.sql b/src/test/regress/sql/arrays.sql
new file mode 100644
index 00000000000..117b27cf8a6
--- /dev/null
+++ b/src/test/regress/sql/arrays.sql
@@ -0,0 +1,42 @@
+--
+-- ARRAYS
+--
+SELECT * FROM arrtest;
+
+SELECT arrtest.a[1],
+ arrtest.b[1][1][1],
+ arrtest.c[1],
+ arrtest.d[1][1],
+ arrtest.e[0]
+ FROM arrtest;
+-- ??? what about
+-- SELECT a[1], b[1][1][1], c[1], d[1][1], e[0]
+-- FROM arrtest;
+
+SELECT arrtest.a[1:3],
+ arrtest.b[1:1][1:2][1:2],
+ arrtest.c[1:2],
+ arrtest.d[1:1][1:2]
+ FROM arrtest;
+
+-- returns three different results--
+SELECT array_dims(arrtest.b) AS x;
+
+-- returns nothing
+SELECT *
+ FROM arrtest
+ WHERE arrtest.a[1] < 5 and
+ arrtest.c = '{"foobar"}'::_char16;
+
+-- updating array subranges seems to be broken
+--
+-- UPDATE arrtest
+-- SET a[1:2] = '{16,25}',
+-- b[1:1][1:1][1:2] = '{113, 117}',
+-- c[1:1] = '{"new_word"}';
+
+SELECT arrtest.a[1:3],
+ arrtest.b[1:1][1:2][1:2],
+ arrtest.c[1:2],
+ arrtest.d[1:1][1:2]
+ FROM arrtest;