From a426ff583d6fdc46be5c66d70ac5f159b0b46672 Mon Sep 17 00:00:00 2001
From: "Marc G. Fournier" <scrappy@hub.org>
Date: Sun, 27 Apr 1997 18:13:54 +0000
Subject: There, I'll leave this alone until Thomas catchs up *grin*

---
 src/test/regress/sql/arrays.sql | 42 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 src/test/regress/sql/arrays.sql

(limited to 'src/test/regress/sql/arrays.sql')

diff --git a/src/test/regress/sql/arrays.sql b/src/test/regress/sql/arrays.sql
new file mode 100644
index 0000000000..117b27cf8a
--- /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;
-- 
cgit v1.2.1

