1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Update remaining tests for new psql, with the exception of 'arrays',

which is broken in some weird way that I don't understand.  I think it
may be exposing a bug in the new psql --- for one thing, I get different
results when I run psql by hand than the regress script gets.  What
the heck???
This commit is contained in:
Tom Lane
2000-01-09 03:48:39 +00:00
parent 0e821fb771
commit 260b6afc79
13 changed files with 4284 additions and 3850 deletions

View File

@ -1,90 +1,93 @@
QUERY: SELECT avg(four) AS avg_1 FROM onek;
--
-- AGGREGATES
--
SELECT avg(four) AS avg_1 FROM onek;
avg_1
-----
-------
1
(1 row)
QUERY: SELECT avg(a) AS avg_32 FROM aggtest WHERE a < 100;
SELECT avg(a) AS avg_32 FROM aggtest WHERE a < 100;
avg_32
------
--------
32
(1 row)
QUERY: SELECT avg(b) AS avg_107_943 FROM aggtest;
SELECT avg(b) AS avg_107_943 FROM aggtest;
avg_107_943
-----------
-------------
107.943
(1 row)
QUERY: SELECT avg(gpa) AS avg_3_4 FROM student;
SELECT avg(gpa) AS avg_3_4 FROM student;
avg_3_4
-------
---------
3.4
(1 row)
QUERY: SELECT sum(four) AS sum_1500 FROM onek;
SELECT sum(four) AS sum_1500 FROM onek;
sum_1500
--------
----------
1500
(1 row)
QUERY: SELECT sum(a) AS sum_198 FROM aggtest;
SELECT sum(a) AS sum_198 FROM aggtest;
sum_198
-------
---------
198
(1 row)
QUERY: SELECT sum(b) AS avg_431_773 FROM aggtest;
SELECT sum(b) AS avg_431_773 FROM aggtest;
avg_431_773
-----------
-------------
431.773
(1 row)
QUERY: SELECT sum(gpa) AS avg_6_8 FROM student;
SELECT sum(gpa) AS avg_6_8 FROM student;
avg_6_8
-------
---------
6.8
(1 row)
QUERY: SELECT max(four) AS max_3 FROM onek;
SELECT max(four) AS max_3 FROM onek;
max_3
-----
-------
3
(1 row)
QUERY: SELECT max(a) AS max_100 FROM aggtest;
SELECT max(a) AS max_100 FROM aggtest;
max_100
-------
---------
100
(1 row)
QUERY: SELECT max(aggtest.b) AS max_324_78 FROM aggtest;
SELECT max(aggtest.b) AS max_324_78 FROM aggtest;
max_324_78
----------
------------
324.78
(1 row)
QUERY: SELECT max(student.gpa) AS max_3_7 FROM student;
SELECT max(student.gpa) AS max_3_7 FROM student;
max_3_7
-------
---------
3.7
(1 row)
QUERY: SELECT count(four) AS cnt_1000 FROM onek;
SELECT count(four) AS cnt_1000 FROM onek;
cnt_1000
--------
----------
1000
(1 row)
QUERY: SELECT count(DISTINCT four) AS cnt_4 FROM onek;
SELECT count(DISTINCT four) AS cnt_4 FROM onek;
cnt_4
-----
-------
4
(1 row)
QUERY: select ten, count(*), sum(four) from onek group by ten;
select ten, count(*), sum(four) from onek group by ten;
ten | count | sum
---+-----+---
-----+-------+-----
0 | 100 | 100
1 | 100 | 200
2 | 100 | 100
@ -97,9 +100,9 @@ ten|count|sum
9 | 100 | 200
(10 rows)
QUERY: select ten, count(four), sum(DISTINCT four) from onek group by ten;
select ten, count(four), sum(DISTINCT four) from onek group by ten;
ten | count | sum
---+-----+---
-----+-------+-----
0 | 100 | 2
1 | 100 | 4
2 | 100 | 2
@ -112,21 +115,21 @@ ten|count|sum
9 | 100 | 4
(10 rows)
QUERY: SELECT newavg(four) AS avg_1 FROM onek;
SELECT newavg(four) AS avg_1 FROM onek;
avg_1
-----
-------
1
(1 row)
QUERY: SELECT newsum(four) AS sum_1500 FROM onek;
SELECT newsum(four) AS sum_1500 FROM onek;
sum_1500
--------
----------
1500
(1 row)
QUERY: SELECT newcnt(four) AS cnt_1000 FROM onek;
SELECT newcnt(four) AS cnt_1000 FROM onek;
cnt_1000
--------
----------
1000
(1 row)

View File

@ -1,31 +1,36 @@
QUERY: CREATE TABLE tmp (initial int4);
QUERY: ALTER TABLE tmp ADD COLUMN a int4;
QUERY: ALTER TABLE tmp ADD COLUMN b name;
QUERY: ALTER TABLE tmp ADD COLUMN c text;
QUERY: ALTER TABLE tmp ADD COLUMN d float8;
QUERY: ALTER TABLE tmp ADD COLUMN e float4;
QUERY: ALTER TABLE tmp ADD COLUMN f int2;
QUERY: ALTER TABLE tmp ADD COLUMN g polygon;
QUERY: ALTER TABLE tmp ADD COLUMN h abstime;
QUERY: ALTER TABLE tmp ADD COLUMN i char;
QUERY: ALTER TABLE tmp ADD COLUMN j abstime[];
QUERY: ALTER TABLE tmp ADD COLUMN k dt;
--
-- ALTER_TABLE
-- add attribute
--
CREATE TABLE tmp (initial int4);
ALTER TABLE tmp ADD COLUMN a int4;
ALTER TABLE tmp ADD COLUMN b name;
ALTER TABLE tmp ADD COLUMN c text;
ALTER TABLE tmp ADD COLUMN d float8;
ALTER TABLE tmp ADD COLUMN e float4;
ALTER TABLE tmp ADD COLUMN f int2;
ALTER TABLE tmp ADD COLUMN g polygon;
ALTER TABLE tmp ADD COLUMN h abstime;
ALTER TABLE tmp ADD COLUMN i char;
ALTER TABLE tmp ADD COLUMN j abstime[];
ALTER TABLE tmp ADD COLUMN k dt;
ERROR: Unable to locate type name 'dt' in catalog
QUERY: ALTER TABLE tmp ADD COLUMN l tid;
QUERY: ALTER TABLE tmp ADD COLUMN m xid;
QUERY: ALTER TABLE tmp ADD COLUMN n oid8;
QUERY: ALTER TABLE tmp ADD COLUMN p smgr;
QUERY: ALTER TABLE tmp ADD COLUMN q point;
QUERY: ALTER TABLE tmp ADD COLUMN r lseg;
QUERY: ALTER TABLE tmp ADD COLUMN s path;
QUERY: ALTER TABLE tmp ADD COLUMN t box;
QUERY: ALTER TABLE tmp ADD COLUMN u tinterval;
QUERY: ALTER TABLE tmp ADD COLUMN v datetime;
QUERY: ALTER TABLE tmp ADD COLUMN w timespan;
QUERY: ALTER TABLE tmp ADD COLUMN x float8[];
QUERY: ALTER TABLE tmp ADD COLUMN y float4[];
QUERY: ALTER TABLE tmp ADD COLUMN z int2[];
QUERY: INSERT INTO tmp (a, b, c, d, e, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u,
ALTER TABLE tmp ADD COLUMN l tid;
ALTER TABLE tmp ADD COLUMN m xid;
ALTER TABLE tmp ADD COLUMN n oid8;
--ALTER TABLE tmp ADD COLUMN o lock;
ALTER TABLE tmp ADD COLUMN p smgr;
ALTER TABLE tmp ADD COLUMN q point;
ALTER TABLE tmp ADD COLUMN r lseg;
ALTER TABLE tmp ADD COLUMN s path;
ALTER TABLE tmp ADD COLUMN t box;
ALTER TABLE tmp ADD COLUMN u tinterval;
ALTER TABLE tmp ADD COLUMN v datetime;
ALTER TABLE tmp ADD COLUMN w timespan;
ALTER TABLE tmp ADD COLUMN x float8[];
ALTER TABLE tmp ADD COLUMN y float4[];
ALTER TABLE tmp ADD COLUMN z int2[];
INSERT INTO tmp (a, b, c, d, e, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u,
v, w, x, y, z)
VALUES (4, 'name', 'text', 4.1, 4.1, 2, '(4.1,4.1,3.1,3.1)',
'Mon May 1 00:30:30 1995', 'c', '{Mon May 1 00:30:30 1995, Monday Aug 24 14:43:07 1992, epoch}',
@ -34,42 +39,44 @@ QUERY: INSERT INTO tmp (a, b, c, d, e, f, g, h, i, j, k, l, m, n, p, q, r, s, t,
'(0,2,4.1,4.1,3.1,3.1)', '(4.1,4.1,3.1,3.1)', '["current" "infinity"]',
'1/3', '1,name', '{1.0,2.0,3.0,4.0}', '{1.0,2.0,3.0,4.0}', '{1,2,3,4}');
ERROR: Relation 'tmp' does not have attribute 'k'
QUERY: SELECT * FROM tmp;
SELECT * FROM tmp;
initial | a | b | c | d | e | f | g | h | i | j | l | m | n | p | q | r | s | t | u | v | w | x | y | z
-------+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
---------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---
(0 rows)
QUERY: DROP TABLE tmp;
QUERY: CREATE TABLE tmp (
DROP TABLE tmp;
-- the wolf bug - schema mods caused inconsistent row descriptors
CREATE TABLE tmp (
initial int4
);
QUERY: ALTER TABLE tmp ADD COLUMN a int4;
QUERY: ALTER TABLE tmp ADD COLUMN b name;
QUERY: ALTER TABLE tmp ADD COLUMN c text;
QUERY: ALTER TABLE tmp ADD COLUMN d float8;
QUERY: ALTER TABLE tmp ADD COLUMN e float4;
QUERY: ALTER TABLE tmp ADD COLUMN f int2;
QUERY: ALTER TABLE tmp ADD COLUMN g polygon;
QUERY: ALTER TABLE tmp ADD COLUMN h abstime;
QUERY: ALTER TABLE tmp ADD COLUMN i char;
QUERY: ALTER TABLE tmp ADD COLUMN j abstime[];
QUERY: ALTER TABLE tmp ADD COLUMN k dt;
ALTER TABLE tmp ADD COLUMN a int4;
ALTER TABLE tmp ADD COLUMN b name;
ALTER TABLE tmp ADD COLUMN c text;
ALTER TABLE tmp ADD COLUMN d float8;
ALTER TABLE tmp ADD COLUMN e float4;
ALTER TABLE tmp ADD COLUMN f int2;
ALTER TABLE tmp ADD COLUMN g polygon;
ALTER TABLE tmp ADD COLUMN h abstime;
ALTER TABLE tmp ADD COLUMN i char;
ALTER TABLE tmp ADD COLUMN j abstime[];
ALTER TABLE tmp ADD COLUMN k dt;
ERROR: Unable to locate type name 'dt' in catalog
QUERY: ALTER TABLE tmp ADD COLUMN l tid;
QUERY: ALTER TABLE tmp ADD COLUMN m xid;
QUERY: ALTER TABLE tmp ADD COLUMN n oid8;
QUERY: ALTER TABLE tmp ADD COLUMN p smgr;
QUERY: ALTER TABLE tmp ADD COLUMN q point;
QUERY: ALTER TABLE tmp ADD COLUMN r lseg;
QUERY: ALTER TABLE tmp ADD COLUMN s path;
QUERY: ALTER TABLE tmp ADD COLUMN t box;
QUERY: ALTER TABLE tmp ADD COLUMN u tinterval;
QUERY: ALTER TABLE tmp ADD COLUMN v datetime;
QUERY: ALTER TABLE tmp ADD COLUMN w timespan;
QUERY: ALTER TABLE tmp ADD COLUMN x float8[];
QUERY: ALTER TABLE tmp ADD COLUMN y float4[];
QUERY: ALTER TABLE tmp ADD COLUMN z int2[];
QUERY: INSERT INTO tmp (a, b, c, d, e, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u,
ALTER TABLE tmp ADD COLUMN l tid;
ALTER TABLE tmp ADD COLUMN m xid;
ALTER TABLE tmp ADD COLUMN n oid8;
--ALTER TABLE tmp ADD COLUMN o lock;
ALTER TABLE tmp ADD COLUMN p smgr;
ALTER TABLE tmp ADD COLUMN q point;
ALTER TABLE tmp ADD COLUMN r lseg;
ALTER TABLE tmp ADD COLUMN s path;
ALTER TABLE tmp ADD COLUMN t box;
ALTER TABLE tmp ADD COLUMN u tinterval;
ALTER TABLE tmp ADD COLUMN v datetime;
ALTER TABLE tmp ADD COLUMN w timespan;
ALTER TABLE tmp ADD COLUMN x float8[];
ALTER TABLE tmp ADD COLUMN y float4[];
ALTER TABLE tmp ADD COLUMN z int2[];
INSERT INTO tmp (a, b, c, d, e, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u,
v, w, x, y, z)
VALUES (4, 'name', 'text', 4.1, 4.1, 2, '(4.1,4.1,3.1,3.1)',
'Mon May 1 00:30:30 1995', 'c', '{Mon May 1 00:30:30 1995, Monday Aug 24 14:43:07 1992, epoch}',
@ -78,16 +85,21 @@ QUERY: INSERT INTO tmp (a, b, c, d, e, f, g, h, i, j, k, l, m, n, p, q, r, s, t,
'(0,2,4.1,4.1,3.1,3.1)', '(4.1,4.1,3.1,3.1)', '["current" "infinity"]',
'1/3', '1,name', '{1.0,2.0,3.0,4.0}', '{1.0,2.0,3.0,4.0}', '{1,2,3,4}');
ERROR: Relation 'tmp' does not have attribute 'k'
QUERY: SELECT * FROM tmp;
SELECT * FROM tmp;
initial | a | b | c | d | e | f | g | h | i | j | l | m | n | p | q | r | s | t | u | v | w | x | y | z
-------+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
---------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---
(0 rows)
QUERY: DROP TABLE tmp;
QUERY: ALTER TABLE tenk1 RENAME TO ten_k;
QUERY: SELECT unique1 FROM ten_k WHERE unique1 < 20;
DROP TABLE tmp;
--
-- rename -
-- should preserve indices
--
ALTER TABLE tenk1 RENAME TO ten_k;
-- 20 values, sorted
SELECT unique1 FROM ten_k WHERE unique1 < 20;
unique1
-------
---------
0
1
2
@ -110,9 +122,10 @@ unique1
19
(20 rows)
QUERY: SELECT unique2 FROM ten_k WHERE unique2 < 20;
-- 20 values, sorted
SELECT unique2 FROM ten_k WHERE unique2 < 20;
unique2
-------
---------
0
1
2
@ -135,9 +148,10 @@ unique2
19
(20 rows)
QUERY: SELECT hundred FROM ten_k WHERE hundred = 50;
-- 100 values, sorted
SELECT hundred FROM ten_k WHERE hundred = 50;
hundred
-------
---------
50
50
50
@ -240,10 +254,11 @@ hundred
50
(100 rows)
QUERY: ALTER TABLE ten_k RENAME TO tenk1;
QUERY: SELECT unique1 FROM tenk1 WHERE unique1 < 5;
ALTER TABLE ten_k RENAME TO tenk1;
-- 5 values, sorted
SELECT unique1 FROM tenk1 WHERE unique1 < 5;
unique1
-------
---------
0
1
2

View File

@ -1,96 +1,100 @@
QUERY: SELECT b.*
--
-- BTREE_INDEX
-- test retrieval of min/max keys for each index
--
SELECT b.*
FROM bt_i4_heap b
WHERE b.seqno < 1;
seqno | random
-----+----------
-------+------------
0 | 1935401906
(1 row)
QUERY: SELECT b.*
SELECT b.*
FROM bt_i4_heap b
WHERE b.seqno >= 9999;
seqno | random
-----+----------
-------+------------
9999 | 1227676208
(1 row)
QUERY: SELECT b.*
SELECT b.*
FROM bt_i4_heap b
WHERE b.seqno = 4500;
seqno | random
-----+----------
-------+------------
4500 | 2080851358
(1 row)
QUERY: SELECT b.*
SELECT b.*
FROM bt_name_heap b
WHERE b.seqno < '1'::name;
seqno | random
-----+----------
-------+------------
0 | 1935401906
(1 row)
QUERY: SELECT b.*
SELECT b.*
FROM bt_name_heap b
WHERE b.seqno >= '9999'::name;
seqno | random
-----+----------
-------+------------
9999 | 1227676208
(1 row)
QUERY: SELECT b.*
SELECT b.*
FROM bt_name_heap b
WHERE b.seqno = '4500'::name;
seqno | random
-----+----------
-------+------------
4500 | 2080851358
(1 row)
QUERY: SELECT b.*
SELECT b.*
FROM bt_txt_heap b
WHERE b.seqno < '1'::text;
seqno | random
-----+----------
-------+------------
0 | 1935401906
(1 row)
QUERY: SELECT b.*
SELECT b.*
FROM bt_txt_heap b
WHERE b.seqno >= '9999'::text;
seqno | random
-----+----------
-------+------------
9999 | 1227676208
(1 row)
QUERY: SELECT b.*
SELECT b.*
FROM bt_txt_heap b
WHERE b.seqno = '4500'::text;
seqno | random
-----+----------
-------+------------
4500 | 2080851358
(1 row)
QUERY: SELECT b.*
SELECT b.*
FROM bt_f8_heap b
WHERE b.seqno < '1'::float8;
seqno | random
-----+----------
-------+------------
0 | 1935401906
(1 row)
QUERY: SELECT b.*
SELECT b.*
FROM bt_f8_heap b
WHERE b.seqno >= '9999'::float8;
seqno | random
-----+----------
-------+------------
9999 | 1227676208
(1 row)
QUERY: SELECT b.*
SELECT b.*
FROM bt_f8_heap b
WHERE b.seqno = '4500'::float8;
seqno | random
-----+----------
-------+------------
4500 | 2080851358
(1 row)

View File

@ -1,139 +1,198 @@
QUERY: SELECT hash_i4_heap.*
--
-- HASH_INDEX
-- grep 843938989 hash.data
--
SELECT hash_i4_heap.*
WHERE hash_i4_heap.random = 843938989;
seqno | random
-----+---------
-------+-----------
15 | 843938989
(1 row)
QUERY: SELECT hash_i4_heap.*
--
-- hash index
-- grep 66766766 hash.data
--
SELECT hash_i4_heap.*
WHERE hash_i4_heap.random = 66766766;
seqno | random
-----+------
-------+--------
(0 rows)
QUERY: SELECT hash_name_heap.*
--
-- hash index
-- grep 1505703298 hash.data
--
SELECT hash_name_heap.*
WHERE hash_name_heap.random = '1505703298'::name;
seqno | random
-----+----------
-------+------------
9838 | 1505703298
(1 row)
QUERY: SELECT hash_name_heap.*
--
-- hash index
-- grep 7777777 hash.data
--
SELECT hash_name_heap.*
WHERE hash_name_heap.random = '7777777'::name;
seqno | random
-----+------
-------+--------
(0 rows)
QUERY: SELECT hash_txt_heap.*
--
-- hash index
-- grep 1351610853 hash.data
--
SELECT hash_txt_heap.*
WHERE hash_txt_heap.random = '1351610853'::text;
seqno | random
-----+----------
-------+------------
5677 | 1351610853
(1 row)
QUERY: SELECT hash_txt_heap.*
--
-- hash index
-- grep 111111112222222233333333 hash.data
--
SELECT hash_txt_heap.*
WHERE hash_txt_heap.random = '111111112222222233333333'::text;
seqno | random
-----+------
-------+--------
(0 rows)
QUERY: SELECT hash_f8_heap.*
--
-- hash index
-- grep 444705537 hash.data
--
SELECT hash_f8_heap.*
WHERE hash_f8_heap.random = '444705537'::float8;
seqno | random
-----+---------
-------+-----------
7853 | 444705537
(1 row)
QUERY: SELECT hash_f8_heap.*
--
-- hash index
-- grep 88888888 hash.data
--
SELECT hash_f8_heap.*
WHERE hash_f8_heap.random = '88888888'::float8;
seqno | random
-----+------
-------+--------
(0 rows)
QUERY: UPDATE hash_i4_heap
--
-- hash index
-- grep '^90[^0-9]' hashovfl.data
--
-- SELECT count(*) AS i988 FROM hash_ovfl_heap
-- WHERE x = 90;
--
-- hash index
-- grep '^1000[^0-9]' hashovfl.data
--
-- SELECT count(*) AS i0 FROM hash_ovfl_heap
-- WHERE x = 1000;
--
-- HASH
--
UPDATE hash_i4_heap
SET random = 1
WHERE hash_i4_heap.seqno = 1492;
QUERY: SELECT h.seqno AS i1492, h.random AS i1
SELECT h.seqno AS i1492, h.random AS i1
FROM hash_i4_heap h
WHERE h.random = 1;
i1492 | i1
-----+--
-------+----
1492 | 1
(1 row)
QUERY: UPDATE hash_i4_heap
UPDATE hash_i4_heap
SET seqno = 20000
WHERE hash_i4_heap.random = 1492795354;
QUERY: SELECT h.seqno AS i20000
SELECT h.seqno AS i20000
FROM hash_i4_heap h
WHERE h.random = 1492795354;
i20000
------
--------
20000
(1 row)
QUERY: UPDATE hash_name_heap
UPDATE hash_name_heap
SET random = '0123456789abcdef'::name
WHERE hash_name_heap.seqno = 6543;
QUERY: SELECT h.seqno AS i6543, h.random AS c0_to_f
SELECT h.seqno AS i6543, h.random AS c0_to_f
FROM hash_name_heap h
WHERE h.random = '0123456789abcdef'::name;
i6543 | c0_to_f
-----+----------------
-------+------------------
6543 | 0123456789abcdef
(1 row)
QUERY: UPDATE hash_name_heap
UPDATE hash_name_heap
SET seqno = 20000
WHERE hash_name_heap.random = '76652222'::name;
QUERY: SELECT h.seqno AS emptyset
--
-- this is the row we just replaced; index scan should return zero rows
--
SELECT h.seqno AS emptyset
FROM hash_name_heap h
WHERE h.random = '76652222'::name;
emptyset
--------
----------
(0 rows)
QUERY: UPDATE hash_txt_heap
UPDATE hash_txt_heap
SET random = '0123456789abcdefghijklmnop'::text
WHERE hash_txt_heap.seqno = 4002;
QUERY: SELECT h.seqno AS i4002, h.random AS c0_to_p
SELECT h.seqno AS i4002, h.random AS c0_to_p
FROM hash_txt_heap h
WHERE h.random = '0123456789abcdefghijklmnop'::text;
i4002 | c0_to_p
-----+--------------------------
-------+----------------------------
4002 | 0123456789abcdefghijklmnop
(1 row)
QUERY: UPDATE hash_txt_heap
UPDATE hash_txt_heap
SET seqno = 20000
WHERE hash_txt_heap.random = '959363399'::text;
QUERY: SELECT h.seqno AS t20000
SELECT h.seqno AS t20000
FROM hash_txt_heap h
WHERE h.random = '959363399'::text;
t20000
------
--------
20000
(1 row)
QUERY: UPDATE hash_f8_heap
UPDATE hash_f8_heap
SET random = '-1234.1234'::float8
WHERE hash_f8_heap.seqno = 8906;
QUERY: SELECT h.seqno AS i8096, h.random AS f1234_1234
SELECT h.seqno AS i8096, h.random AS f1234_1234
FROM hash_f8_heap h
WHERE h.random = '-1234.1234'::float8;
i8096 | f1234_1234
-----+----------
-------+------------
8906 | -1234.1234
(1 row)
QUERY: UPDATE hash_f8_heap
UPDATE hash_f8_heap
SET seqno = 20000
WHERE hash_f8_heap.random = '488912369'::float8;
QUERY: SELECT h.seqno AS f20000
SELECT h.seqno AS f20000
FROM hash_f8_heap h
WHERE h.random = '488912369'::float8;
f20000
------
--------
20000
(1 row)
-- UPDATE hash_ovfl_heap
-- SET x = 1000
-- WHERE x = 90;
-- this vacuums the index as well
-- VACUUM hash_ovfl_heap;
-- SELECT count(*) AS i0 FROM hash_ovfl_heap
-- WHERE x = 90;
-- SELECT count(*) AS i988 FROM hash_ovfl_heap
-- WHERE x = 1000;

View File

@ -1,24 +1,42 @@
QUERY: CREATE TABLE JOIN_TBL (
--
-- JOIN
-- Test join clauses
--
CREATE TABLE JOIN1_TBL (
i integer,
j integer,
x text
t text
);
QUERY: CREATE TABLE JOIN2_TBL (
CREATE TABLE JOIN2_TBL (
i integer,
k integer
);
QUERY: INSERT INTO JOIN_TBL VALUES (1, 3, 'one');
QUERY: INSERT INTO JOIN_TBL VALUES (2, 2, 'two');
QUERY: INSERT INTO JOIN_TBL VALUES (3, 1, 'three');
QUERY: INSERT INTO JOIN_TBL VALUES (4, 0, 'four');
QUERY: INSERT INTO JOIN2_TBL VALUES (1, -1);
QUERY: INSERT INTO JOIN2_TBL VALUES (2, 2);
QUERY: INSERT INTO JOIN2_TBL VALUES (3, -3);
QUERY: INSERT INTO JOIN2_TBL VALUES (2, 4);
QUERY: SELECT '' AS "xxx", *
FROM JOIN_TBL CROSS JOIN JOIN2_TBL;
xxx|i|j|x |i| k
---+-+-+-----+-+--
CREATE TABLE JOIN3_TBL (
i integer,
j integer,
y integer
);
CREATE TABLE JOIN4_TBL (
k integer,
z integer
);
INSERT INTO JOIN1_TBL VALUES (1, 3, 'one');
INSERT INTO JOIN1_TBL VALUES (2, 2, 'two');
INSERT INTO JOIN1_TBL VALUES (3, 1, 'three');
INSERT INTO JOIN1_TBL VALUES (4, 0, 'four');
INSERT INTO JOIN2_TBL VALUES (1, -1);
INSERT INTO JOIN2_TBL VALUES (2, 2);
INSERT INTO JOIN2_TBL VALUES (3, -3);
INSERT INTO JOIN2_TBL VALUES (2, 4);
--
-- CROSS JOIN
-- Qualifications are not allowed on cross joins,
-- which degenerate into a standard unqualified inner join.
--
SELECT '' AS "xxx", *
FROM JOIN1_TBL CROSS JOIN JOIN2_TBL;
xxx | i | j | t | i | k
-----+---+---+-------+---+----
| 1 | 3 | one | 1 | -1
| 2 | 2 | two | 1 | -1
| 3 | 1 | three | 1 | -1
@ -37,22 +55,50 @@ xxx|i|j|x |i| k
| 4 | 0 | four | 2 | 4
(16 rows)
QUERY: SELECT '' AS "xxx", *
FROM JOIN_TBL NATURAL JOIN JOIN2_TBL;
SELECT '' AS "xxx", i, k, t
FROM JOIN1_TBL CROSS JOIN JOIN2_TBL;
ERROR: Column 'i' is ambiguous
SELECT '' AS "xxx", ii, tt, kk
FROM JOIN1_TBL CROSS JOIN JOIN2_TBL AS JT (ii, jj, tt, ii2, kk);
ERROR: parser: parse error at or near "("
SELECT '' AS "xxx", jt.ii, jt.jj, jt.kk
FROM JOIN1_TBL CROSS JOIN JOIN2_TBL AS JT (ii, jj, tt, ii2, kk);
ERROR: parser: parse error at or near "("
--
--
-- Inner joins (equi-joins)
--
--
--
-- Inner joins (equi-joins) with USING clause
-- The USING syntax changes the shape of the resulting table
-- by including a column in the USING clause only once in the result.
--
-- Inner equi-join on all columns with the same name
SELECT '' AS "xxx", *
FROM JOIN1_TBL NATURAL JOIN JOIN2_TBL;
ERROR: JOIN expressions are not yet implemented
QUERY: SELECT '' AS "xxx", *
FROM JOIN_TBL INNER JOIN JOIN2_TBL USING (i);
-- Inner equi-join on specified column
SELECT '' AS "xxx", *
FROM JOIN1_TBL INNER JOIN JOIN2_TBL USING (i);
ERROR: JOIN expressions are not yet implemented
QUERY: SELECT '' AS "xxx", *
FROM JOIN_TBL JOIN JOIN2_TBL ON (JOIN_TBL.i = JOIN2_TBL.i);
-- Same as above, slightly different syntax
SELECT '' AS "xxx", *
FROM JOIN1_TBL JOIN JOIN2_TBL USING (i);
ERROR: JOIN expressions are not yet implemented
QUERY: SELECT '' AS "xxx", *
FROM JOIN_TBL JOIN JOIN2_TBL ON (JOIN_TBL.i = JOIN2_TBL.k);
--
-- Inner joins (equi-joins)
--
SELECT '' AS "xxx", *
FROM JOIN1_TBL JOIN JOIN2_TBL ON (JOIN1_TBL.i = JOIN2_TBL.i);
ERROR: JOIN expressions are not yet implemented
QUERY: SELECT '' AS "xxx", *
FROM JOIN_TBL CROSS JOIN JOIN2_TBL;
xxx|i|j|x |i| k
---+-+-+-----+-+--
SELECT '' AS "xxx", *
FROM JOIN1_TBL JOIN JOIN2_TBL ON (JOIN1_TBL.i = JOIN2_TBL.k);
ERROR: JOIN expressions are not yet implemented
SELECT '' AS "xxx", *
FROM JOIN1_TBL CROSS JOIN JOIN2_TBL;
xxx | i | j | t | i | k
-----+---+---+-------+---+----
| 1 | 3 | one | 1 | -1
| 2 | 2 | two | 1 | -1
| 3 | 1 | three | 1 | -1
@ -71,24 +117,36 @@ xxx|i|j|x |i| k
| 4 | 0 | four | 2 | 4
(16 rows)
QUERY: SELECT '' AS "xxx", *
FROM JOIN_TBL JOIN JOIN2_TBL ON (JOIN_TBL.i <= JOIN2_TBL.k);
--
-- Non-equi-joins
--
SELECT '' AS "xxx", *
FROM JOIN1_TBL JOIN JOIN2_TBL ON (JOIN1_TBL.i <= JOIN2_TBL.k);
ERROR: JOIN expressions are not yet implemented
QUERY: SELECT '' AS "xxx", *
FROM JOIN_TBL OUTER JOIN JOIN2_TBL USING (i);
--
-- Outer joins
--
SELECT '' AS "xxx", *
NOTICE: OUTER JOIN not yet implemented
FROM JOIN1_TBL OUTER JOIN JOIN2_TBL USING (i);
ERROR: JOIN expressions are not yet implemented
QUERY: SELECT '' AS "xxx", *
FROM JOIN_TBL LEFT OUTER JOIN JOIN2_TBL USING (i);
SELECT '' AS "xxx", *
NOTICE: LEFT OUTER JOIN not yet implemented
FROM JOIN1_TBL LEFT OUTER JOIN JOIN2_TBL USING (i);
ERROR: JOIN expressions are not yet implemented
QUERY: SELECT '' AS "xxx", *
FROM JOIN_TBL RIGHT OUTER JOIN JOIN2_TBL USING (i);
SELECT '' AS "xxx", *
NOTICE: RIGHT OUTER JOIN not yet implemented
FROM JOIN1_TBL RIGHT OUTER JOIN JOIN2_TBL USING (i);
ERROR: JOIN expressions are not yet implemented
QUERY: SELECT '' AS "xxx", *
FROM JOIN_TBL FULL OUTER JOIN JOIN2_TBL USING (i);
SELECT '' AS "xxx", *
NOTICE: FULL OUTER JOIN not yet implemented
FROM JOIN1_TBL FULL OUTER JOIN JOIN2_TBL USING (i);
ERROR: JOIN expressions are not yet implemented
QUERY: DROP TABLE JOIN_TBL;
QUERY: DROP TABLE JOIN2_TBL;
--
-- More complicated constructs
--
--
-- Clean up
--
DROP TABLE JOIN1_TBL;
DROP TABLE JOIN2_TBL;

View File

@ -1,17 +1,21 @@
QUERY: SELECT ''::text AS two, unique1, unique2, stringu1
--
-- LIMIT
-- Check the LIMIT/OFFSET feature of SELECT
--
SELECT ''::text AS two, unique1, unique2, stringu1
FROM onek WHERE unique1 > 50
ORDER BY unique1 LIMIT 2;
two | unique1 | unique2 | stringu1
---+-------+-------+--------
-----+---------+---------+----------
| 51 | 76 | ZBAAAA
| 52 | 985 | ACAAAA
(2 rows)
QUERY: SELECT ''::text AS five, unique1, unique2, stringu1
SELECT ''::text AS five, unique1, unique2, stringu1
FROM onek WHERE unique1 > 60
ORDER BY unique1 LIMIT 5;
five | unique1 | unique2 | stringu1
----+-------+-------+--------
------+---------+---------+----------
| 61 | 560 | JCAAAA
| 62 | 633 | KCAAAA
| 63 | 296 | LCAAAA
@ -19,37 +23,37 @@ five|unique1|unique2|stringu1
| 65 | 64 | NCAAAA
(5 rows)
QUERY: SELECT ''::text AS two, unique1, unique2, stringu1
SELECT ''::text AS two, unique1, unique2, stringu1
FROM onek WHERE unique1 > 60 AND unique1 < 63
ORDER BY unique1 LIMIT 5;
two | unique1 | unique2 | stringu1
---+-------+-------+--------
-----+---------+---------+----------
| 61 | 560 | JCAAAA
| 62 | 633 | KCAAAA
(2 rows)
QUERY: SELECT ''::text AS three, unique1, unique2, stringu1
SELECT ''::text AS three, unique1, unique2, stringu1
FROM onek WHERE unique1 > 100
ORDER BY unique1 LIMIT 3 OFFSET 20;
three | unique1 | unique2 | stringu1
-----+-------+-------+--------
-------+---------+---------+----------
| 121 | 700 | REAAAA
| 122 | 519 | SEAAAA
| 123 | 777 | TEAAAA
(3 rows)
QUERY: SELECT ''::text AS zero, unique1, unique2, stringu1
SELECT ''::text AS zero, unique1, unique2, stringu1
FROM onek WHERE unique1 < 50
ORDER BY unique1 DESC LIMIT 8 OFFSET 99;
zero | unique1 | unique2 | stringu1
----+-------+-------+--------
------+---------+---------+----------
(0 rows)
QUERY: SELECT ''::text AS eleven, unique1, unique2, stringu1
SELECT ''::text AS eleven, unique1, unique2, stringu1
FROM onek WHERE unique1 < 50
ORDER BY unique1 DESC LIMIT 20 OFFSET 39;
eleven | unique1 | unique2 | stringu1
------+-------+-------+--------
--------+---------+---------+----------
| 10 | 520 | KAAAAA
| 9 | 49 | JAAAAA
| 8 | 653 | IAAAAA
@ -63,11 +67,11 @@ eleven|unique1|unique2|stringu1
| 0 | 998 | AAAAAA
(11 rows)
QUERY: SELECT ''::text AS ten, unique1, unique2, stringu1
SELECT ''::text AS ten, unique1, unique2, stringu1
FROM onek
ORDER BY unique1 OFFSET 990;
ten | unique1 | unique2 | stringu1
---+-------+-------+--------
-----+---------+---------+----------
| 990 | 369 | CMAAAA
| 991 | 426 | DMAAAA
| 992 | 363 | EMAAAA
@ -80,11 +84,11 @@ ten|unique1|unique2|stringu1
| 999 | 152 | LMAAAA
(10 rows)
QUERY: SELECT ''::text AS five, unique1, unique2, stringu1
SELECT ''::text AS five, unique1, unique2, stringu1
FROM onek
ORDER BY unique1 OFFSET 990 LIMIT 5;
five | unique1 | unique2 | stringu1
----+-------+-------+--------
------+---------+---------+----------
| 990 | 369 | CMAAAA
| 991 | 426 | DMAAAA
| 992 | 363 | EMAAAA
@ -92,11 +96,11 @@ five|unique1|unique2|stringu1
| 994 | 695 | GMAAAA
(5 rows)
QUERY: SELECT ''::text AS five, unique1, unique2, stringu1
SELECT ''::text AS five, unique1, unique2, stringu1
FROM onek
ORDER BY unique1 LIMIT 5, 900;
five | unique1 | unique2 | stringu1
----+-------+-------+--------
------+---------+---------+----------
| 900 | 913 | QIAAAA
| 901 | 931 | RIAAAA
| 902 | 702 | SIAAAA

File diff suppressed because it is too large Load Diff

View File

@ -1,60 +1,63 @@
QUERY: BEGIN;
QUERY: DECLARE foo1 CURSOR FOR SELECT * FROM tenk1;
QUERY: DECLARE foo2 CURSOR FOR SELECT * FROM tenk2;
QUERY: DECLARE foo3 CURSOR FOR SELECT * FROM tenk1;
QUERY: DECLARE foo4 CURSOR FOR SELECT * FROM tenk2;
QUERY: DECLARE foo5 CURSOR FOR SELECT * FROM tenk1;
QUERY: DECLARE foo6 CURSOR FOR SELECT * FROM tenk2;
QUERY: DECLARE foo7 CURSOR FOR SELECT * FROM tenk1;
QUERY: DECLARE foo8 CURSOR FOR SELECT * FROM tenk2;
QUERY: DECLARE foo9 CURSOR FOR SELECT * FROM tenk1;
QUERY: DECLARE foo10 CURSOR FOR SELECT * FROM tenk2;
QUERY: DECLARE foo11 CURSOR FOR SELECT * FROM tenk1;
QUERY: DECLARE foo12 CURSOR FOR SELECT * FROM tenk2;
QUERY: DECLARE foo13 CURSOR FOR SELECT * FROM tenk1;
QUERY: DECLARE foo14 CURSOR FOR SELECT * FROM tenk2;
QUERY: DECLARE foo15 CURSOR FOR SELECT * FROM tenk1;
QUERY: DECLARE foo16 CURSOR FOR SELECT * FROM tenk2;
QUERY: DECLARE foo17 CURSOR FOR SELECT * FROM tenk1;
QUERY: DECLARE foo18 CURSOR FOR SELECT * FROM tenk2;
QUERY: DECLARE foo19 CURSOR FOR SELECT * FROM tenk1;
QUERY: DECLARE foo20 CURSOR FOR SELECT * FROM tenk2;
QUERY: DECLARE foo21 CURSOR FOR SELECT * FROM tenk1;
QUERY: DECLARE foo22 CURSOR FOR SELECT * FROM tenk2;
QUERY: DECLARE foo23 CURSOR FOR SELECT * FROM tenk1;
QUERY: FETCH 1 in foo1;
--
-- PORTALS
--
BEGIN;
DECLARE foo1 CURSOR FOR SELECT * FROM tenk1;
DECLARE foo2 CURSOR FOR SELECT * FROM tenk2;
DECLARE foo3 CURSOR FOR SELECT * FROM tenk1;
DECLARE foo4 CURSOR FOR SELECT * FROM tenk2;
DECLARE foo5 CURSOR FOR SELECT * FROM tenk1;
DECLARE foo6 CURSOR FOR SELECT * FROM tenk2;
DECLARE foo7 CURSOR FOR SELECT * FROM tenk1;
DECLARE foo8 CURSOR FOR SELECT * FROM tenk2;
DECLARE foo9 CURSOR FOR SELECT * FROM tenk1;
DECLARE foo10 CURSOR FOR SELECT * FROM tenk2;
DECLARE foo11 CURSOR FOR SELECT * FROM tenk1;
DECLARE foo12 CURSOR FOR SELECT * FROM tenk2;
DECLARE foo13 CURSOR FOR SELECT * FROM tenk1;
DECLARE foo14 CURSOR FOR SELECT * FROM tenk2;
DECLARE foo15 CURSOR FOR SELECT * FROM tenk1;
DECLARE foo16 CURSOR FOR SELECT * FROM tenk2;
DECLARE foo17 CURSOR FOR SELECT * FROM tenk1;
DECLARE foo18 CURSOR FOR SELECT * FROM tenk2;
DECLARE foo19 CURSOR FOR SELECT * FROM tenk1;
DECLARE foo20 CURSOR FOR SELECT * FROM tenk2;
DECLARE foo21 CURSOR FOR SELECT * FROM tenk1;
DECLARE foo22 CURSOR FOR SELECT * FROM tenk2;
DECLARE foo23 CURSOR FOR SELECT * FROM tenk1;
FETCH 1 in foo1;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
(1 row)
QUERY: FETCH 2 in foo2;
FETCH 2 in foo2;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
(2 rows)
QUERY: FETCH 3 in foo3;
FETCH 3 in foo3;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
(3 rows)
QUERY: FETCH 4 in foo4;
FETCH 4 in foo4;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx
(4 rows)
QUERY: FETCH 5 in foo5;
FETCH 5 in foo5;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
@ -62,9 +65,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx
(5 rows)
QUERY: FETCH 6 in foo6;
FETCH 6 in foo6;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
@ -73,9 +76,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx
(6 rows)
QUERY: FETCH 7 in foo7;
FETCH 7 in foo7;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
@ -85,9 +88,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx
(7 rows)
QUERY: FETCH 8 in foo8;
FETCH 8 in foo8;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
@ -98,9 +101,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx
(8 rows)
QUERY: FETCH 9 in foo9;
FETCH 9 in foo9;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
@ -112,9 +115,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx
(9 rows)
QUERY: FETCH 10 in foo10;
FETCH 10 in foo10;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
@ -127,9 +130,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx
(10 rows)
QUERY: FETCH 11 in foo11;
FETCH 11 in foo11;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
@ -143,9 +146,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx
(11 rows)
QUERY: FETCH 12 in foo12;
FETCH 12 in foo12;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
@ -160,9 +163,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx
(12 rows)
QUERY: FETCH 13 in foo13;
FETCH 13 in foo13;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
@ -178,9 +181,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
5222 | 12 | 0 | 2 | 2 | 2 | 22 | 222 | 1222 | 222 | 5222 | 44 | 45 | WSAAAA | MAAAAA | AAAAxx
(13 rows)
QUERY: FETCH 14 in foo14;
FETCH 14 in foo14;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
@ -197,9 +200,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
6243 | 13 | 1 | 3 | 3 | 3 | 43 | 243 | 243 | 1243 | 6243 | 86 | 87 | DGAAAA | NAAAAA | HHHHxx
(14 rows)
QUERY: FETCH 15 in foo15;
FETCH 15 in foo15;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
@ -217,9 +220,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
5471 | 14 | 1 | 3 | 1 | 11 | 71 | 471 | 1471 | 471 | 5471 | 142 | 143 | LCAAAA | OAAAAA | OOOOxx
(15 rows)
QUERY: FETCH 16 in foo16;
FETCH 16 in foo16;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
@ -238,9 +241,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
5006 | 15 | 0 | 2 | 6 | 6 | 6 | 6 | 1006 | 6 | 5006 | 12 | 13 | OKAAAA | PAAAAA | VVVVxx
(16 rows)
QUERY: FETCH 17 in foo17;
FETCH 17 in foo17;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
@ -260,9 +263,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
5387 | 16 | 1 | 3 | 7 | 7 | 87 | 387 | 1387 | 387 | 5387 | 174 | 175 | FZAAAA | QAAAAA | AAAAxx
(17 rows)
QUERY: FETCH 18 in foo18;
FETCH 18 in foo18;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
@ -283,9 +286,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
5785 | 17 | 1 | 1 | 5 | 5 | 85 | 785 | 1785 | 785 | 5785 | 170 | 171 | NOAAAA | RAAAAA | HHHHxx
(18 rows)
QUERY: FETCH 19 in foo19;
FETCH 19 in foo19;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
@ -307,9 +310,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
6621 | 18 | 1 | 1 | 1 | 1 | 21 | 621 | 621 | 1621 | 6621 | 42 | 43 | RUAAAA | SAAAAA | OOOOxx
(19 rows)
QUERY: FETCH 20 in foo20;
FETCH 20 in foo20;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
@ -332,9 +335,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
6969 | 19 | 1 | 1 | 9 | 9 | 69 | 969 | 969 | 1969 | 6969 | 138 | 139 | BIAAAA | TAAAAA | VVVVxx
(20 rows)
QUERY: FETCH 21 in foo21;
FETCH 21 in foo21;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
@ -358,9 +361,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
9460 | 20 | 0 | 0 | 0 | 0 | 60 | 460 | 1460 | 4460 | 9460 | 120 | 121 | WZAAAA | UAAAAA | AAAAxx
(21 rows)
QUERY: FETCH 22 in foo22;
FETCH 22 in foo22;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
@ -385,9 +388,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
59 | 21 | 1 | 3 | 9 | 19 | 59 | 59 | 59 | 59 | 59 | 118 | 119 | HCAAAA | VAAAAA | HHHHxx
(22 rows)
QUERY: FETCH 23 in foo23;
FETCH 23 in foo23;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
@ -413,39 +416,39 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
8020 | 22 | 0 | 0 | 0 | 0 | 20 | 20 | 20 | 3020 | 8020 | 40 | 41 | MWAAAA | WAAAAA | OOOOxx
(23 rows)
QUERY: FETCH backward 1 in foo23;
FETCH backward 1 in foo23;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
59 | 21 | 1 | 3 | 9 | 19 | 59 | 59 | 59 | 59 | 59 | 118 | 119 | HCAAAA | VAAAAA | HHHHxx
(1 row)
QUERY: FETCH backward 2 in foo22;
FETCH backward 2 in foo22;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
9460 | 20 | 0 | 0 | 0 | 0 | 60 | 460 | 1460 | 4460 | 9460 | 120 | 121 | WZAAAA | UAAAAA | AAAAxx
6969 | 19 | 1 | 1 | 9 | 9 | 69 | 969 | 969 | 1969 | 6969 | 138 | 139 | BIAAAA | TAAAAA | VVVVxx
(2 rows)
QUERY: FETCH backward 3 in foo21;
FETCH backward 3 in foo21;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
6969 | 19 | 1 | 1 | 9 | 9 | 69 | 969 | 969 | 1969 | 6969 | 138 | 139 | BIAAAA | TAAAAA | VVVVxx
6621 | 18 | 1 | 1 | 1 | 1 | 21 | 621 | 621 | 1621 | 6621 | 42 | 43 | RUAAAA | SAAAAA | OOOOxx
5785 | 17 | 1 | 1 | 5 | 5 | 85 | 785 | 1785 | 785 | 5785 | 170 | 171 | NOAAAA | RAAAAA | HHHHxx
(3 rows)
QUERY: FETCH backward 4 in foo20;
FETCH backward 4 in foo20;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
6621 | 18 | 1 | 1 | 1 | 1 | 21 | 621 | 621 | 1621 | 6621 | 42 | 43 | RUAAAA | SAAAAA | OOOOxx
5785 | 17 | 1 | 1 | 5 | 5 | 85 | 785 | 1785 | 785 | 5785 | 170 | 171 | NOAAAA | RAAAAA | HHHHxx
5387 | 16 | 1 | 3 | 7 | 7 | 87 | 387 | 1387 | 387 | 5387 | 174 | 175 | FZAAAA | QAAAAA | AAAAxx
5006 | 15 | 0 | 2 | 6 | 6 | 6 | 6 | 1006 | 6 | 5006 | 12 | 13 | OKAAAA | PAAAAA | VVVVxx
(4 rows)
QUERY: FETCH backward 5 in foo19;
FETCH backward 5 in foo19;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
5785 | 17 | 1 | 1 | 5 | 5 | 85 | 785 | 1785 | 785 | 5785 | 170 | 171 | NOAAAA | RAAAAA | HHHHxx
5387 | 16 | 1 | 3 | 7 | 7 | 87 | 387 | 1387 | 387 | 5387 | 174 | 175 | FZAAAA | QAAAAA | AAAAxx
5006 | 15 | 0 | 2 | 6 | 6 | 6 | 6 | 1006 | 6 | 5006 | 12 | 13 | OKAAAA | PAAAAA | VVVVxx
@ -453,9 +456,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
6243 | 13 | 1 | 3 | 3 | 3 | 43 | 243 | 243 | 1243 | 6243 | 86 | 87 | DGAAAA | NAAAAA | HHHHxx
(5 rows)
QUERY: FETCH backward 6 in foo18;
FETCH backward 6 in foo18;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
5387 | 16 | 1 | 3 | 7 | 7 | 87 | 387 | 1387 | 387 | 5387 | 174 | 175 | FZAAAA | QAAAAA | AAAAxx
5006 | 15 | 0 | 2 | 6 | 6 | 6 | 6 | 1006 | 6 | 5006 | 12 | 13 | OKAAAA | PAAAAA | VVVVxx
5471 | 14 | 1 | 3 | 1 | 11 | 71 | 471 | 1471 | 471 | 5471 | 142 | 143 | LCAAAA | OAAAAA | OOOOxx
@ -464,9 +467,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx
(6 rows)
QUERY: FETCH backward 7 in foo17;
FETCH backward 7 in foo17;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
5006 | 15 | 0 | 2 | 6 | 6 | 6 | 6 | 1006 | 6 | 5006 | 12 | 13 | OKAAAA | PAAAAA | VVVVxx
5471 | 14 | 1 | 3 | 1 | 11 | 71 | 471 | 1471 | 471 | 5471 | 142 | 143 | LCAAAA | OAAAAA | OOOOxx
6243 | 13 | 1 | 3 | 3 | 3 | 43 | 243 | 243 | 1243 | 6243 | 86 | 87 | DGAAAA | NAAAAA | HHHHxx
@ -476,9 +479,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx
(7 rows)
QUERY: FETCH backward 8 in foo16;
FETCH backward 8 in foo16;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
5471 | 14 | 1 | 3 | 1 | 11 | 71 | 471 | 1471 | 471 | 5471 | 142 | 143 | LCAAAA | OAAAAA | OOOOxx
6243 | 13 | 1 | 3 | 3 | 3 | 43 | 243 | 243 | 1243 | 6243 | 86 | 87 | DGAAAA | NAAAAA | HHHHxx
5222 | 12 | 0 | 2 | 2 | 2 | 22 | 222 | 1222 | 222 | 5222 | 44 | 45 | WSAAAA | MAAAAA | AAAAxx
@ -489,9 +492,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx
(8 rows)
QUERY: FETCH backward 9 in foo15;
FETCH backward 9 in foo15;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
6243 | 13 | 1 | 3 | 3 | 3 | 43 | 243 | 243 | 1243 | 6243 | 86 | 87 | DGAAAA | NAAAAA | HHHHxx
5222 | 12 | 0 | 2 | 2 | 2 | 22 | 222 | 1222 | 222 | 5222 | 44 | 45 | WSAAAA | MAAAAA | AAAAxx
1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx
@ -503,9 +506,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx
(9 rows)
QUERY: FETCH backward 10 in foo14;
FETCH backward 10 in foo14;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
5222 | 12 | 0 | 2 | 2 | 2 | 22 | 222 | 1222 | 222 | 5222 | 44 | 45 | WSAAAA | MAAAAA | AAAAxx
1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx
1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx
@ -518,9 +521,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx
(10 rows)
QUERY: FETCH backward 11 in foo13;
FETCH backward 11 in foo13;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
1504 | 11 | 0 | 0 | 4 | 4 | 4 | 504 | 1504 | 1504 | 1504 | 8 | 9 | WFAAAA | LAAAAA | VVVVxx
1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx
3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx
@ -534,9 +537,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
(11 rows)
QUERY: FETCH backward 12 in foo12;
FETCH backward 12 in foo12;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
1314 | 10 | 0 | 2 | 4 | 14 | 14 | 314 | 1314 | 1314 | 1314 | 28 | 29 | OYAAAA | KAAAAA | OOOOxx
3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx
4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx
@ -550,9 +553,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
(11 rows)
QUERY: FETCH backward 13 in foo11;
FETCH backward 13 in foo11;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
3043 | 9 | 1 | 3 | 3 | 3 | 43 | 43 | 1043 | 3043 | 3043 | 86 | 87 | BNAAAA | JAAAAA | HHHHxx
4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx
6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx
@ -565,9 +568,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
(10 rows)
QUERY: FETCH backward 14 in foo10;
FETCH backward 14 in foo10;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
4321 | 8 | 1 | 1 | 1 | 1 | 21 | 321 | 321 | 4321 | 4321 | 42 | 43 | FKAAAA | IAAAAA | AAAAxx
6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx
5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx
@ -579,9 +582,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
(9 rows)
QUERY: FETCH backward 15 in foo9;
FETCH backward 15 in foo9;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
6701 | 7 | 1 | 1 | 1 | 1 | 1 | 701 | 701 | 1701 | 6701 | 2 | 3 | TXAAAA | HAAAAA | VVVVxx
5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx
8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx
@ -592,9 +595,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
(8 rows)
QUERY: FETCH backward 16 in foo8;
FETCH backward 16 in foo8;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
5057 | 6 | 1 | 1 | 7 | 17 | 57 | 57 | 1057 | 57 | 5057 | 114 | 115 | NMAAAA | GAAAAA | OOOOxx
8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx
7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx
@ -604,9 +607,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
(7 rows)
QUERY: FETCH backward 17 in foo7;
FETCH backward 17 in foo7;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8009 | 5 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 3009 | 8009 | 18 | 19 | BWAAAA | FAAAAA | HHHHxx
7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx
9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx
@ -615,9 +618,9 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
(6 rows)
QUERY: FETCH backward 18 in foo6;
FETCH backward 18 in foo6;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
7164 | 4 | 0 | 0 | 4 | 4 | 64 | 164 | 1164 | 2164 | 7164 | 128 | 129 | OPAAAA | EAAAAA | AAAAxx
9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
@ -625,51 +628,51 @@ unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenth
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
(5 rows)
QUERY: FETCH backward 19 in foo5;
FETCH backward 19 in foo5;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
9850 | 3 | 0 | 2 | 0 | 10 | 50 | 850 | 1850 | 4850 | 9850 | 100 | 101 | WOAAAA | DAAAAA | VVVVxx
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
(4 rows)
QUERY: FETCH backward 20 in foo4;
FETCH backward 20 in foo4;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
3420 | 2 | 0 | 0 | 0 | 0 | 20 | 420 | 1420 | 3420 | 3420 | 40 | 41 | OBAAAA | CAAAAA | OOOOxx
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
(3 rows)
QUERY: FETCH backward 21 in foo3;
FETCH backward 21 in foo3;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
1891 | 1 | 1 | 3 | 1 | 11 | 91 | 891 | 1891 | 1891 | 1891 | 182 | 183 | TUAAAA | BAAAAA | HHHHxx
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
(2 rows)
QUERY: FETCH backward 22 in foo2;
FETCH backward 22 in foo2;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
8800 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 800 | 3800 | 8800 | 0 | 1 | MAAAAA | AAAAAA | AAAAxx
(1 row)
QUERY: FETCH backward 23 in foo1;
FETCH backward 23 in foo1;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
(0 rows)
QUERY: CLOSE foo1;
QUERY: CLOSE foo2;
QUERY: CLOSE foo3;
QUERY: CLOSE foo4;
QUERY: CLOSE foo5;
QUERY: CLOSE foo6;
QUERY: CLOSE foo7;
QUERY: CLOSE foo8;
QUERY: CLOSE foo9;
QUERY: CLOSE foo10;
QUERY: CLOSE foo11;
QUERY: CLOSE foo12;
QUERY: end;
CLOSE foo1;
CLOSE foo2;
CLOSE foo3;
CLOSE foo4;
CLOSE foo5;
CLOSE foo6;
CLOSE foo7;
CLOSE foo8;
CLOSE foo9;
CLOSE foo10;
CLOSE foo11;
CLOSE foo12;
end;

View File

@ -1,119 +1,123 @@
QUERY: BEGIN;
QUERY: DECLARE foo13 CURSOR FOR
--
-- PORTALS_P2
--
-- EXTEND INDEX onek2_u1_prtl WHERE onek2.unique1 <= 60;
BEGIN;
DECLARE foo13 CURSOR FOR
SELECT * FROM onek WHERE unique1 = 50;
QUERY: DECLARE foo14 CURSOR FOR
DECLARE foo14 CURSOR FOR
SELECT * FROM onek WHERE unique1 = 51;
QUERY: DECLARE foo15 CURSOR FOR
DECLARE foo15 CURSOR FOR
SELECT * FROM onek WHERE unique1 = 52;
QUERY: DECLARE foo16 CURSOR FOR
DECLARE foo16 CURSOR FOR
SELECT * FROM onek WHERE unique1 = 53;
QUERY: DECLARE foo17 CURSOR FOR
DECLARE foo17 CURSOR FOR
SELECT * FROM onek WHERE unique1 = 54;
QUERY: DECLARE foo18 CURSOR FOR
DECLARE foo18 CURSOR FOR
SELECT * FROM onek WHERE unique1 = 55;
QUERY: DECLARE foo19 CURSOR FOR
DECLARE foo19 CURSOR FOR
SELECT * FROM onek WHERE unique1 = 56;
QUERY: DECLARE foo20 CURSOR FOR
DECLARE foo20 CURSOR FOR
SELECT * FROM onek WHERE unique1 = 57;
QUERY: DECLARE foo21 CURSOR FOR
DECLARE foo21 CURSOR FOR
SELECT * FROM onek WHERE unique1 = 58;
QUERY: DECLARE foo22 CURSOR FOR
DECLARE foo22 CURSOR FOR
SELECT * FROM onek WHERE unique1 = 59;
QUERY: DECLARE foo23 CURSOR FOR
DECLARE foo23 CURSOR FOR
SELECT * FROM onek WHERE unique1 = 60;
QUERY: DECLARE foo24 CURSOR FOR
DECLARE foo24 CURSOR FOR
SELECT * FROM onek2 WHERE unique1 = 50;
QUERY: DECLARE foo25 CURSOR FOR
DECLARE foo25 CURSOR FOR
SELECT * FROM onek2 WHERE unique1 = 60;
QUERY: FETCH all in foo13;
FETCH all in foo13;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
50 | 253 | 0 | 2 | 0 | 10 | 0 | 50 | 50 | 50 | 50 | 0 | 1 | YBAAAA | TJAAAA | HHHHxx
(1 row)
QUERY: FETCH all in foo14;
FETCH all in foo14;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
51 | 76 | 1 | 3 | 1 | 11 | 1 | 51 | 51 | 51 | 51 | 2 | 3 | ZBAAAA | YCAAAA | AAAAxx
(1 row)
QUERY: FETCH all in foo15;
FETCH all in foo15;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
52 | 985 | 0 | 0 | 2 | 12 | 2 | 52 | 52 | 52 | 52 | 4 | 5 | ACAAAA | XLBAAA | HHHHxx
(1 row)
QUERY: FETCH all in foo16;
FETCH all in foo16;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
53 | 196 | 1 | 1 | 3 | 13 | 3 | 53 | 53 | 53 | 53 | 6 | 7 | BCAAAA | OHAAAA | AAAAxx
(1 row)
QUERY: FETCH all in foo17;
FETCH all in foo17;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
54 | 356 | 0 | 2 | 4 | 14 | 4 | 54 | 54 | 54 | 54 | 8 | 9 | CCAAAA | SNAAAA | AAAAxx
(1 row)
QUERY: FETCH all in foo18;
FETCH all in foo18;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
55 | 627 | 1 | 3 | 5 | 15 | 5 | 55 | 55 | 55 | 55 | 10 | 11 | DCAAAA | DYAAAA | VVVVxx
(1 row)
QUERY: FETCH all in foo19;
FETCH all in foo19;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
56 | 54 | 0 | 0 | 6 | 16 | 6 | 56 | 56 | 56 | 56 | 12 | 13 | ECAAAA | CCAAAA | OOOOxx
(1 row)
QUERY: FETCH all in foo20;
FETCH all in foo20;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
57 | 942 | 1 | 1 | 7 | 17 | 7 | 57 | 57 | 57 | 57 | 14 | 15 | FCAAAA | GKBAAA | OOOOxx
(1 row)
QUERY: FETCH all in foo21;
FETCH all in foo21;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
58 | 114 | 0 | 2 | 8 | 18 | 8 | 58 | 58 | 58 | 58 | 16 | 17 | GCAAAA | KEAAAA | OOOOxx
(1 row)
QUERY: FETCH all in foo22;
FETCH all in foo22;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
59 | 593 | 1 | 3 | 9 | 19 | 9 | 59 | 59 | 59 | 59 | 18 | 19 | HCAAAA | VWAAAA | HHHHxx
(1 row)
QUERY: FETCH all in foo23;
FETCH all in foo23;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
60 | 483 | 0 | 0 | 0 | 0 | 0 | 60 | 60 | 60 | 60 | 0 | 1 | ICAAAA | PSAAAA | VVVVxx
(1 row)
QUERY: FETCH all in foo24;
FETCH all in foo24;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
50 | 253 | 0 | 2 | 0 | 10 | 0 | 50 | 50 | 50 | 50 | 0 | 1 | YBAAAA | TJAAAA | HHHHxx
(1 row)
QUERY: FETCH all in foo25;
FETCH all in foo25;
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
60 | 483 | 0 | 0 | 0 | 0 | 0 | 60 | 60 | 60 | 60 | 0 | 1 | ICAAAA | PSAAAA | VVVVxx
(1 row)
QUERY: CLOSE foo13;
QUERY: CLOSE foo14;
QUERY: CLOSE foo15;
QUERY: CLOSE foo16;
QUERY: CLOSE foo17;
QUERY: CLOSE foo18;
QUERY: CLOSE foo19;
QUERY: CLOSE foo20;
QUERY: CLOSE foo21;
QUERY: CLOSE foo22;
QUERY: CLOSE foo23;
QUERY: CLOSE foo24;
QUERY: CLOSE foo25;
QUERY: END;
CLOSE foo13;
CLOSE foo14;
CLOSE foo15;
CLOSE foo16;
CLOSE foo17;
CLOSE foo18;
CLOSE foo19;
CLOSE foo20;
CLOSE foo21;
CLOSE foo22;
CLOSE foo23;
CLOSE foo24;
CLOSE foo25;
END;

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,10 @@
QUERY: SELECT * FROM street;
--
-- SELECT_VIEWS
-- test the views defined in CREATE_VIEWS
--
SELECT * FROM street;
name | thepath | cname
----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------
------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------
Access Rd 25 | [(-121.9283,37.894),(-121.9283,37.9)] | Oakland
Agua Fria Creek | [(-121.9254,37.922),(-121.9281,37.889)] | Oakland
Andrea Cir | [(-121.733218,37.88641),(-121.733286,37.90617)] | Oakland
@ -285,9 +289,9 @@ Taurus Ave |[(-122.2159,37.416),(-122.2128,37.389)]
98th Ave | [(-122.2001,37.258),(-122.1974,37.27)] | Lafayette
(282 rows)
QUERY: SELECT name, #thepath FROM iexit ORDER BY 1, 2;
SELECT name, #thepath FROM iexit ORDER BY 1, 2;
name | ?column?
----------------------------------+--------
------------------------------------+----------
I- 580 | 2
I- 580 | 2
I- 580 | 2
@ -1184,9 +1188,9 @@ I- 980 Ramp| 3
I- 980 Ramp | 7
(894 rows)
QUERY: SELECT * FROM toyemp WHERE name = 'sharon';
SELECT * FROM toyemp WHERE name = 'sharon';
name | age | location | annualsal
------+---+--------+---------
--------+-----+----------+-----------
sharon | 25 | (15,12) | 12000
(1 row)

View File

@ -1,29 +1,37 @@
QUERY: CREATE TABLE temptest(col int);
QUERY: CREATE INDEX i_temptest ON temptest(col);
QUERY: CREATE TEMP TABLE temptest(col int);
QUERY: CREATE INDEX i_temptest ON temptest(col);
QUERY: DROP INDEX i_temptest;
QUERY: DROP TABLE temptest;
QUERY: DROP INDEX i_temptest;
QUERY: DROP TABLE temptest;
QUERY: CREATE TABLE temptest(col int);
QUERY: INSERT INTO temptest VALUES (1);
QUERY: CREATE TEMP TABLE temptest(col int);
QUERY: INSERT INTO temptest VALUES (2);
QUERY: SELECT * FROM temptest;
--
-- TEMP
-- Test temp relations and indexes
--
-- test temp table/index masking
CREATE TABLE temptest(col int);
CREATE INDEX i_temptest ON temptest(col);
CREATE TEMP TABLE temptest(col int);
CREATE INDEX i_temptest ON temptest(col);
DROP INDEX i_temptest;
DROP TABLE temptest;
DROP INDEX i_temptest;
DROP TABLE temptest;
-- test temp table selects
CREATE TABLE temptest(col int);
INSERT INTO temptest VALUES (1);
CREATE TEMP TABLE temptest(col int);
INSERT INTO temptest VALUES (2);
SELECT * FROM temptest;
col
---
-----
2
(1 row)
QUERY: DROP TABLE temptest;
QUERY: SELECT * FROM temptest;
DROP TABLE temptest;
SELECT * FROM temptest;
col
---
-----
1
(1 row)
QUERY: DROP TABLE temptest;
QUERY: CREATE TEMP TABLE temptest(col int);
QUERY: SELECT * FROM temptest;
DROP TABLE temptest;
CREATE TEMP TABLE temptest(col int);
-- test temp table deletion
\c regression
SELECT * FROM temptest;
ERROR: Relation 'temptest' does not exist

View File

@ -1,32 +1,39 @@
QUERY: BEGIN;
QUERY: SELECT *
--
-- TRANSACTIONS
--
BEGIN;
SELECT *
INTO TABLE xacttest
FROM aggtest;
QUERY: INSERT INTO xacttest (a, b) VALUES (777, 777.777);
QUERY: END;
QUERY: SELECT a FROM xacttest WHERE a > 100;
INSERT INTO xacttest (a, b) VALUES (777, 777.777);
END;
-- should retrieve one value--
SELECT a FROM xacttest WHERE a > 100;
a
---
-----
777
(1 row)
QUERY: BEGIN;
QUERY: CREATE TABLE disappear (a int4);
QUERY: DELETE FROM aggtest;
QUERY: SELECT * FROM aggtest;
BEGIN;
CREATE TABLE disappear (a int4);
DELETE FROM aggtest;
-- should be empty
SELECT * FROM aggtest;
a | b
-+-
---+---
(0 rows)
QUERY: ABORT;
QUERY: SELECT oid FROM pg_class WHERE relname = 'disappear';
ABORT;
-- should not exist
SELECT oid FROM pg_class WHERE relname = 'disappear';
oid
---
-----
(0 rows)
QUERY: SELECT * FROM aggtest;
-- should have members again
SELECT * FROM aggtest;
a | b
---+-------
-----+---------
56 | 7.8
100 | 99.097
0 | 0.09561