]> granicus.if.org Git - postgresql/commitdiff
There, I'll leave this alone until Thomas catchs up *grin*
authorMarc G. Fournier <scrappy@hub.org>
Sun, 27 Apr 1997 18:13:54 +0000 (18:13 +0000)
committerMarc G. Fournier <scrappy@hub.org>
Sun, 27 Apr 1997 18:13:54 +0000 (18:13 +0000)
src/test/regress/input/misc.source
src/test/regress/sql/arrays.sql [new file with mode: 0644]
src/test/regress/sql/random.sql [new file with mode: 0644]
src/test/regress/sql/tests

index 74d2d84bc6e13e6a88245728b7c1beb206cf825d..8151ff3a5a8610fc6ef11f87bc2f20a6f08df8be 100644 (file)
@@ -79,19 +79,6 @@ SELECT * FROM stud_emp;
 -- COPY aggtest TO stdout;
 
 
---
--- test the random function
---
--- count the number of tuples originally
-SELECT count(*) FROM onek;
-
--- select roughly 1/10 of the tuples
-SELECT count(*) FROM onek where oidrand(onek.oid, 10);
-
--- select again, the count should be different
-SELECT count(*) FROM onek where oidrand(onek.oid, 10);
-
-
 --
 -- inheritance stress test
 --
@@ -228,53 +215,3 @@ SELECT user_relns() AS user_relns
 --
 -- rewrite rules
 --
-
---
--- 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;
-
-
---
--- expensive functions
---
-
-
diff --git a/src/test/regress/sql/arrays.sql b/src/test/regress/sql/arrays.sql
new file mode 100644 (file)
index 0000000..117b27c
--- /dev/null
@@ -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;
diff --git a/src/test/regress/sql/random.sql b/src/test/regress/sql/random.sql
new file mode 100644 (file)
index 0000000..6e54134
--- /dev/null
@@ -0,0 +1,12 @@
+--
+-- test the random function
+--
+-- count the number of tuples originally
+SELECT count(*) FROM onek;
+
+-- select roughly 1/10 of the tuples
+SELECT count(*) FROM onek where oidrand(onek.oid, 10);
+
+-- select again, the count should be different
+SELECT count(*) FROM onek where oidrand(onek.oid, 10);
+
index e9f3d7c075577672ddc024ea2aaa9db2a7f5f8e9..3086689d80e6f1147370ef3b60cdd2750e7d10ff 100644 (file)
@@ -39,13 +39,13 @@ select_distinct_on
 transactions
 portals
 errors
+misc
+random
+arrays
 btree_index
 hash_index
-aggregates.sql
-select_views.sql
-alter_table.sql
-purge.sql
-portals_p2.sql
-misc
-
-
+aggregates
+select_views
+alter_table
+purge
+portals_p2