You can subscribe to this list here.
2010 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(28) |
Jun
(12) |
Jul
(11) |
Aug
(12) |
Sep
(5) |
Oct
(19) |
Nov
(14) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
(18) |
Feb
(30) |
Mar
(115) |
Apr
(89) |
May
(50) |
Jun
(44) |
Jul
(22) |
Aug
(13) |
Sep
(11) |
Oct
(30) |
Nov
(28) |
Dec
(39) |
2012 |
Jan
(38) |
Feb
(18) |
Mar
(43) |
Apr
(91) |
May
(108) |
Jun
(46) |
Jul
(37) |
Aug
(44) |
Sep
(33) |
Oct
(29) |
Nov
(36) |
Dec
(15) |
2013 |
Jan
(35) |
Feb
(611) |
Mar
(5) |
Apr
(55) |
May
(30) |
Jun
(28) |
Jul
(458) |
Aug
(34) |
Sep
(9) |
Oct
(39) |
Nov
(22) |
Dec
(32) |
2014 |
Jan
(16) |
Feb
(16) |
Mar
(42) |
Apr
(179) |
May
(7) |
Jun
(6) |
Jul
(9) |
Aug
|
Sep
(4) |
Oct
|
Nov
(3) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
1
(3) |
2
(5) |
3
|
4
(4) |
5
|
6
|
7
(7) |
8
(10) |
9
(6) |
10
(5) |
11
(1) |
12
|
13
|
14
|
15
|
16
|
17
(4) |
18
(1) |
19
|
20
|
21
(5) |
22
(15) |
23
(18) |
24
(7) |
25
(4) |
26
|
27
|
28
(3) |
29
(2) |
30
(11) |
31
(4) |
|
|
From: Michael P. <mic...@us...> - 2011-03-23 14:25:33
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via 6fd26e495ab4f8503042d0cb92aa1fae1c9a4342 (commit) from d759db01c235ccce001e86fbc7e6c211d63cb489 (commit) - Log ----------------------------------------------------------------- commit 6fd26e495ab4f8503042d0cb92aa1fae1c9a4342 Author: Michael P <mic...@us...> Date: Wed Mar 23 23:24:01 2011 +0900 Fix for regression test select_into onek2 is a table having 2 parents and Postgres-XC does not allow it, and tmp1 is a table create with INTO clause, also not supported, so this output is correct. diff --git a/src/test/regress/expected/select_into_1.out b/src/test/regress/expected/select_into_1.out new file mode 100644 index 0000000..3ef82f6 --- /dev/null +++ b/src/test/regress/expected/select_into_1.out @@ -0,0 +1,19 @@ +-- +-- SELECT_INTO +-- +SELECT * + INTO TABLE tmp1 + FROM onek + WHERE onek.unique1 < 2; +ERROR: INTO clause not yet supported +DROP TABLE tmp1; +ERROR: table "tmp1" does not exist +SELECT * + INTO TABLE tmp1 + FROM onek2 + WHERE onek2.unique1 < 2; +ERROR: relation "onek2" does not exist +LINE 3: FROM onek2 + ^ +DROP TABLE tmp1; +ERROR: table "tmp1" does not exist ----------------------------------------------------------------------- Summary of changes: src/test/regress/expected/select_into_1.out | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) create mode 100644 src/test/regress/expected/select_into_1.out hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-23 13:25:02
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via d759db01c235ccce001e86fbc7e6c211d63cb489 (commit) from 829cc54f2997a28979812ea057b084a4c3d5e8e9 (commit) - Log ----------------------------------------------------------------- commit d759db01c235ccce001e86fbc7e6c211d63cb489 Author: Michael P <mic...@us...> Date: Wed Mar 23 22:24:16 2011 +0900 Fix for regression test returning Error message for SERIAL tables has changed. diff --git a/src/test/regress/expected/returning_1.out b/src/test/regress/expected/returning_1.out index 42be497..c620a6a 100644 --- a/src/test/regress/expected/returning_1.out +++ b/src/test/regress/expected/returning_1.out @@ -3,8 +3,8 @@ -- -- Simple cases CREATE TEMP TABLE foo (f1 serial, f2 text, f3 int default 42); -NOTICE: CREATE TABLE will create implicit sequence "foo_f1_seq" for serial column "foo.f1" -ERROR: PG-XC does not yet support temporary tables +ERROR: Postgres-XC does not support SERIAL yet +DETAIL: The feature is not currently supported INSERT INTO foo (f2,f3) VALUES ('test', DEFAULT), ('More', 11), (upper('more'), 7+9) RETURNING *, f1+f3 AS sum; ----------------------------------------------------------------------- Summary of changes: src/test/regress/expected/returning_1.out | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-23 13:22:36
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via 829cc54f2997a28979812ea057b084a4c3d5e8e9 (commit) from c46b3fd73fb59f81f7887365c3399a1abd77f6b3 (commit) - Log ----------------------------------------------------------------- commit 829cc54f2997a28979812ea057b084a4c3d5e8e9 Author: Michael P <mic...@us...> Date: Wed Mar 23 22:20:52 2011 +0900 Fix for regression test rowtypes SERIAL tables and TEMP tables are not supported yet by Postgres-XC, so this output is correct. diff --git a/src/test/regress/expected/rowtypes_1.out b/src/test/regress/expected/rowtypes_1.out new file mode 100644 index 0000000..a6e532a --- /dev/null +++ b/src/test/regress/expected/rowtypes_1.out @@ -0,0 +1,323 @@ +-- +-- ROWTYPES +-- +-- Make both a standalone composite type and a table rowtype +create type complex as (r float8, i float8); +create temp table fullname (first text, last text); +ERROR: PG-XC does not yet support temporary tables +-- Nested composite +create type quad as (c1 complex, c2 complex); +-- Some simple tests of I/O conversions and row construction +select (1.1,2.2)::complex, row((3.3,4.4),(5.5,null))::quad; + row | row +-----------+------------------------ + (1.1,2.2) | ("(3.3,4.4)","(5.5,)") +(1 row) + +select row('Joe', 'Blow')::fullname, '(Joe,Blow)'::fullname; +ERROR: type "fullname" does not exist +LINE 1: select row('Joe', 'Blow')::fullname, '(Joe,Blow)'::fullname; + ^ +select '(Joe,von Blow)'::fullname, '(Joe,d''Blow)'::fullname; +ERROR: type "fullname" does not exist +LINE 1: select '(Joe,von Blow)'::fullname, '(Joe,d''Blow)'::fullname... + ^ +select '(Joe,"von""Blow")'::fullname, E'(Joe,d\\\\Blow)'::fullname; +ERROR: type "fullname" does not exist +LINE 1: select '(Joe,"von""Blow")'::fullname, E'(Joe,d\\\\Blow)'::fu... + ^ +select '(Joe,"Blow,Jr")'::fullname; +ERROR: type "fullname" does not exist +LINE 1: select '(Joe,"Blow,Jr")'::fullname; + ^ +select '(Joe,)'::fullname; -- ok, null 2nd column +ERROR: type "fullname" does not exist +LINE 1: select '(Joe,)'::fullname; + ^ +select '(Joe)'::fullname; -- bad +ERROR: type "fullname" does not exist +LINE 1: select '(Joe)'::fullname; + ^ +select '(Joe,,)'::fullname; -- bad +ERROR: type "fullname" does not exist +LINE 1: select '(Joe,,)'::fullname; + ^ +create temp table quadtable(f1 int, q quad); +ERROR: PG-XC does not yet support temporary tables +insert into quadtable values (1, ((3.3,4.4),(5.5,6.6))); +ERROR: relation "quadtable" does not exist +LINE 1: insert into quadtable values (1, ((3.3,4.4),(5.5,6.6))); + ^ +insert into quadtable values (2, ((null,4.4),(5.5,6.6))); +ERROR: relation "quadtable" does not exist +LINE 1: insert into quadtable values (2, ((null,4.4),(5.5,6.6))); + ^ +select * from quadtable order by f1, q; +ERROR: relation "quadtable" does not exist +LINE 1: select * from quadtable order by f1, q; + ^ +select f1, q.c1 from quadtable; -- fails, q is a table reference +ERROR: relation "quadtable" does not exist +LINE 1: select f1, q.c1 from quadtable; + ^ +select f1, (q).c1, (qq.q).c1.i from quadtable qq order by 1; +ERROR: relation "quadtable" does not exist +LINE 1: select f1, (q).c1, (qq.q).c1.i from quadtable qq order by 1; + ^ +create temp table people (fn fullname, bd date); +ERROR: type "fullname" does not exist +LINE 1: create temp table people (fn fullname, bd date); + ^ +insert into people values ('(Joe,Blow)', '1984-01-10'); +ERROR: relation "people" does not exist +LINE 1: insert into people values ('(Joe,Blow)', '1984-01-10'); + ^ +select * from people; +ERROR: relation "people" does not exist +LINE 1: select * from people; + ^ +-- at the moment this will not work due to ALTER TABLE inadequacy: +alter table fullname add column suffix text default ''; +ERROR: relation "fullname" does not exist +-- but this should work: +alter table fullname add column suffix text default null; +ERROR: relation "fullname" does not exist +select * from people; +ERROR: relation "people" does not exist +LINE 1: select * from people; + ^ +-- test insertion/updating of subfields +update people set fn.suffix = 'Jr'; +ERROR: relation "people" does not exist +LINE 1: update people set fn.suffix = 'Jr'; + ^ +select * from people; +ERROR: relation "people" does not exist +LINE 1: select * from people; + ^ +insert into quadtable (f1, q.c1.r, q.c2.i) values(44,55,66); +ERROR: relation "quadtable" does not exist +LINE 1: insert into quadtable (f1, q.c1.r, q.c2.i) values(44,55,66); + ^ +select * from quadtable order by f1, q; +ERROR: relation "quadtable" does not exist +LINE 1: select * from quadtable order by f1, q; + ^ +-- The object here is to ensure that toasted references inside +-- composite values don't cause problems. The large f1 value will +-- be toasted inside pp, it must still work after being copied to people. +create temp table pp (f1 text); +ERROR: PG-XC does not yet support temporary tables +insert into pp values (repeat('abcdefghijkl', 100000)); +ERROR: relation "pp" does not exist +LINE 1: insert into pp values (repeat('abcdefghijkl', 100000)); + ^ +insert into people select ('Jim', f1, null)::fullname, current_date from pp; +ERROR: relation "people" does not exist +LINE 1: insert into people select ('Jim', f1, null)::fullname, curre... + ^ +select (fn).first, substr((fn).last, 1, 20), length((fn).last) from people order by 1, 2; +ERROR: relation "people" does not exist +LINE 1: ... substr((fn).last, 1, 20), length((fn).last) from people ord... + ^ +-- Test row comparison semantics. Prior to PG 8.2 we did this in a totally +-- non-spec-compliant way. +select ROW(1,2) < ROW(1,3) as true; + true +------ + t +(1 row) + +select ROW(1,2) < ROW(1,1) as false; + false +------- + f +(1 row) + +select ROW(1,2) < ROW(1,NULL) as null; + null +------ + +(1 row) + +select ROW(1,2,3) < ROW(1,3,NULL) as true; -- the NULL is not examined + true +------ + t +(1 row) + +select ROW(11,'ABC') < ROW(11,'DEF') as true; + true +------ + t +(1 row) + +select ROW(11,'ABC') > ROW(11,'DEF') as false; + false +------- + f +(1 row) + +select ROW(12,'ABC') > ROW(11,'DEF') as true; + true +------ + t +(1 row) + +-- = and <> have different NULL-behavior than < etc +select ROW(1,2,3) < ROW(1,NULL,4) as null; + null +------ + +(1 row) + +select ROW(1,2,3) = ROW(1,NULL,4) as false; + false +------- + f +(1 row) + +select ROW(1,2,3) <> ROW(1,NULL,4) as true; + true +------ + t +(1 row) + +-- We allow operators beyond the six standard ones, if they have btree +-- operator classes. +select ROW('ABC','DEF') ~<=~ ROW('DEF','ABC') as true; + true +------ + t +(1 row) + +select ROW('ABC','DEF') ~>=~ ROW('DEF','ABC') as false; + false +------- + f +(1 row) + +select ROW('ABC','DEF') ~~ ROW('DEF','ABC') as fail; +ERROR: could not determine interpretation of row comparison operator ~~ +LINE 1: select ROW('ABC','DEF') ~~ ROW('DEF','ABC') as fail; + ^ +HINT: Row comparison operators must be associated with btree operator families. +-- Check row comparison with a subselect +select unique1, unique2 from tenk1 +where (unique1, unique2) < any (select ten, ten from tenk1 where hundred < 3) + and unique1 <= 20 +order by 1; + unique1 | unique2 +---------+--------- + 0 | 9998 + 1 | 2838 +(2 rows) + +-- Also check row comparison with an indexable condition +select thousand, tenthous from tenk1 +where (thousand, tenthous) >= (997, 5000) +order by thousand, tenthous; + thousand | tenthous +----------+---------- + 997 | 5997 + 997 | 6997 + 997 | 7997 + 997 | 8997 + 997 | 9997 + 998 | 998 + 998 | 1998 + 998 | 2998 + 998 | 3998 + 998 | 4998 + 998 | 5998 + 998 | 6998 + 998 | 7998 + 998 | 8998 + 998 | 9998 + 999 | 999 + 999 | 1999 + 999 | 2999 + 999 | 3999 + 999 | 4999 + 999 | 5999 + 999 | 6999 + 999 | 7999 + 999 | 8999 + 999 | 9999 +(25 rows) + +-- Check some corner cases involving empty rowtypes +select ROW(); + row +----- + () +(1 row) + +select ROW() IS NULL; + ?column? +---------- + t +(1 row) + +select ROW() = ROW(); +ERROR: cannot compare rows of zero length +LINE 1: select ROW() = ROW(); + ^ +-- Check ability to create arrays of anonymous rowtypes +select array[ row(1,2), row(3,4), row(5,6) ]; + array +--------------------------- + {"(1,2)","(3,4)","(5,6)"} +(1 row) + +-- Check ability to compare an anonymous row to elements of an array +select row(1,1.1) = any (array[ row(7,7.7), row(1,1.1), row(0,0.0) ]); + ?column? +---------- + t +(1 row) + +select row(1,1.1) = any (array[ row(7,7.7), row(1,1.0), row(0,0.0) ]); + ?column? +---------- + f +(1 row) + +-- +-- Test case derived from bug #5716: check multiple uses of a rowtype result +-- +BEGIN; +CREATE TABLE price ( + id SERIAL PRIMARY KEY, + active BOOLEAN NOT NULL, + price NUMERIC +); +ERROR: Postgres-XC does not support SERIAL yet +DETAIL: The feature is not currently supported +CREATE TYPE price_input AS ( + id INTEGER, + price NUMERIC +); +ERROR: current transaction is aborted, commands ignored until end of transaction block +CREATE TYPE price_key AS ( + id INTEGER +); +ERROR: current transaction is aborted, commands ignored until end of transaction block +CREATE FUNCTION price_key_from_table(price) RETURNS price_key AS $$ + SELECT $1.id +$$ LANGUAGE SQL; +ERROR: current transaction is aborted, commands ignored until end of transaction block +CREATE FUNCTION price_key_from_input(price_input) RETURNS price_key AS $$ + SELECT $1.id +$$ LANGUAGE SQL; +ERROR: current transaction is aborted, commands ignored until end of transaction block +insert into price values (1,false,42), (10,false,100), (11,true,17.99); +ERROR: current transaction is aborted, commands ignored until end of transaction block +UPDATE price + SET active = true, price = input_prices.price + FROM unnest(ARRAY[(10, 123.00), (11, 99.99)]::price_input[]) input_prices + WHERE price_key_from_table(price.*) = price_key_from_input(input_prices.*); +ERROR: current transaction is aborted, commands ignored until end of transaction block +select * from price; +ERROR: current transaction is aborted, commands ignored until end of transaction block +rollback; ----------------------------------------------------------------------- Summary of changes: .../expected/{rowtypes.out => rowtypes_1.out} | 163 ++++++++++---------- 1 files changed, 80 insertions(+), 83 deletions(-) copy src/test/regress/expected/{rowtypes.out => rowtypes_1.out} (63%) hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-23 10:44:05
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via c46b3fd73fb59f81f7887365c3399a1abd77f6b3 (commit) from 2b2cc8ef94673ee9d68c6b36cd940c98b0960273 (commit) - Log ----------------------------------------------------------------- commit c46b3fd73fb59f81f7887365c3399a1abd77f6b3 Author: Michael P <mic...@us...> Date: Wed Mar 23 19:43:11 2011 +0900 Fix for regression test dependency SERIAL table is not supported yet by Postgres-XC, so this output is correct. diff --git a/src/test/regress/expected/dependency_1.out b/src/test/regress/expected/dependency_1.out new file mode 100644 index 0000000..ecf687d --- /dev/null +++ b/src/test/regress/expected/dependency_1.out @@ -0,0 +1,126 @@ +-- +-- DEPENDENCIES +-- +CREATE USER regression_user; +CREATE USER regression_user2; +CREATE USER regression_user3; +CREATE GROUP regression_group; +CREATE TABLE deptest (f1 serial primary key, f2 text); +ERROR: Postgres-XC does not support SERIAL yet +DETAIL: The feature is not currently supported +GRANT SELECT ON TABLE deptest TO GROUP regression_group; +ERROR: relation "deptest" does not exist +GRANT ALL ON TABLE deptest TO regression_user, regression_user2; +ERROR: relation "deptest" does not exist +-- can't drop neither because they have privileges somewhere +DROP USER regression_user; +DROP GROUP regression_group; +-- if we revoke the privileges we can drop the group +REVOKE SELECT ON deptest FROM GROUP regression_group; +ERROR: relation "deptest" does not exist +DROP GROUP regression_group; +ERROR: role "regression_group" does not exist +-- can't drop the user if we revoke the privileges partially +REVOKE SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES ON deptest FROM regression_user; +ERROR: relation "deptest" does not exist +DROP USER regression_user; +ERROR: role "regression_user" does not exist +-- now we are OK to drop him +REVOKE TRIGGER ON deptest FROM regression_user; +ERROR: relation "deptest" does not exist +DROP USER regression_user; +ERROR: role "regression_user" does not exist +-- we are OK too if we drop the privileges all at once +REVOKE ALL ON deptest FROM regression_user2; +ERROR: relation "deptest" does not exist +DROP USER regression_user2; +-- can't drop the owner of an object +-- the error message detail here would include a pg_toast_nnn name that +-- is not constant, so suppress it +\set VERBOSITY terse +ALTER TABLE deptest OWNER TO regression_user3; +ERROR: relation "deptest" does not exist +DROP USER regression_user3; +\set VERBOSITY default +-- if we drop the object, we can drop the user too +DROP TABLE deptest; +ERROR: table "deptest" does not exist +DROP USER regression_user3; +ERROR: role "regression_user3" does not exist +-- Test DROP OWNED +CREATE USER regression_user0; +CREATE USER regression_user1; +CREATE USER regression_user2; +SET SESSION AUTHORIZATION regression_user0; +-- permission denied +DROP OWNED BY regression_user1; +ERROR: permission denied to drop objects +DROP OWNED BY regression_user0, regression_user2; +ERROR: permission denied to drop objects +REASSIGN OWNED BY regression_user0 TO regression_user1; +ERROR: permission denied to reassign objects +REASSIGN OWNED BY regression_user1 TO regression_user0; +ERROR: permission denied to reassign objects +-- this one is allowed +DROP OWNED BY regression_user0; +CREATE TABLE deptest1 (f1 int unique); +NOTICE: CREATE TABLE / UNIQUE will create implicit index "deptest1_f1_key" for table "deptest1" +GRANT ALL ON deptest1 TO regression_user1 WITH GRANT OPTION; +SET SESSION AUTHORIZATION regression_user1; +CREATE TABLE deptest (a serial primary key, b text); +ERROR: Postgres-XC does not support SERIAL yet +DETAIL: The feature is not currently supported +GRANT ALL ON deptest1 TO regression_user2; +RESET SESSION AUTHORIZATION; +\z deptest1 + Access privileges + Schema | Name | Type | Access privileges | Column access privileges +--------+----------+-------+--------------------------------------------------+-------------------------- + public | deptest1 | table | regression_user0=arwdDxt/regression_user0 +| + | | | regression_user1=a*r*w*d*D*x*t*/regression_user0+| + | | | regression_user2=arwdDxt/regression_user1 | +(1 row) + +DROP OWNED BY regression_user1; +-- all grants revoked +\z deptest1 + Access privileges + Schema | Name | Type | Access privileges | Column access privileges +--------+----------+-------+-------------------------------------------+-------------------------- + public | deptest1 | table | regression_user0=arwdDxt/regression_user0 | +(1 row) + +-- table was dropped +\d deptest +-- Test REASSIGN OWNED +GRANT ALL ON deptest1 TO regression_user1; +SET SESSION AUTHORIZATION regression_user1; +CREATE TABLE deptest (a serial primary key, b text); +ERROR: Postgres-XC does not support SERIAL yet +DETAIL: The feature is not currently supported +CREATE TABLE deptest2 (f1 int); +-- make a serial column the hard way +CREATE SEQUENCE ss1; +ALTER TABLE deptest2 ALTER f1 SET DEFAULT nextval('ss1'); +ERROR: relation "ss1" does not exist +ALTER SEQUENCE ss1 OWNED BY deptest2.f1; +RESET SESSION AUTHORIZATION; +REASSIGN OWNED BY regression_user1 TO regression_user2; +\dt deptest + List of relations + Schema | Name | Type | Owner +--------+------+------+------- +(0 rows) + +-- doesn't work: grant still exists +DROP USER regression_user1; +ERROR: role "regression_user1" cannot be dropped because some objects depend on it +DETAIL: privileges for table deptest1 +DROP OWNED BY regression_user1; +DROP USER regression_user1; +\set VERBOSITY terse +DROP USER regression_user2; +ERROR: role "regression_user2" cannot be dropped because some objects depend on it +DROP OWNED BY regression_user2, regression_user0; +DROP USER regression_user2; +DROP USER regression_user0; ----------------------------------------------------------------------- Summary of changes: .../expected/{dependency.out => dependency_1.out} | 41 +++++++++++--------- 1 files changed, 23 insertions(+), 18 deletions(-) copy src/test/regress/expected/{dependency.out => dependency_1.out} (77%) hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-23 10:38:30
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via 2b2cc8ef94673ee9d68c6b36cd940c98b0960273 (commit) from 6b7c2fee9839c195d5d19be2d1e8457b7125fbd7 (commit) - Log ----------------------------------------------------------------- commit 2b2cc8ef94673ee9d68c6b36cd940c98b0960273 Author: Michael P <mic...@us...> Date: Wed Mar 23 19:37:34 2011 +0900 Fix for regression test cluster SERIAL table is not supported yet in Postgres-XC, so this output is correct. diff --git a/src/test/regress/expected/cluster_1.out b/src/test/regress/expected/cluster_1.out new file mode 100644 index 0000000..71eca00 --- /dev/null +++ b/src/test/regress/expected/cluster_1.out @@ -0,0 +1,395 @@ +-- +-- CLUSTER +-- +CREATE TABLE clstr_tst_s (rf_a SERIAL PRIMARY KEY, + b INT); +ERROR: Postgres-XC does not support SERIAL yet +DETAIL: The feature is not currently supported +CREATE TABLE clstr_tst (a SERIAL PRIMARY KEY, + b INT, + c TEXT, + d TEXT, + CONSTRAINT clstr_tst_con FOREIGN KEY (b) REFERENCES clstr_tst_s); +ERROR: Postgres-XC does not support SERIAL yet +DETAIL: The feature is not currently supported +CREATE INDEX clstr_tst_b ON clstr_tst (b); +ERROR: relation "clstr_tst" does not exist +CREATE INDEX clstr_tst_c ON clstr_tst (c); +ERROR: relation "clstr_tst" does not exist +CREATE INDEX clstr_tst_c_b ON clstr_tst (c,b); +ERROR: relation "clstr_tst" does not exist +CREATE INDEX clstr_tst_b_c ON clstr_tst (b,c); +ERROR: relation "clstr_tst" does not exist +INSERT INTO clstr_tst_s (b) VALUES (0); +ERROR: relation "clstr_tst_s" does not exist +LINE 1: INSERT INTO clstr_tst_s (b) VALUES (0); + ^ +INSERT INTO clstr_tst_s (b) SELECT b FROM clstr_tst_s; +ERROR: relation "clstr_tst_s" does not exist +LINE 1: INSERT INTO clstr_tst_s (b) SELECT b FROM clstr_tst_s; + ^ +INSERT INTO clstr_tst_s (b) SELECT b FROM clstr_tst_s; +ERROR: relation "clstr_tst_s" does not exist +LINE 1: INSERT INTO clstr_tst_s (b) SELECT b FROM clstr_tst_s; + ^ +INSERT INTO clstr_tst_s (b) SELECT b FROM clstr_tst_s; +ERROR: relation "clstr_tst_s" does not exist +LINE 1: INSERT INTO clstr_tst_s (b) SELECT b FROM clstr_tst_s; + ^ +INSERT INTO clstr_tst_s (b) SELECT b FROM clstr_tst_s; +ERROR: relation "clstr_tst_s" does not exist +LINE 1: INSERT INTO clstr_tst_s (b) SELECT b FROM clstr_tst_s; + ^ +INSERT INTO clstr_tst_s (b) SELECT b FROM clstr_tst_s; +ERROR: relation "clstr_tst_s" does not exist +LINE 1: INSERT INTO clstr_tst_s (b) SELECT b FROM clstr_tst_s; + ^ +CREATE TABLE clstr_tst_inh () INHERITS (clstr_tst); +ERROR: relation "clstr_tst" does not exist +INSERT INTO clstr_tst (b, c) VALUES (11, 'once'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (11, 'once'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (10, 'diez'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (10, 'diez'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (31, 'treinta y uno'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (31, 'treinta y uno'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (22, 'veintidos'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (22, 'veintidos'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (3, 'tres'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (3, 'tres'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (20, 'veinte'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (20, 'veinte'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (23, 'veintitres'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (23, 'veintitres'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (21, 'veintiuno'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (21, 'veintiuno'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (4, 'cuatro'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (4, 'cuatro'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (14, 'catorce'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (14, 'catorce'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (2, 'dos'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (2, 'dos'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (18, 'dieciocho'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (18, 'dieciocho'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (27, 'veintisiete'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (27, 'veintisiete'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (25, 'veinticinco'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (25, 'veinticinco'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (13, 'trece'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (13, 'trece'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (28, 'veintiocho'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (28, 'veintiocho'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (32, 'treinta y dos'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (32, 'treinta y dos'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (5, 'cinco'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (5, 'cinco'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (29, 'veintinueve'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (29, 'veintinueve'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (1, 'uno'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (1, 'uno'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (24, 'veinticuatro'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (24, 'veinticuatro'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (30, 'treinta'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (30, 'treinta'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (12, 'doce'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (12, 'doce'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (17, 'diecisiete'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (17, 'diecisiete'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (9, 'nueve'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (9, 'nueve'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (19, 'diecinueve'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (19, 'diecinueve'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (26, 'veintiseis'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (26, 'veintiseis'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (15, 'quince'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (15, 'quince'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (7, 'siete'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (7, 'siete'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (16, 'dieciseis'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (16, 'dieciseis'); + ^ +INSERT INTO clstr_tst (b, c) VALUES (8, 'ocho'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (8, 'ocho'); + ^ +-- This entry is needed to test that TOASTED values are copied correctly. +INSERT INTO clstr_tst (b, c, d) VALUES (6, 'seis', repeat('xyzzy', 100000)); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c, d) VALUES (6, 'seis', repeat('x... + ^ +CLUSTER clstr_tst_c ON clstr_tst; +ERROR: relation "clstr_tst" does not exist +SELECT a,b,c,substring(d for 30), length(d) from clstr_tst ORDER BY a, b, c; +ERROR: relation "clstr_tst" does not exist +LINE 1: SELECT a,b,c,substring(d for 30), length(d) from clstr_tst O... + ^ +SELECT a,b,c,substring(d for 30), length(d) from clstr_tst ORDER BY a; +ERROR: relation "clstr_tst" does not exist +LINE 1: SELECT a,b,c,substring(d for 30), length(d) from clstr_tst O... + ^ +SELECT a,b,c,substring(d for 30), length(d) from clstr_tst ORDER BY b; +ERROR: relation "clstr_tst" does not exist +LINE 1: SELECT a,b,c,substring(d for 30), length(d) from clstr_tst O... + ^ +SELECT a,b,c,substring(d for 30), length(d) from clstr_tst ORDER BY c; +ERROR: relation "clstr_tst" does not exist +LINE 1: SELECT a,b,c,substring(d for 30), length(d) from clstr_tst O... + ^ +-- Verify that inheritance link still works +INSERT INTO clstr_tst_inh VALUES (0, 100, 'in child table'); +ERROR: relation "clstr_tst_inh" does not exist +LINE 1: INSERT INTO clstr_tst_inh VALUES (0, 100, 'in child table'); + ^ +SELECT a,b,c,substring(d for 30), length(d) from clstr_tst ORDER BY a, b, c; +ERROR: relation "clstr_tst" does not exist +LINE 1: SELECT a,b,c,substring(d for 30), length(d) from clstr_tst O... + ^ +-- Verify that foreign key link still works +INSERT INTO clstr_tst (b, c) VALUES (1111, 'this should fail'); +ERROR: relation "clstr_tst" does not exist +LINE 1: INSERT INTO clstr_tst (b, c) VALUES (1111, 'this should fail... + ^ +SELECT conname FROM pg_constraint WHERE conrelid = 'clstr_tst'::regclass +ORDER BY 1; +ERROR: relation "clstr_tst" does not exist +LINE 1: ...ELECT conname FROM pg_constraint WHERE conrelid = 'clstr_tst... + ^ +SELECT relname, relkind, + EXISTS(SELECT 1 FROM pg_class WHERE oid = c.reltoastrelid) AS hastoast +FROM pg_class c WHERE relname LIKE 'clstr_tst%' ORDER BY relname; + relname | relkind | hastoast +---------+---------+---------- +(0 rows) + +-- Verify that indisclustered is correctly set +SELECT pg_class.relname FROM pg_index, pg_class, pg_class AS pg_class_2 +WHERE pg_class.oid=indexrelid + AND indrelid=pg_class_2.oid + AND pg_class_2.relname = 'clstr_tst' + AND indisclustered; + relname +--------- +(0 rows) + +-- Try changing indisclustered +ALTER TABLE clstr_tst CLUSTER ON clstr_tst_b_c; +ERROR: relation "clstr_tst" does not exist +SELECT pg_class.relname FROM pg_index, pg_class, pg_class AS pg_class_2 +WHERE pg_class.oid=indexrelid + AND indrelid=pg_class_2.oid + AND pg_class_2.relname = 'clstr_tst' + AND indisclustered; + relname +--------- +(0 rows) + +-- Try turning off all clustering +ALTER TABLE clstr_tst SET WITHOUT CLUSTER; +ERROR: relation "clstr_tst" does not exist +SELECT pg_class.relname FROM pg_index, pg_class, pg_class AS pg_class_2 +WHERE pg_class.oid=indexrelid + AND indrelid=pg_class_2.oid + AND pg_class_2.relname = 'clstr_tst' + AND indisclustered; + relname +--------- +(0 rows) + +-- Verify that clustering all tables does in fact cluster the right ones +CREATE USER clstr_user; +CREATE TABLE clstr_1 (a INT PRIMARY KEY); +NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "clstr_1_pkey" for table "clstr_1" +CREATE TABLE clstr_2 (a INT PRIMARY KEY); +NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "clstr_2_pkey" for table "clstr_2" +CREATE TABLE clstr_3 (a INT PRIMARY KEY); +NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "clstr_3_pkey" for table "clstr_3" +ALTER TABLE clstr_1 OWNER TO clstr_user; +ALTER TABLE clstr_3 OWNER TO clstr_user; +GRANT SELECT ON clstr_2 TO clstr_user; +INSERT INTO clstr_1 VALUES (2); +INSERT INTO clstr_1 VALUES (1); +INSERT INTO clstr_2 VALUES (2); +INSERT INTO clstr_2 VALUES (1); +INSERT INTO clstr_3 VALUES (2); +INSERT INTO clstr_3 VALUES (1); +-- "CLUSTER <tablename>" on a table that hasn't been clustered +CLUSTER clstr_2; +ERROR: there is no previously clustered index for table "clstr_2" +CLUSTER clstr_1_pkey ON clstr_1; +CLUSTER clstr_2 USING clstr_2_pkey; +SELECT * FROM clstr_1 UNION ALL + SELECT * FROM clstr_2 UNION ALL + SELECT * FROM clstr_3 + ORDER BY 1; + a +--- + 1 + 1 + 1 + 2 + 2 + 2 +(6 rows) + +-- revert to the original state +DELETE FROM clstr_1; +DELETE FROM clstr_2; +DELETE FROM clstr_3; +INSERT INTO clstr_1 VALUES (2); +INSERT INTO clstr_1 VALUES (1); +INSERT INTO clstr_2 VALUES (2); +INSERT INTO clstr_2 VALUES (1); +INSERT INTO clstr_3 VALUES (2); +INSERT INTO clstr_3 VALUES (1); +-- this user can only cluster clstr_1 and clstr_3, but the latter +-- has not been clustered +SET SESSION AUTHORIZATION clstr_user; +CLUSTER; +SELECT * FROM clstr_1 UNION ALL + SELECT * FROM clstr_2 UNION ALL + SELECT * FROM clstr_3 + ORDER BY 1; + a +--- + 1 + 1 + 1 + 2 + 2 + 2 +(6 rows) + +-- cluster a single table using the indisclustered bit previously set +DELETE FROM clstr_1; +INSERT INTO clstr_1 VALUES (2); +INSERT INTO clstr_1 VALUES (1); +CLUSTER clstr_1; +SELECT * FROM clstr_1 +ORDER BY 1; + a +--- + 1 + 2 +(2 rows) + +-- Test MVCC-safety of cluster. There isn't much we can do to verify the +-- results with a single backend... +CREATE TABLE clustertest (key int PRIMARY KEY); +NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "clustertest_pkey" for table "clustertest" +INSERT INTO clustertest VALUES (10); +INSERT INTO clustertest VALUES (20); +INSERT INTO clustertest VALUES (30); +INSERT INTO clustertest VALUES (40); +INSERT INTO clustertest VALUES (50); +-- Use a transaction so that updates are not committed when CLUSTER sees 'em +BEGIN; +-- Test update where the old row version is found first in the scan +UPDATE clustertest SET key = 100 WHERE key = 10; +ERROR: Partition column can't be updated in current version +-- Test update where the new row version is found first in the scan +UPDATE clustertest SET key = 35 WHERE key = 40; +ERROR: current transaction is aborted, commands ignored until end of transaction block +-- Test longer update chain +UPDATE clustertest SET key = 60 WHERE key = 50; +ERROR: current transaction is aborted, commands ignored until end of transaction block +UPDATE clustertest SET key = 70 WHERE key = 60; +ERROR: current transaction is aborted, commands ignored until end of transaction block +UPDATE clustertest SET key = 80 WHERE key = 70; +ERROR: current transaction is aborted, commands ignored until end of transaction block +SELECT * FROM clustertest ORDER BY 1; +ERROR: current transaction is aborted, commands ignored until end of transaction block +CLUSTER clustertest_pkey ON clustertest; +ERROR: current transaction is aborted, commands ignored until end of transaction block +SELECT * FROM clustertest ORDER BY 1; +ERROR: current transaction is aborted, commands ignored until end of transaction block +COMMIT; +SELECT * FROM clustertest ORDER BY 1; + key +----- + 10 + 20 + 30 + 40 + 50 +(5 rows) + +-- check that temp tables can be clustered +create temp table clstr_temp (col1 int primary key, col2 text); +ERROR: PG-XC does not yet support temporary tables +insert into clstr_temp values (2, 'two'), (1, 'one'); +ERROR: relation "clstr_temp" does not exist +LINE 1: insert into clstr_temp values (2, 'two'), (1, 'one'); + ^ +cluster clstr_temp using clstr_temp_pkey; +ERROR: relation "clstr_temp" does not exist +select * from clstr_temp ORDER BY 1; +ERROR: relation "clstr_temp" does not exist +LINE 1: select * from clstr_temp ORDER BY 1; + ^ +drop table clstr_temp; +ERROR: table "clstr_temp" does not exist +-- clean up +\c - +DROP TABLE clustertest; +DROP TABLE clstr_1; +DROP TABLE clstr_2; +DROP TABLE clstr_3; +DROP USER clstr_user; ----------------------------------------------------------------------- Summary of changes: src/test/regress/expected/cluster_1.out | 395 +++++++++++++++++++++++++++++++ 1 files changed, 395 insertions(+), 0 deletions(-) create mode 100644 src/test/regress/expected/cluster_1.out hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-23 10:35:04
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via 6b7c2fee9839c195d5d19be2d1e8457b7125fbd7 (commit) from 0c8315711375436158ddf9cc5950582a864deb67 (commit) - Log ----------------------------------------------------------------- commit 6b7c2fee9839c195d5d19be2d1e8457b7125fbd7 Author: Michael P <mic...@us...> Date: Wed Mar 23 19:33:36 2011 +0900 Fix for regression test portals_p2 This test uses relation onek2 which cannot be created because it depends on multiple parents. So this output is correct. diff --git a/src/test/regress/expected/portals_p2_1.out b/src/test/regress/expected/portals_p2_1.out new file mode 100644 index 0000000..8df791c --- /dev/null +++ b/src/test/regress/expected/portals_p2_1.out @@ -0,0 +1,87 @@ +-- +-- PORTALS_P2 +-- +BEGIN; +DECLARE foo13 CURSOR FOR + SELECT * FROM onek WHERE unique1 = 50; +DECLARE foo14 CURSOR FOR + SELECT * FROM onek WHERE unique1 = 51; +DECLARE foo15 CURSOR FOR + SELECT * FROM onek WHERE unique1 = 52; +DECLARE foo16 CURSOR FOR + SELECT * FROM onek WHERE unique1 = 53; +DECLARE foo17 CURSOR FOR + SELECT * FROM onek WHERE unique1 = 54; +DECLARE foo18 CURSOR FOR + SELECT * FROM onek WHERE unique1 = 55; +DECLARE foo19 CURSOR FOR + SELECT * FROM onek WHERE unique1 = 56; +DECLARE foo20 CURSOR FOR + SELECT * FROM onek WHERE unique1 = 57; +DECLARE foo21 CURSOR FOR + SELECT * FROM onek WHERE unique1 = 58; +DECLARE foo22 CURSOR FOR + SELECT * FROM onek WHERE unique1 = 59; +DECLARE foo23 CURSOR FOR + SELECT * FROM onek WHERE unique1 = 60; +DECLARE foo24 CURSOR FOR + SELECT * FROM onek2 WHERE unique1 = 50; +ERROR: relation "onek2" does not exist +LINE 2: SELECT * FROM onek2 WHERE unique1 = 50; + ^ +DECLARE foo25 CURSOR FOR + SELECT * FROM onek2 WHERE unique1 = 60; +ERROR: current transaction is aborted, commands ignored until end of transaction block +FETCH all in foo13; +ERROR: current transaction is aborted, commands ignored until end of transaction block +FETCH all in foo14; +ERROR: current transaction is aborted, commands ignored until end of transaction block +FETCH all in foo15; +ERROR: current transaction is aborted, commands ignored until end of transaction block +FETCH all in foo16; +ERROR: current transaction is aborted, commands ignored until end of transaction block +FETCH all in foo17; +ERROR: current transaction is aborted, commands ignored until end of transaction block +FETCH all in foo18; +ERROR: current transaction is aborted, commands ignored until end of transaction block +FETCH all in foo19; +ERROR: current transaction is aborted, commands ignored until end of transaction block +FETCH all in foo20; +ERROR: current transaction is aborted, commands ignored until end of transaction block +FETCH all in foo21; +ERROR: current transaction is aborted, commands ignored until end of transaction block +FETCH all in foo22; +ERROR: current transaction is aborted, commands ignored until end of transaction block +FETCH all in foo23; +ERROR: current transaction is aborted, commands ignored until end of transaction block +FETCH all in foo24; +ERROR: current transaction is aborted, commands ignored until end of transaction block +FETCH all in foo25; +ERROR: current transaction is aborted, commands ignored until end of transaction block +CLOSE foo13; +ERROR: current transaction is aborted, commands ignored until end of transaction block +CLOSE foo14; +ERROR: current transaction is aborted, commands ignored until end of transaction block +CLOSE foo15; +ERROR: current transaction is aborted, commands ignored until end of transaction block +CLOSE foo16; +ERROR: current transaction is aborted, commands ignored until end of transaction block +CLOSE foo17; +ERROR: current transaction is aborted, commands ignored until end of transaction block +CLOSE foo18; +ERROR: current transaction is aborted, commands ignored until end of transaction block +CLOSE foo19; +ERROR: current transaction is aborted, commands ignored until end of transaction block +CLOSE foo20; +ERROR: current transaction is aborted, commands ignored until end of transaction block +CLOSE foo21; +ERROR: current transaction is aborted, commands ignored until end of transaction block +CLOSE foo22; +ERROR: current transaction is aborted, commands ignored until end of transaction block +CLOSE foo23; +ERROR: current transaction is aborted, commands ignored until end of transaction block +CLOSE foo24; +ERROR: current transaction is aborted, commands ignored until end of transaction block +CLOSE foo25; +ERROR: current transaction is aborted, commands ignored until end of transaction block +END; ----------------------------------------------------------------------- Summary of changes: src/test/regress/expected/portals_p2_1.out | 87 ++++++++++++++++++++++++++++ 1 files changed, 87 insertions(+), 0 deletions(-) create mode 100644 src/test/regress/expected/portals_p2_1.out hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-23 09:54:18
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via 0c8315711375436158ddf9cc5950582a864deb67 (commit) from 80576863fad916d25cb4b0c4af42d0ebcaac990a (commit) - Log ----------------------------------------------------------------- commit 0c8315711375436158ddf9cc5950582a864deb67 Author: Michael P <mic...@us...> Date: Wed Mar 23 18:53:29 2011 +0900 Fix for regression test namespace Postgres-XC does not support yet INTO clause, so this output is correct. diff --git a/src/test/regress/expected/namespace_1.out b/src/test/regress/expected/namespace_1.out new file mode 100644 index 0000000..2452be2 --- /dev/null +++ b/src/test/regress/expected/namespace_1.out @@ -0,0 +1,51 @@ +-- +-- Regression tests for schemas (namespaces) +-- +CREATE SCHEMA test_schema_1 + CREATE UNIQUE INDEX abc_a_idx ON abc (a) + CREATE VIEW abc_view AS + SELECT a+1 AS a, b+1 AS b FROM abc + CREATE TABLE abc ( + a serial, + b int UNIQUE + ); +ERROR: Postgres-XC does not support SERIAL yet +DETAIL: The feature is not currently supported +-- verify that the objects were created +SELECT COUNT(*) FROM pg_class WHERE relnamespace = + (SELECT oid FROM pg_namespace WHERE nspname = 'test_schema_1'); + count +------- + 0 +(1 row) + +INSERT INTO test_schema_1.abc DEFAULT VALUES; +ERROR: schema "test_schema_1" does not exist +LINE 1: INSERT INTO test_schema_1.abc DEFAULT VALUES; + ^ +INSERT INTO test_schema_1.abc DEFAULT VALUES; +ERROR: schema "test_schema_1" does not exist +LINE 1: INSERT INTO test_schema_1.abc DEFAULT VALUES; + ^ +INSERT INTO test_schema_1.abc DEFAULT VALUES; +ERROR: schema "test_schema_1" does not exist +LINE 1: INSERT INTO test_schema_1.abc DEFAULT VALUES; + ^ +SELECT * FROM test_schema_1.abc ORDER BY a; +ERROR: schema "test_schema_1" does not exist +LINE 1: SELECT * FROM test_schema_1.abc ORDER BY a; + ^ +SELECT * FROM test_schema_1.abc_view ORDER BY a; +ERROR: schema "test_schema_1" does not exist +LINE 1: SELECT * FROM test_schema_1.abc_view ORDER BY a; + ^ +DROP SCHEMA test_schema_1 CASCADE; +ERROR: schema "test_schema_1" does not exist +-- verify that the objects were dropped +SELECT COUNT(*) FROM pg_class WHERE relnamespace = + (SELECT oid FROM pg_namespace WHERE nspname = 'test_schema_1'); + count +------- + 0 +(1 row) + ----------------------------------------------------------------------- Summary of changes: .../expected/{namespace.out => namespace_1.out} | 39 ++++++++++---------- 1 files changed, 19 insertions(+), 20 deletions(-) copy src/test/regress/expected/{namespace.out => namespace_1.out} (55%) hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-23 09:51:55
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via 80576863fad916d25cb4b0c4af42d0ebcaac990a (commit) via edaff5cb25e0aa8c21b5406133c2cbea53ef7b0c (commit) from 4b03e05fb307a45134a3113c5364bafcf7d29bc6 (commit) - Log ----------------------------------------------------------------- commit 80576863fad916d25cb4b0c4af42d0ebcaac990a Author: Michael P <mic...@us...> Date: Wed Mar 23 18:50:48 2011 +0900 Fix for regression test hash_index Partition column of a distributed table cannot be updated, so this output is correct. diff --git a/src/test/regress/expected/hash_index_1.out b/src/test/regress/expected/hash_index_1.out new file mode 100644 index 0000000..97e5933 --- /dev/null +++ b/src/test/regress/expected/hash_index_1.out @@ -0,0 +1,202 @@ +-- +-- HASH_INDEX +-- grep 843938989 hash.data +-- +SELECT * FROM hash_i4_heap + WHERE hash_i4_heap.random = 843938989; + seqno | random +-------+----------- + 15 | 843938989 +(1 row) + +-- +-- hash index +-- grep 66766766 hash.data +-- +SELECT * FROM hash_i4_heap + WHERE hash_i4_heap.random = 66766766; + seqno | random +-------+-------- +(0 rows) + +-- +-- hash index +-- grep 1505703298 hash.data +-- +SELECT * FROM hash_name_heap + WHERE hash_name_heap.random = '1505703298'::name; + seqno | random +-------+------------ + 9838 | 1505703298 +(1 row) + +-- +-- hash index +-- grep 7777777 hash.data +-- +SELECT * FROM hash_name_heap + WHERE hash_name_heap.random = '7777777'::name; + seqno | random +-------+-------- +(0 rows) + +-- +-- hash index +-- grep 1351610853 hash.data +-- +SELECT * FROM hash_txt_heap + WHERE hash_txt_heap.random = '1351610853'::text; + seqno | random +-------+------------ + 5677 | 1351610853 +(1 row) + +-- +-- hash index +-- grep 111111112222222233333333 hash.data +-- +SELECT * FROM hash_txt_heap + WHERE hash_txt_heap.random = '111111112222222233333333'::text; + seqno | random +-------+-------- +(0 rows) + +-- +-- hash index +-- grep 444705537 hash.data +-- +SELECT * FROM hash_f8_heap + WHERE hash_f8_heap.random = '444705537'::float8; + seqno | random +-------+----------- + 7853 | 444705537 +(1 row) + +-- +-- hash index +-- grep 88888888 hash.data +-- +SELECT * FROM hash_f8_heap + WHERE hash_f8_heap.random = '88888888'::float8; + seqno | random +-------+-------- +(0 rows) + +-- +-- 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; +SELECT h.seqno AS i1492, h.random AS i1 + FROM hash_i4_heap h + WHERE h.random = 1; + i1492 | i1 +-------+---- + 1492 | 1 +(1 row) + +UPDATE hash_i4_heap + SET seqno = 20000 + WHERE hash_i4_heap.random = 1492795354; +ERROR: Partition column can't be updated in current version +SELECT h.seqno AS i20000 + FROM hash_i4_heap h + WHERE h.random = 1492795354; + i20000 +-------- + 6866 +(1 row) + +UPDATE hash_name_heap + SET random = '0123456789abcdef'::name + WHERE hash_name_heap.seqno = 6543; +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) + +UPDATE hash_name_heap + SET seqno = 20000 + WHERE hash_name_heap.random = '76652222'::name; +ERROR: Partition column can't be updated in current version +-- +-- 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) + +UPDATE hash_txt_heap + SET random = '0123456789abcdefghijklmnop'::text + WHERE hash_txt_heap.seqno = 4002; +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) + +UPDATE hash_txt_heap + SET seqno = 20000 + WHERE hash_txt_heap.random = '959363399'::text; +ERROR: Partition column can't be updated in current version +SELECT h.seqno AS t20000 + FROM hash_txt_heap h + WHERE h.random = '959363399'::text; + t20000 +-------- + 5489 +(1 row) + +UPDATE hash_f8_heap + SET random = '-1234.1234'::float8 + WHERE hash_f8_heap.seqno = 8906; +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) + +UPDATE hash_f8_heap + SET seqno = 20000 + WHERE hash_f8_heap.random = '488912369'::float8; +ERROR: Partition column can't be updated in current version +SELECT h.seqno AS f20000 + FROM hash_f8_heap h + WHERE h.random = '488912369'::float8; + f20000 +-------- + 8932 +(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; commit edaff5cb25e0aa8c21b5406133c2cbea53ef7b0c Author: Michael P <mic...@us...> Date: Wed Mar 23 18:47:14 2011 +0900 Fix for regression test random INTO clause is not yet supported, so this output is correct. diff --git a/src/test/regress/expected/random_1.out b/src/test/regress/expected/random_1.out new file mode 100644 index 0000000..871bd36 --- /dev/null +++ b/src/test/regress/expected/random_1.out @@ -0,0 +1,60 @@ +-- +-- RANDOM +-- Test the random function +-- +-- count the number of tuples originally, should be 1000 +SELECT count(*) FROM onek; + count +------- + 1000 +(1 row) + +-- pick three random rows, they shouldn't match +(SELECT unique1 AS random + FROM onek ORDER BY random() LIMIT 1) +INTERSECT +(SELECT unique1 AS random + FROM onek ORDER BY random() LIMIT 1) +INTERSECT +(SELECT unique1 AS random + FROM onek ORDER BY random() LIMIT 1); + random +-------- +(0 rows) + +-- count roughly 1/10 of the tuples +SELECT count(*) AS random INTO RANDOM_TBL + FROM onek WHERE random() < 1.0/10; +ERROR: INTO clause not yet supported +-- select again, the count should be different +INSERT INTO RANDOM_TBL (random) + SELECT count(*) + FROM onek WHERE random() < 1.0/10; +ERROR: relation "random_tbl" does not exist +LINE 1: INSERT INTO RANDOM_TBL (random) + ^ +-- select again, the count should be different +INSERT INTO RANDOM_TBL (random) + SELECT count(*) + FROM onek WHERE random() < 1.0/10; +ERROR: relation "random_tbl" does not exist +LINE 1: INSERT INTO RANDOM_TBL (random) + ^ +-- select again, the count should be different +INSERT INTO RANDOM_TBL (random) + SELECT count(*) + FROM onek WHERE random() < 1.0/10; +ERROR: relation "random_tbl" does not exist +LINE 1: INSERT INTO RANDOM_TBL (random) + ^ +-- now test that they are different counts +SELECT random, count(random) FROM RANDOM_TBL + GROUP BY random HAVING count(random) > 3; +ERROR: relation "random_tbl" does not exist +LINE 1: SELECT random, count(random) FROM RANDOM_TBL + ^ +SELECT AVG(random) FROM RANDOM_TBL + HAVING AVG(random) NOT BETWEEN 80 AND 120; +ERROR: relation "random_tbl" does not exist +LINE 1: SELECT AVG(random) FROM RANDOM_TBL + ^ ----------------------------------------------------------------------- Summary of changes: .../expected/{hash_index.out => hash_index_1.out} | 10 +++++-- .../regress/expected/{random.out => random_1.out} | 24 +++++++++++++------ 2 files changed, 23 insertions(+), 11 deletions(-) copy src/test/regress/expected/{hash_index.out => hash_index_1.out} (93%) copy src/test/regress/expected/{random.out => random_1.out} (65%) hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-23 09:45:26
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via 4b03e05fb307a45134a3113c5364bafcf7d29bc6 (commit) from 29637b7f7d32ea593f9d2689ec44a0c12511a274 (commit) - Log ----------------------------------------------------------------- commit 4b03e05fb307a45134a3113c5364bafcf7d29bc6 Author: Michael P <mic...@us...> Date: Wed Mar 23 18:44:23 2011 +0900 Fix for regression test transactions SAVEPOINT, PREPARE and EXECUTE are not supported in Postgres-XC, so this output is correct. diff --git a/src/test/regress/expected/transactions_1.out b/src/test/regress/expected/transactions_1.out new file mode 100644 index 0000000..967bd3c --- /dev/null +++ b/src/test/regress/expected/transactions_1.out @@ -0,0 +1,561 @@ +-- +-- TRANSACTIONS +-- +BEGIN; +SELECT * + INTO TABLE xacttest + FROM aggtest; +ERROR: INTO clause not yet supported +INSERT INTO xacttest (a, b) VALUES (777, 777.777); +ERROR: current transaction is aborted, commands ignored until end of transaction block +END; +-- should retrieve one value-- +SELECT a FROM xacttest WHERE a > 100; +ERROR: relation "xacttest" does not exist +LINE 1: SELECT a FROM xacttest WHERE a > 100; + ^ +BEGIN; +CREATE TABLE disappear (a int4); +DELETE FROM aggtest; +-- should be empty +SELECT * FROM aggtest; + a | b +---+--- +(0 rows) + +ABORT; +-- should not exist +SELECT oid FROM pg_class WHERE relname = 'disappear'; + oid +----- +(0 rows) + +-- should have members again +SELECT * FROM aggtest order by a, b; + a | b +-----+--------- + 0 | 0.09561 + 42 | 324.78 + 56 | 7.8 + 100 | 99.097 +(4 rows) + +-- Read-only tests +CREATE TABLE writetest (a int); +CREATE TEMPORARY TABLE temptest (a int); +ERROR: PG-XC does not yet support temporary tables +SET SESSION CHARACTERISTICS AS TRANSACTION READ ONLY; +DROP TABLE writetest; -- fail +ERROR: cannot execute DROP TABLE in a read-only transaction +INSERT INTO writetest VALUES (1); -- fail +ERROR: cannot execute INSERT in a read-only transaction +SELECT * FROM writetest; -- ok + a +--- +(0 rows) + +DELETE FROM temptest; -- ok +ERROR: relation "temptest" does not exist +LINE 1: DELETE FROM temptest; + ^ +UPDATE temptest SET a = 0 FROM writetest WHERE temptest.a = 1 AND writetest.a = temptest.a; -- ok +ERROR: relation "temptest" does not exist +LINE 1: UPDATE temptest SET a = 0 FROM writetest WHERE temptest.a = ... + ^ +PREPARE test AS UPDATE writetest SET a = 0; -- ok +ERROR: Postgres-XC does not support PREPARE yet +DETAIL: The feature is not currently supported +EXECUTE test; -- fail +ERROR: Postgres-XC does not support EXECUTE yet +DETAIL: The feature is not currently supported +SELECT * FROM writetest, temptest; -- ok +ERROR: relation "temptest" does not exist +LINE 1: SELECT * FROM writetest, temptest; + ^ +CREATE TABLE test AS SELECT * FROM writetest; -- fail +ERROR: INTO clause not yet supported +START TRANSACTION READ WRITE; +DROP TABLE writetest; -- ok +COMMIT; +-- Subtransactions, basic tests +-- create & drop tables +SET SESSION CHARACTERISTICS AS TRANSACTION READ WRITE; +CREATE TABLE foobar (a int); +BEGIN; + CREATE TABLE foo (a int); + SAVEPOINT one; +ERROR: SAVEPOINT is not yet supported. + DROP TABLE foo; +ERROR: current transaction is aborted, commands ignored until end of transaction block + CREATE TABLE bar (a int); +ERROR: current transaction is aborted, commands ignored until end of transaction block + ROLLBACK TO SAVEPOINT one; +ERROR: no such savepoint + RELEASE SAVEPOINT one; +ERROR: current transaction is aborted, commands ignored until end of transaction block + SAVEPOINT two; +ERROR: current transaction is aborted, commands ignored until end of transaction block + CREATE TABLE baz (a int); +ERROR: current transaction is aborted, commands ignored until end of transaction block + RELEASE SAVEPOINT two; +ERROR: current transaction is aborted, commands ignored until end of transaction block + drop TABLE foobar; +ERROR: current transaction is aborted, commands ignored until end of transaction block + CREATE TABLE barbaz (a int); +ERROR: current transaction is aborted, commands ignored until end of transaction block +COMMIT; +-- should exist: barbaz, baz, foo +SELECT * FROM foo; -- should be empty +ERROR: relation "foo" does not exist +LINE 1: SELECT * FROM foo; + ^ +SELECT * FROM bar; -- shouldn't exist +ERROR: relation "bar" does not exist +LINE 1: SELECT * FROM bar; + ^ +SELECT * FROM barbaz; -- should be empty +ERROR: relation "barbaz" does not exist +LINE 1: SELECT * FROM barbaz; + ^ +SELECT * FROM baz; -- should be empty +ERROR: relation "baz" does not exist +LINE 1: SELECT * FROM baz; + ^ +-- inserts +BEGIN; + INSERT INTO foo VALUES (1); +ERROR: relation "foo" does not exist +LINE 1: INSERT INTO foo VALUES (1); + ^ + SAVEPOINT one; +ERROR: current transaction is aborted, commands ignored until end of transaction block + INSERT into bar VALUES (1); +ERROR: current transaction is aborted, commands ignored until end of transaction block + ROLLBACK TO one; +ERROR: no such savepoint + RELEASE SAVEPOINT one; +ERROR: current transaction is aborted, commands ignored until end of transaction block + SAVEPOINT two; +ERROR: current transaction is aborted, commands ignored until end of transaction block + INSERT into barbaz VALUES (1); +ERROR: current transaction is aborted, commands ignored until end of transaction block + RELEASE two; +ERROR: current transaction is aborted, commands ignored until end of transaction block + SAVEPOINT three; +ERROR: current transaction is aborted, commands ignored until end of transaction block + SAVEPOINT four; +ERROR: current transaction is aborted, commands ignored until end of transaction block + INSERT INTO foo VALUES (2); +ERROR: current transaction is aborted, commands ignored until end of transaction block + RELEASE SAVEPOINT four; +ERROR: current transaction is aborted, commands ignored until end of transaction block + ROLLBACK TO SAVEPOINT three; +ERROR: no such savepoint + RELEASE SAVEPOINT three; +ERROR: current transaction is aborted, commands ignored until end of transaction block + INSERT INTO foo VALUES (3); +ERROR: current transaction is aborted, commands ignored until end of transaction block +COMMIT; +SELECT * FROM foo ORDER BY a; -- should have 1 and 3 +ERROR: relation "foo" does not exist +LINE 1: SELECT * FROM foo ORDER BY a; + ^ +SELECT * FROM barbaz ORDER BY a; -- should have 1 +ERROR: relation "barbaz" does not exist +LINE 1: SELECT * FROM barbaz ORDER BY a; + ^ +-- test whole-tree commit +BEGIN; + SAVEPOINT one; +ERROR: SAVEPOINT is not yet supported. + SELECT foo; +ERROR: current transaction is aborted, commands ignored until end of transaction block + ROLLBACK TO SAVEPOINT one; +ERROR: no such savepoint + RELEASE SAVEPOINT one; +ERROR: current transaction is aborted, commands ignored until end of transaction block + SAVEPOINT two; +ERROR: current transaction is aborted, commands ignored until end of transaction block + CREATE TABLE savepoints (a int); +ERROR: current transaction is aborted, commands ignored until end of transaction block + SAVEPOINT three; +ERROR: current transaction is aborted, commands ignored until end of transaction block + INSERT INTO savepoints VALUES (1); +ERROR: current transaction is aborted, commands ignored until end of transaction block + SAVEPOINT four; +ERROR: current transaction is aborted, commands ignored until end of transaction block + INSERT INTO savepoints VALUES (2); +ERROR: current transaction is aborted, commands ignored until end of transaction block + SAVEPOINT five; +ERROR: current transaction is aborted, commands ignored until end of transaction block + INSERT INTO savepoints VALUES (3); +ERROR: current transaction is aborted, commands ignored until end of transaction block + ROLLBACK TO SAVEPOINT five; +ERROR: no such savepoint +COMMIT; +COMMIT; -- should not be in a transaction block +WARNING: there is no transaction in progress +SELECT * FROM savepoints ORDER BY 1; +ERROR: relation "savepoints" does not exist +LINE 1: SELECT * FROM savepoints ORDER BY 1; + ^ +-- test whole-tree rollback +BEGIN; + SAVEPOINT one; +ERROR: SAVEPOINT is not yet supported. + DELETE FROM savepoints WHERE a=1; +ERROR: current transaction is aborted, commands ignored until end of transaction block + RELEASE SAVEPOINT one; +ERROR: current transaction is aborted, commands ignored until end of transaction block + SAVEPOINT two; +ERROR: current transaction is aborted, commands ignored until end of transaction block + DELETE FROM savepoints WHERE a=1; +ERROR: current transaction is aborted, commands ignored until end of transaction block + SAVEPOINT three; +ERROR: current transaction is aborted, commands ignored until end of transaction block + DELETE FROM savepoints WHERE a=2; +ERROR: current transaction is aborted, commands ignored until end of transaction block +ROLLBACK; +COMMIT; -- should not be in a transaction block +WARNING: there is no transaction in progress + +SELECT * FROM savepoints ORDER BY 1; +ERROR: relation "savepoints" does not exist +LINE 1: SELECT * FROM savepoints ORDER BY 1; + ^ +-- test whole-tree commit on an aborted subtransaction +BEGIN; + INSERT INTO savepoints VALUES (4); +ERROR: relation "savepoints" does not exist +LINE 1: INSERT INTO savepoints VALUES (4); + ^ + SAVEPOINT one; +ERROR: current transaction is aborted, commands ignored until end of transaction block + INSERT INTO savepoints VALUES (5); +ERROR: current transaction is aborted, commands ignored until end of transaction block + SELECT foo; +ERROR: current transaction is aborted, commands ignored until end of transaction block +COMMIT; +SELECT * FROM savepoints ORDER BY a; +ERROR: relation "savepoints" does not exist +LINE 1: SELECT * FROM savepoints ORDER BY a; + ^ +BEGIN; + INSERT INTO savepoints VALUES (6); +ERROR: relation "savepoints" does not exist +LINE 1: INSERT INTO savepoints VALUES (6); + ^ + SAVEPOINT one; +ERROR: current transaction is aborted, commands ignored until end of transaction block + INSERT INTO savepoints VALUES (7); +ERROR: current transaction is aborted, commands ignored until end of transaction block + RELEASE SAVEPOINT one; +ERROR: current transaction is aborted, commands ignored until end of transaction block + INSERT INTO savepoints VALUES (8); +ERROR: current transaction is aborted, commands ignored until end of transaction block +COMMIT; +-- rows 6 and 8 should have been created by the same xact +SELECT a.xmin = b.xmin FROM savepoints a, savepoints b WHERE a.a=6 AND b.a=8; +ERROR: relation "savepoints" does not exist +LINE 1: SELECT a.xmin = b.xmin FROM savepoints a, savepoints b WHERE... + ^ +-- rows 6 and 7 should have been created by different xacts +SELECT a.xmin = b.xmin FROM savepoints a, savepoints b WHERE a.a=6 AND b.a=7; +ERROR: relation "savepoints" does not exist +LINE 1: SELECT a.xmin = b.xmin FROM savepoints a, savepoints b WHERE... + ^ +BEGIN; + INSERT INTO savepoints VALUES (9); +ERROR: relation "savepoints" does not exist +LINE 1: INSERT INTO savepoints VALUES (9); + ^ + SAVEPOINT one; +ERROR: current transaction is aborted, commands ignored until end of transaction block + INSERT INTO savepoints VALUES (10); +ERROR: current transaction is aborted, commands ignored until end of transaction block + ROLLBACK TO SAVEPOINT one; +ERROR: no such savepoint + INSERT INTO savepoints VALUES (11); +ERROR: current transaction is aborted, commands ignored until end of transaction block +COMMIT; +SELECT a FROM savepoints WHERE a in (9, 10, 11) ORDER BY a; +ERROR: relation "savepoints" does not exist +LINE 1: SELECT a FROM savepoints WHERE a in (9, 10, 11) ORDER BY a; + ^ +-- rows 9 and 11 should have been created by different xacts +SELECT a.xmin = b.xmin FROM savepoints a, savepoints b WHERE a.a=9 AND b.a=11; +ERROR: relation "savepoints" does not exist +LINE 1: SELECT a.xmin = b.xmin FROM savepoints a, savepoints b WHERE... + ^ +BEGIN; + INSERT INTO savepoints VALUES (12); +ERROR: relation "savepoints" does not exist +LINE 1: INSERT INTO savepoints VALUES (12); + ^ + SAVEPOINT one; +ERROR: current transaction is aborted, commands ignored until end of transaction block + INSERT INTO savepoints VALUES (13); +ERROR: current transaction is aborted, commands ignored until end of transaction block + SAVEPOINT two; +ERROR: current transaction is aborted, commands ignored until end of transaction block + INSERT INTO savepoints VALUES (14); +ERROR: current transaction is aborted, commands ignored until end of transaction block + ROLLBACK TO SAVEPOINT one; +ERROR: no such savepoint + INSERT INTO savepoints VALUES (15); +ERROR: current transaction is aborted, commands ignored until end of transaction block + SAVEPOINT two; +ERROR: current transaction is aborted, commands ignored until end of transaction block + INSERT INTO savepoints VALUES (16); +ERROR: current transaction is aborted, commands ignored until end of transaction block + SAVEPOINT three; +ERROR: current transaction is aborted, commands ignored until end of transaction block + INSERT INTO savepoints VALUES (17); +ERROR: current transaction is aborted, commands ignored until end of transaction block +COMMIT; +SELECT a FROM savepoints WHERE a BETWEEN 12 AND 17 ORDER BY a; +ERROR: relation "savepoints" does not exist +LINE 1: SELECT a FROM savepoints WHERE a BETWEEN 12 AND 17 ORDER BY ... + ^ +BEGIN; + INSERT INTO savepoints VALUES (18); +ERROR: relation "savepoints" does not exist +LINE 1: INSERT INTO savepoints VALUES (18); + ^ + SAVEPOINT one; +ERROR: current transaction is aborted, commands ignored until end of transaction block + INSERT INTO savepoints VALUES (19); +ERROR: current transaction is aborted, commands ignored until end of transaction block + SAVEPOINT two; +ERROR: current transaction is aborted, commands ignored until end of transaction block + INSERT INTO savepoints VALUES (20); +ERROR: current transaction is aborted, commands ignored until end of transaction block + ROLLBACK TO SAVEPOINT one; +ERROR: no such savepoint + INSERT INTO savepoints VALUES (21); +ERROR: current transaction is aborted, commands ignored until end of transaction block + ROLLBACK TO SAVEPOINT one; +ERROR: no such savepoint + INSERT INTO savepoints VALUES (22); +ERROR: current transaction is aborted, commands ignored until end of transaction block +COMMIT; +SELECT a FROM savepoints WHERE a BETWEEN 18 AND 22 ORDER BY a; +ERROR: relation "savepoints" does not exist +LINE 1: SELECT a FROM savepoints WHERE a BETWEEN 18 AND 22 ORDER BY ... + ^ +DROP TABLE savepoints; +ERROR: table "savepoints" does not exist +-- only in a transaction block: +SAVEPOINT one; +ERROR: SAVEPOINT is not yet supported. +ROLLBACK TO SAVEPOINT one; +ERROR: ROLLBACK TO SAVEPOINT can only be used in transaction blocks +RELEASE SAVEPOINT one; +ERROR: RELEASE SAVEPOINT can only be used in transaction blocks +-- Only "rollback to" allowed in aborted state +BEGIN; + SAVEPOINT one; +ERROR: SAVEPOINT is not yet supported. + SELECT 0/0; +ERROR: current transaction is aborted, commands ignored until end of transaction block + SAVEPOINT two; -- ignored till the end of ... +ERROR: current transaction is aborted, commands ignored until end of transaction block + RELEASE SAVEPOINT one; -- ignored till the end of ... +ERROR: current transaction is aborted, commands ignored until end of transaction block + ROLLBACK TO SAVEPOINT one; +ERROR: no such savepoint + SELECT 1; +ERROR: current transaction is aborted, commands ignored until end of transaction block +COMMIT; +SELECT 1; -- this should work + ?column? +---------- + 1 +(1 row) + +-- check non-transactional behavior of cursors +BEGIN; + DECLARE c CURSOR FOR SELECT unique2 FROM tenk1 ORDER BY unique2; + SAVEPOINT one; +ERROR: SAVEPOINT is not yet supported. + FETCH 10 FROM c; +ERROR: current transaction is aborted, commands ignored until end of transaction block + ROLLBACK TO SAVEPOINT one; +ERROR: no such savepoint + FETCH 10 FROM c; +ERROR: current transaction is aborted, commands ignored until end of transaction block + RELEASE SAVEPOINT one; +ERROR: current transaction is aborted, commands ignored until end of transaction block + FETCH 10 FROM c; +ERROR: current transaction is aborted, commands ignored until end of transaction block + CLOSE c; +ERROR: current transaction is aborted, commands ignored until end of transaction block + DECLARE c CURSOR FOR SELECT unique2/0 FROM tenk1 ORDER BY unique2; +ERROR: current transaction is aborted, commands ignored until end of transaction block + SAVEPOINT two; +ERROR: current transaction is aborted, commands ignored until end of transaction block + FETCH 10 FROM c; +ERROR: current transaction is aborted, commands ignored until end of transaction block + ROLLBACK TO SAVEPOINT two; +ERROR: no such savepoint + -- c is now dead to the world ... + FETCH 10 FROM c; +ERROR: current transaction is aborted, commands ignored until end of transaction block + ROLLBACK TO SAVEPOINT two; +ERROR: no such savepoint + RELEASE SAVEPOINT two; +ERROR: current transaction is aborted, commands ignored until end of transaction block + FETCH 10 FROM c; +ERROR: current transaction is aborted, commands ignored until end of transaction block +COMMIT; +-- +-- Check that "stable" functions are really stable. They should not be +-- able to see the partial results of the calling query. (Ideally we would +-- also check that they don't see commits of concurrent transactions, but +-- that's a mite hard to do within the limitations of pg_regress.) +-- +select * from xacttest order by a, b; +ERROR: relation "xacttest" does not exist +LINE 1: select * from xacttest order by a, b; + ^ +create or replace function max_xacttest() returns smallint language sql as +'select max(a) from xacttest' stable; +ERROR: relation "xacttest" does not exist +LINE 2: 'select max(a) from xacttest' stable; + ^ +begin; +update xacttest set a = max_xacttest() + 10 where a > 0; +ERROR: relation "xacttest" does not exist +LINE 1: update xacttest set a = max_xacttest() + 10 where a > 0; + ^ +select * from xacttest order by a, b; +ERROR: current transaction is aborted, commands ignored until end of transaction block +rollback; +-- But a volatile function can see the partial results of the calling query +create or replace function max_xacttest() returns smallint language sql as +'select max(a) from xacttest' volatile; +ERROR: relation "xacttest" does not exist +LINE 2: 'select max(a) from xacttest' volatile; + ^ +begin; +update xacttest set a = max_xacttest() + 10 where a > 0; +ERROR: relation "xacttest" does not exist +LINE 1: update xacttest set a = max_xacttest() + 10 where a > 0; + ^ +select * from xacttest order by a, b; +ERROR: current transaction is aborted, commands ignored until end of transaction block +rollback; +-- Now the same test with plpgsql (since it depends on SPI which is different) +create or replace function max_xacttest() returns smallint language plpgsql as +'begin return max(a) from xacttest; end' stable; +begin; +update xacttest set a = max_xacttest() + 10 where a > 0; +ERROR: relation "xacttest" does not exist +LINE 1: update xacttest set a = max_xacttest() + 10 where a > 0; + ^ +select * from xacttest order by a, b; +ERROR: current transaction is aborted, commands ignored until end of transaction block +rollback; +create or replace function max_xacttest() returns smallint language plpgsql as +'begin return max(a) from xacttest; end' volatile; +begin; +update xacttest set a = max_xacttest() + 10 where a > 0; +ERROR: relation "xacttest" does not exist +LINE 1: update xacttest set a = max_xacttest() + 10 where a > 0; + ^ +select * from xacttest order by a, b; +ERROR: current transaction is aborted, commands ignored until end of transaction block +rollback; +-- test case for problems with dropping an open relation during abort +BEGIN; + savepoint x; +ERROR: SAVEPOINT is not yet supported. + CREATE TABLE koju (a INT UNIQUE); +ERROR: current transaction is aborted, commands ignored until end of transaction block + INSERT INTO koju VALUES (1); +ERROR: current transaction is aborted, commands ignored until end of transaction block + INSERT INTO koju VALUES (1); +ERROR: current transaction is aborted, commands ignored until end of transaction block + rollback to x; +ERROR: no such savepoint + CREATE TABLE koju (a INT UNIQUE); +ERROR: current transaction is aborted, commands ignored until end of transaction block + INSERT INTO koju VALUES (1); +ERROR: current transaction is aborted, commands ignored until end of transaction block + INSERT INTO koju VALUES (1); +ERROR: current transaction is aborted, commands ignored until end of transaction block +ROLLBACK; +DROP TABLE foo; +ERROR: table "foo" does not exist +DROP TABLE baz; +ERROR: table "baz" does not exist +DROP TABLE barbaz; +ERROR: table "barbaz" does not exist +-- verify that cursors created during an aborted subtransaction are +-- closed, but that we do not rollback the effect of any FETCHs +-- performed in the aborted subtransaction +begin; +savepoint x; +ERROR: SAVEPOINT is not yet supported. +create table abc (a int); +ERROR: current transaction is aborted, commands ignored until end of transaction block +insert into abc values (5); +ERROR: current transaction is aborted, commands ignored until end of transaction block +insert into abc values (10); +ERROR: current transaction is aborted, commands ignored until end of transaction block +declare foo cursor for select * from abc; +ERROR: current transaction is aborted, commands ignored until end of transaction block +fetch from foo; +ERROR: current transaction is aborted, commands ignored until end of transaction block +rollback to x; +ERROR: no such savepoint +-- should fail +fetch from foo; +ERROR: current transaction is aborted, commands ignored until end of transaction block +commit; +begin; +create table abc (a int); +insert into abc values (5); +insert into abc values (10); +insert into abc values (15); +declare foo cursor for select * from abc; +fetch from foo; + a +---- + 10 +(1 row) + +savepoint x; +ERROR: SAVEPOINT is not yet supported. +fetch from foo; +ERROR: current transaction is aborted, commands ignored until end of transaction block +rollback to x; +ERROR: no such savepoint +fetch from foo; +ERROR: current transaction is aborted, commands ignored until end of transaction block +abort; +-- tests for the "tid" type +SELECT '(3, 3)'::tid = '(3, 4)'::tid; + ?column? +---------- + f +(1 row) + +SELECT '(3, 3)'::tid = '(3, 3)'::tid; + ?column? +---------- + t +(1 row) + +SELECT '(3, 3)'::tid <> '(3, 3)'::tid; + ?column? +---------- + f +(1 row) + +SELECT '(3, 3)'::tid <> '(3, 4)'::tid; + ?column? +---------- + t +(1 row) + ----------------------------------------------------------------------- Summary of changes: src/test/regress/expected/transactions_1.out | 561 ++++++++++++++++++++++++++ 1 files changed, 561 insertions(+), 0 deletions(-) create mode 100644 src/test/regress/expected/transactions_1.out hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-23 09:34:43
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via 29637b7f7d32ea593f9d2689ec44a0c12511a274 (commit) from aa88067b97ebc92c9ab0a9995ad95e1f988b8df0 (commit) - Log ----------------------------------------------------------------- commit 29637b7f7d32ea593f9d2689ec44a0c12511a274 Author: Michael P <mic...@us...> Date: Wed Mar 23 18:33:53 2011 +0900 Fix for regression test union An ORDER BY was missing on a SELECT query. diff --git a/src/test/regress/expected/union_1.out b/src/test/regress/expected/union_1.out new file mode 100644 index 0000000..44d5f75 --- /dev/null +++ b/src/test/regress/expected/union_1.out @@ -0,0 +1,461 @@ +-- +-- UNION (also INTERSECT, EXCEPT) +-- +-- Simple UNION constructs +SELECT 1 AS two UNION SELECT 2 ORDER BY 1; + two +----- + 1 + 2 +(2 rows) + +SELECT 1 AS one UNION SELECT 1 ORDER BY 1; + one +----- + 1 +(1 row) + +SELECT 1 AS two UNION ALL SELECT 2 ORDER BY 1; + two +----- + 1 + 2 +(2 rows) + +SELECT 1 AS two UNION ALL SELECT 1 ORDER BY 1; + two +----- + 1 + 1 +(2 rows) + +SELECT 1 AS three UNION SELECT 2 UNION SELECT 3 ORDER BY 1; + three +------- + 1 + 2 + 3 +(3 rows) + +SELECT 1 AS two UNION SELECT 2 UNION SELECT 2 ORDER BY 1; + two +----- + 1 + 2 +(2 rows) + +SELECT 1 AS three UNION SELECT 2 UNION ALL SELECT 2 ORDER BY 1; + three +------- + 1 + 2 + 2 +(3 rows) + +SELECT 1.1 AS two UNION SELECT 2.2 ORDER BY 1; + two +----- + 1.1 + 2.2 +(2 rows) + +-- Mixed types +SELECT 1.1 AS two UNION SELECT 2 ORDER BY 1; + two +----- + 1.1 + 2 +(2 rows) + +SELECT 1 AS two UNION SELECT 2.2 ORDER BY 1; + two +----- + 1 + 2.2 +(2 rows) + +SELECT 1 AS one UNION SELECT 1.0::float8 ORDER BY 1; + one +----- + 1 +(1 row) + +SELECT 1.1 AS two UNION ALL SELECT 2 ORDER BY 1; + two +----- + 1.1 + 2 +(2 rows) + +SELECT 1.0::float8 AS two UNION ALL SELECT 1 ORDER BY 1; + two +----- + 1 + 1 +(2 rows) + +SELECT 1.1 AS three UNION SELECT 2 UNION SELECT 3 ORDER BY 1; + three +------- + 1.1 + 2 + 3 +(3 rows) + +SELECT 1.1::float8 AS two UNION SELECT 2 UNION SELECT 2.0::float8 ORDER BY 1; + two +----- + 1.1 + 2 +(2 rows) + +SELECT 1.1 AS three UNION SELECT 2 UNION ALL SELECT 2 ORDER BY 1; + three +------- + 1.1 + 2 + 2 +(3 rows) + +SELECT 1.1 AS two UNION (SELECT 2 UNION ALL SELECT 2) ORDER BY 1; + two +----- + 1.1 + 2 +(2 rows) + +-- +-- Try testing from tables... +-- +SELECT f1 AS five FROM FLOAT8_TBL +UNION +SELECT f1 FROM FLOAT8_TBL +ORDER BY 1; + five +----------------------- + -1.2345678901234e+200 + -1004.3 + -34.84 + -1.2345678901234e-200 + 0 +(5 rows) + +SELECT f1 AS ten FROM FLOAT8_TBL +UNION ALL +SELECT f1 FROM FLOAT8_TBL +ORDER BY 1; + ten +----------------------- + -1.2345678901234e+200 + -1.2345678901234e+200 + -1004.3 + -1004.3 + -34.84 + -34.84 + -1.2345678901234e-200 + -1.2345678901234e-200 + 0 + 0 +(10 rows) + +SELECT f1 AS nine FROM FLOAT8_TBL +UNION +SELECT f1 FROM INT4_TBL +ORDER BY 1; + nine +----------------------- + -1.2345678901234e+200 + -2147483647 + -123456 + -1004.3 + -34.84 + -1.2345678901234e-200 + 0 + 123456 + 2147483647 +(9 rows) + +SELECT f1 AS ten FROM FLOAT8_TBL +UNION ALL +SELECT f1 FROM INT4_TBL +ORDER BY 1; + ten +----------------------- + -1.2345678901234e+200 + -2147483647 + -123456 + -1004.3 + -34.84 + -1.2345678901234e-200 + 0 + 0 + 123456 + 2147483647 +(10 rows) + +SELECT f1 AS five FROM FLOAT8_TBL + WHERE f1 BETWEEN -1e6 AND 1e6 +UNION +SELECT f1 FROM INT4_TBL + WHERE f1 BETWEEN 0 AND 1000000 + ORDER BY 1; + five +----------------------- + -1004.3 + -34.84 + -1.2345678901234e-200 + 0 + 123456 +(5 rows) + +SELECT CAST(f1 AS char(4)) AS three FROM VARCHAR_TBL +UNION +SELECT f1 FROM CHAR_TBL +ORDER BY 1; + three +------- + a + ab + abcd +(3 rows) + +SELECT f1 AS three FROM VARCHAR_TBL +UNION +SELECT CAST(f1 AS varchar) FROM CHAR_TBL +ORDER BY 1; + three +------- + a + ab + abcd +(3 rows) + +SELECT f1 AS eight FROM VARCHAR_TBL +UNION ALL +SELECT f1 FROM CHAR_TBL +ORDER BY 1; + eight +------- + a + a + ab + ab + abcd + abcd + abcd + abcd +(8 rows) + +SELECT f1 AS five FROM TEXT_TBL +UNION +SELECT f1 FROM VARCHAR_TBL +UNION +SELECT TRIM(TRAILING FROM f1) FROM CHAR_TBL +ORDER BY 1; + five +------------------- + a + ab + abcd + doh! + hi de ho neighbor +(5 rows) + +-- +-- INTERSECT and EXCEPT +-- +SELECT q2 FROM int8_tbl INTERSECT SELECT q1 FROM int8_tbl ORDER BY 1; + q2 +------------------ + 123 + 4567890123456789 +(2 rows) + +SELECT q2 FROM int8_tbl INTERSECT ALL SELECT q1 FROM int8_tbl ORDER BY 1; + q2 +------------------ + 123 + 4567890123456789 + 4567890123456789 +(3 rows) + +SELECT q2 FROM int8_tbl EXCEPT SELECT q1 FROM int8_tbl ORDER BY 1; + q2 +------------------- + -4567890123456789 + 456 +(2 rows) + +SELECT q2 FROM int8_tbl EXCEPT ALL SELECT q1 FROM int8_tbl ORDER BY 1; + q2 +------------------- + -4567890123456789 + 456 +(2 rows) + +SELECT q2 FROM int8_tbl EXCEPT ALL SELECT DISTINCT q1 FROM int8_tbl ORDER BY 1; + q2 +------------------- + -4567890123456789 + 456 + 4567890123456789 +(3 rows) + +SELECT q1 FROM int8_tbl EXCEPT SELECT q2 FROM int8_tbl ORDER BY 1; + q1 +---- +(0 rows) + +SELECT q1 FROM int8_tbl EXCEPT ALL SELECT q2 FROM int8_tbl ORDER BY 1; + q1 +------------------ + 123 + 4567890123456789 +(2 rows) + +SELECT q1 FROM int8_tbl EXCEPT ALL SELECT DISTINCT q2 FROM int8_tbl ORDER BY 1; + q1 +------------------ + 123 + 4567890123456789 + 4567890123456789 +(3 rows) + +-- +-- Mixed types +-- +SELECT f1 FROM float8_tbl INTERSECT SELECT f1 FROM int4_tbl ORDER BY 1; + f1 +---- + 0 +(1 row) + +SELECT f1 FROM float8_tbl EXCEPT SELECT f1 FROM int4_tbl ORDER BY 1; + f1 +----------------------- + -1.2345678901234e+200 + -1004.3 + -34.84 + -1.2345678901234e-200 +(4 rows) + +-- +-- Operator precedence and (((((extra))))) parentheses +-- +SELECT q1 FROM int8_tbl INTERSECT SELECT q2 FROM int8_tbl UNION ALL SELECT q2 FROM int8_tbl ORDER BY 1; + q1 +------------------- + -4567890123456789 + 123 + 123 + 456 + 4567890123456789 + 4567890123456789 + 4567890123456789 +(7 rows) + +SELECT q1 FROM int8_tbl INTERSECT (((SELECT q2 FROM int8_tbl UNION ALL SELECT q2 FROM int8_tbl))) ORDER BY 1; + q1 +------------------ + 123 + 4567890123456789 +(2 rows) + +(((SELECT q1 FROM int8_tbl INTERSECT SELECT q2 FROM int8_tbl))) UNION ALL SELECT q2 FROM int8_tbl ORDER BY 1; + q1 +------------------- + -4567890123456789 + 123 + 123 + 456 + 4567890123456789 + 4567890123456789 + 4567890123456789 +(7 rows) + +SELECT q1 FROM int8_tbl UNION ALL SELECT q2 FROM int8_tbl EXCEPT SELECT q1 FROM int8_tbl ORDER BY 1; + q1 +------------------- + -4567890123456789 + 456 +(2 rows) + +SELECT q1 FROM int8_tbl UNION ALL (((SELECT q2 FROM int8_tbl EXCEPT SELECT q1 FROM int8_tbl ORDER BY 1))) ORDER BY 1; + q1 +------------------- + -4567890123456789 + 123 + 123 + 456 + 4567890123456789 + 4567890123456789 + 4567890123456789 +(7 rows) + +(((SELECT q1 FROM int8_tbl UNION ALL SELECT q2 FROM int8_tbl))) EXCEPT SELECT q1 FROM int8_tbl ORDER BY 1; + q1 +------------------- + -4567890123456789 + 456 +(2 rows) + +-- +-- Subqueries with ORDER BY & LIMIT clauses +-- +-- In this syntax, ORDER BY/LIMIT apply to the result of the EXCEPT +SELECT q1,q2 FROM int8_tbl EXCEPT SELECT q2,q1 FROM int8_tbl +ORDER BY q2,q1; + q1 | q2 +------------------+------------------- + 4567890123456789 | -4567890123456789 + 123 | 456 +(2 rows) + +-- This should fail, because q2 isn't a name of an EXCEPT output column +SELECT q1 FROM int8_tbl EXCEPT SELECT q2 FROM int8_tbl ORDER BY q2 LIMIT 1; +ERROR: column "q2" does not exist +LINE 1: ... int8_tbl EXCEPT SELECT q2 FROM int8_tbl ORDER BY q2 LIMIT 1... + ^ +-- But this should work: +SELECT q1 FROM int8_tbl EXCEPT (((SELECT q2 FROM int8_tbl ORDER BY q2 LIMIT 1))) ORDER BY q1; + q1 +------------------ + 123 + 4567890123456789 +(2 rows) + +-- +-- New syntaxes (7.1) permit new tests +-- +(((((select * from int8_tbl ORDER BY q1, q2))))); + q1 | q2 +------------------+------------------- + 123 | 456 + 123 | 4567890123456789 + 4567890123456789 | -4567890123456789 + 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 +(5 rows) + +-- +-- Check handling of a case with unknown constants. We don't guarantee +-- an undecorated constant will work in all cases, but historically this +-- usage has worked, so test we don't break it. +-- +SELECT a.f1 FROM (SELECT 'test' AS f1 FROM varchar_tbl) a +UNION +SELECT b.f1 FROM (SELECT f1 FROM varchar_tbl) b +ORDER BY 1; + f1 +------ + a + ab + abcd + test +(4 rows) + +-- This should fail, but it should produce an error cursor +SELECT '3.4'::numeric UNION SELECT 'foo'; +ERROR: invalid input syntax for type numeric: "foo" +LINE 1: SELECT '3.4'::numeric UNION SELECT 'foo'; + ^ diff --git a/src/test/regress/sql/union.sql b/src/test/regress/sql/union.sql index 03f7f70..78f166e 100644 --- a/src/test/regress/sql/union.sql +++ b/src/test/regress/sql/union.sql @@ -149,7 +149,7 @@ ORDER BY q2,q1; SELECT q1 FROM int8_tbl EXCEPT SELECT q2 FROM int8_tbl ORDER BY q2 LIMIT 1; -- But this should work: -SELECT q1 FROM int8_tbl EXCEPT (((SELECT q2 FROM int8_tbl ORDER BY q2 LIMIT 1))); +SELECT q1 FROM int8_tbl EXCEPT (((SELECT q2 FROM int8_tbl ORDER BY q2 LIMIT 1))) ORDER BY q1; -- -- New syntaxes (7.1) permit new tests ----------------------------------------------------------------------- Summary of changes: .../regress/expected/{union.out => union_1.out} | 4 ++-- src/test/regress/sql/union.sql | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) copy src/test/regress/expected/{union.out => union_1.out} (99%) hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-23 09:16:37
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via aa88067b97ebc92c9ab0a9995ad95e1f988b8df0 (commit) from 725940e25699179ded9d518b756e87577c892e5a (commit) - Log ----------------------------------------------------------------- commit aa88067b97ebc92c9ab0a9995ad95e1f988b8df0 Author: Michael P <mic...@us...> Date: Wed Mar 23 18:15:28 2011 +0900 Fix for regression test select_distinct_on tmp table is created by an INTO clause in test case select, so this output is correct. diff --git a/src/test/regress/expected/select_distinct_on_1.out b/src/test/regress/expected/select_distinct_on_1.out new file mode 100644 index 0000000..0c01725 --- /dev/null +++ b/src/test/regress/expected/select_distinct_on_1.out @@ -0,0 +1,30 @@ +-- +-- SELECT_DISTINCT_ON +-- +SELECT DISTINCT ON (string4) string4, two, ten + FROM tmp + ORDER BY string4 using <, two using >, ten using <; +ERROR: relation "tmp" does not exist +LINE 2: FROM tmp + ^ +-- this will fail due to conflict of ordering requirements +SELECT DISTINCT ON (string4, ten) string4, two, ten + FROM tmp + ORDER BY string4 using <, two using <, ten using <; +ERROR: relation "tmp" does not exist +LINE 2: FROM tmp + ^ +SELECT DISTINCT ON (string4, ten) string4, ten, two + FROM tmp + ORDER BY string4 using <, ten using >, two using <; +ERROR: relation "tmp" does not exist +LINE 2: FROM tmp + ^ +-- bug #5049: early 8.4.x chokes on volatile DISTINCT ON clauses +select distinct on (1) floor(random()) as r, f1 from int4_tbl order by 1,2; + r | f1 +---+------------- + 0 | -2147483647 + 0 | -123456 +(2 rows) + ----------------------------------------------------------------------- Summary of changes: src/test/regress/expected/select_distinct_on_1.out | 30 ++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) create mode 100644 src/test/regress/expected/select_distinct_on_1.out hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-23 08:29:50
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via 725940e25699179ded9d518b756e87577c892e5a (commit) from 199cedb034caa11c185356ef473b442d67069d10 (commit) - Log ----------------------------------------------------------------- commit 725940e25699179ded9d518b756e87577c892e5a Author: Michael P <mic...@us...> Date: Wed Mar 23 17:27:47 2011 +0900 Fix for regression test select This output is correct due to Postgres-XC's restrictions for TEMP tables and INTO clauses. This test also uses relation "onek2", that cannot be created dut to restrictions for relations depending on multiple parents. diff --git a/src/test/regress/expected/select_1.out b/src/test/regress/expected/select_1.out new file mode 100644 index 0000000..8bbcdb9 --- /dev/null +++ b/src/test/regress/expected/select_1.out @@ -0,0 +1,608 @@ +-- +-- SELECT +-- +-- btree index +-- awk '{if($1<10){print;}else{next;}}' onek.data | sort +0n -1 +-- +SELECT * FROM onek + WHERE onek.unique1 < 10 + ORDER BY onek.unique1; + unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 +---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- + 0 | 998 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | AAAAAA | KMBAAA | OOOOxx + 1 | 214 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 3 | BAAAAA | GIAAAA | OOOOxx + 2 | 326 | 0 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 4 | 5 | CAAAAA | OMAAAA | OOOOxx + 3 | 431 | 1 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 6 | 7 | DAAAAA | PQAAAA | VVVVxx + 4 | 833 | 0 | 0 | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 8 | 9 | EAAAAA | BGBAAA | HHHHxx + 5 | 541 | 1 | 1 | 5 | 5 | 5 | 5 | 5 | 5 | 5 | 10 | 11 | FAAAAA | VUAAAA | HHHHxx + 6 | 978 | 0 | 2 | 6 | 6 | 6 | 6 | 6 | 6 | 6 | 12 | 13 | GAAAAA | QLBAAA | OOOOxx + 7 | 647 | 1 | 3 | 7 | 7 | 7 | 7 | 7 | 7 | 7 | 14 | 15 | HAAAAA | XYAAAA | VVVVxx + 8 | 653 | 0 | 0 | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 16 | 17 | IAAAAA | DZAAAA | HHHHxx + 9 | 49 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 18 | 19 | JAAAAA | XBAAAA | HHHHxx +(10 rows) + +-- +-- awk '{if($1<20){print $1,$14;}else{next;}}' onek.data | sort +0nr -1 +-- +SELECT onek.unique1, onek.stringu1 FROM onek + WHERE onek.unique1 < 20 + ORDER BY unique1 using >; + unique1 | stringu1 +---------+---------- + 19 | TAAAAA + 18 | SAAAAA + 17 | RAAAAA + 16 | QAAAAA + 15 | PAAAAA + 14 | OAAAAA + 13 | NAAAAA + 12 | MAAAAA + 11 | LAAAAA + 10 | KAAAAA + 9 | JAAAAA + 8 | IAAAAA + 7 | HAAAAA + 6 | GAAAAA + 5 | FAAAAA + 4 | EAAAAA + 3 | DAAAAA + 2 | CAAAAA + 1 | BAAAAA + 0 | AAAAAA +(20 rows) + +-- +-- awk '{if($1>980){print $1,$14;}else{next;}}' onek.data | sort +1d -2 +-- +SELECT onek.unique1, onek.stringu1 FROM onek + WHERE onek.unique1 > 980 + ORDER BY stringu1 using <; + unique1 | stringu1 +---------+---------- + 988 | AMAAAA + 989 | BMAAAA + 990 | CMAAAA + 991 | DMAAAA + 992 | EMAAAA + 993 | FMAAAA + 994 | GMAAAA + 995 | HMAAAA + 996 | IMAAAA + 997 | JMAAAA + 998 | KMAAAA + 999 | LMAAAA + 981 | TLAAAA + 982 | ULAAAA + 983 | VLAAAA + 984 | WLAAAA + 985 | XLAAAA + 986 | YLAAAA + 987 | ZLAAAA +(19 rows) + + +-- +-- awk '{if($1>980){print $1,$16;}else{next;}}' onek.data | +-- sort +1d -2 +0nr -1 +-- +SELECT onek.unique1, onek.string4 FROM onek + WHERE onek.unique1 > 980 + ORDER BY string4 using <, unique1 using >; + unique1 | string4 +---------+--------- + 999 | AAAAxx + 995 | AAAAxx + 983 | AAAAxx + 982 | AAAAxx + 981 | AAAAxx + 998 | HHHHxx + 997 | HHHHxx + 993 | HHHHxx + 990 | HHHHxx + 986 | HHHHxx + 996 | OOOOxx + 991 | OOOOxx + 988 | OOOOxx + 987 | OOOOxx + 985 | OOOOxx + 994 | VVVVxx + 992 | VVVVxx + 989 | VVVVxx + 984 | VVVVxx +(19 rows) + + +-- +-- awk '{if($1>980){print $1,$16;}else{next;}}' onek.data | +-- sort +1dr -2 +0n -1 +-- +SELECT onek.unique1, onek.string4 FROM onek + WHERE onek.unique1 > 980 + ORDER BY string4 using >, unique1 using <; + unique1 | string4 +---------+--------- + 984 | VVVVxx + 989 | VVVVxx + 992 | VVVVxx + 994 | VVVVxx + 985 | OOOOxx + 987 | OOOOxx + 988 | OOOOxx + 991 | OOOOxx + 996 | OOOOxx + 986 | HHHHxx + 990 | HHHHxx + 993 | HHHHxx + 997 | HHHHxx + 998 | HHHHxx + 981 | AAAAxx + 982 | AAAAxx + 983 | AAAAxx + 995 | AAAAxx + 999 | AAAAxx +(19 rows) + + +-- +-- awk '{if($1<20){print $1,$16;}else{next;}}' onek.data | +-- sort +0nr -1 +1d -2 +-- +SELECT onek.unique1, onek.string4 FROM onek + WHERE onek.unique1 < 20 + ORDER BY unique1 using >, string4 using <; + unique1 | string4 +---------+--------- + 19 | OOOOxx + 18 | VVVVxx + 17 | HHHHxx + 16 | OOOOxx + 15 | VVVVxx + 14 | AAAAxx + 13 | OOOOxx + 12 | AAAAxx + 11 | OOOOxx + 10 | AAAAxx + 9 | HHHHxx + 8 | HHHHxx + 7 | VVVVxx + 6 | OOOOxx + 5 | HHHHxx + 4 | HHHHxx + 3 | VVVVxx + 2 | OOOOxx + 1 | OOOOxx + 0 | OOOOxx +(20 rows) + +-- +-- awk '{if($1<20){print $1,$16;}else{next;}}' onek.data | +-- sort +0n -1 +1dr -2 +-- +SELECT onek.unique1, onek.string4 FROM onek + WHERE onek.unique1 < 20 + ORDER BY unique1 using <, string4 using >; + unique1 | string4 +---------+--------- + 0 | OOOOxx + 1 | OOOOxx + 2 | OOOOxx + 3 | VVVVxx + 4 | HHHHxx + 5 | HHHHxx + 6 | OOOOxx + 7 | VVVVxx + 8 | HHHHxx + 9 | HHHHxx + 10 | AAAAxx + 11 | OOOOxx + 12 | AAAAxx + 13 | OOOOxx + 14 | AAAAxx + 15 | VVVVxx + 16 | OOOOxx + 17 | HHHHxx + 18 | VVVVxx + 19 | OOOOxx +(20 rows) + +-- +-- test partial btree indexes +-- +-- As of 7.2, planner probably won't pick an indexscan without stats, +-- so ANALYZE first. Also, we want to prevent it from picking a bitmapscan +-- followed by sort, because that could hide index ordering problems. +-- +ANALYZE onek2; +ERROR: relation "onek2" does not exist +SET enable_seqscan TO off; +SET enable_bitmapscan TO off; +SET enable_sort TO off; +-- +-- awk '{if($1<10){print $0;}else{next;}}' onek.data | sort +0n -1 +-- +SELECT onek2.* FROM onek2 WHERE onek2.unique1 < 10 ORDER BY unique1; +ERROR: relation "onek2" does not exist +LINE 1: SELECT onek2.* FROM onek2 WHERE onek2.unique1 < 10 ORDER BY ... + ^ +-- +-- awk '{if($1<20){print $1,$14;}else{next;}}' onek.data | sort +0nr -1 +-- +SELECT onek2.unique1, onek2.stringu1 FROM onek2 + WHERE onek2.unique1 < 20 + ORDER BY unique1 using >; +ERROR: relation "onek2" does not exist +LINE 1: SELECT onek2.unique1, onek2.stringu1 FROM onek2 + ^ +-- +-- awk '{if($1>980){print $1,$14;}else{next;}}' onek.data | sort +1d -2 +-- +SELECT onek2.unique1, onek2.stringu1 FROM onek2 + WHERE onek2.unique1 > 980 + ORDER BY unique1 using <; +ERROR: relation "onek2" does not exist +LINE 1: SELECT onek2.unique1, onek2.stringu1 FROM onek2 + ^ +RESET enable_seqscan; +RESET enable_bitmapscan; +RESET enable_sort; +SELECT two, stringu1, ten, string4 + INTO TABLE tmp + FROM onek; +ERROR: INTO clause not yet supported +-- +-- awk '{print $1,$2;}' person.data | +-- awk '{if(NF!=2){print $3,$2;}else{print;}}' - emp.data | +-- awk '{if(NF!=2){print $3,$2;}else{print;}}' - student.data | +-- awk 'BEGIN{FS=" ";}{if(NF!=2){print $4,$5;}else{print;}}' - stud_emp.data +-- +-- SELECT name, age FROM person*; ??? check if different +SELECT p.name, p.age FROM person* p + ORDER BY p.name, p.age; + name | age +---------+----- + alex | 30 + belinda | 38 + bertha | 88 + bill | 20 + carina | 58 + carmen | 78 + chris | 78 + denise | 24 + diane | 18 + edna | 18 + esther | 98 + fanny | 8 + fred | 28 + gina | 18 + jane | 58 + jean | 28 + jenifer | 38 + joan | 18 + joe | 20 + juanita | 58 + julie | 68 + karen | 48 + koko | 88 + larry | 60 + leah | 68 + lita | 25 + liza | 38 + louise | 98 + martie | 88 + mary | 8 + melissa | 28 + mike | 40 + nan | 28 + pamela | 48 + pat | 18 + paula | 68 + rean | 48 + sally | 34 + sam | 30 + sandra | 19 + sandy | 38 + sarah | 88 + sharon | 25 + sharon | 78 + sue | 50 + sumi | 38 + susan | 78 + teresa | 38 + trisha | 88 + trudy | 88 + uma | 78 + velma | 68 + wendy | 78 + zena | 98 + zola | 58 +(55 rows) + +-- +-- awk '{print $1,$2;}' person.data | +-- awk '{if(NF!=2){print $3,$2;}else{print;}}' - emp.data | +-- awk '{if(NF!=2){print $3,$2;}else{print;}}' - student.data | +-- awk 'BEGIN{FS=" ";}{if(NF!=1){print $4,$5;}else{print;}}' - stud_emp.data | +-- sort +1nr -2 +-- +SELECT p.name, p.age FROM person* p ORDER BY age using >, name; + name | age +---------+----- + esther | 98 + louise | 98 + zena | 98 + bertha | 88 + koko | 88 + martie | 88 + sarah | 88 + trisha | 88 + trudy | 88 + carmen | 78 + chris | 78 + sharon | 78 + susan | 78 + uma | 78 + wendy | 78 + julie | 68 + leah | 68 + paula | 68 + velma | 68 + larry | 60 + carina | 58 + jane | 58 + juanita | 58 + zola | 58 + sue | 50 + karen | 48 + pamela | 48 + rean | 48 + mike | 40 + belinda | 38 + jenifer | 38 + liza | 38 + sandy | 38 + sumi | 38 + teresa | 38 + sally | 34 + alex | 30 + sam | 30 + fred | 28 + jean | 28 + melissa | 28 + nan | 28 + lita | 25 + sharon | 25 + denise | 24 + bill | 20 + joe | 20 + sandra | 19 + diane | 18 + edna | 18 + gina | 18 + joan | 18 + pat | 18 + fanny | 8 + mary | 8 +(55 rows) + +-- +-- Test some cases involving whole-row Var referencing a subquery +-- +select foo from (select 1) as foo; + foo +----- + (1) +(1 row) + +select foo from (select null) as foo; + foo +----- + () +(1 row) + +select foo from (select 'xyzzy',1,null) as foo; + foo +------------ + (xyzzy,1,) +(1 row) + +-- +-- Test VALUES lists +-- +select * from onek, (values(147, 'RFAAAA'), (931, 'VJAAAA')) as v (i, j) + WHERE onek.unique1 = v.i and onek.stringu1 = v.j + ORDER BY unique1; + unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 | i | j +---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------+-----+-------- + 147 | 0 | 1 | 3 | 7 | 7 | 7 | 47 | 147 | 147 | 147 | 14 | 15 | RFAAAA | AAAAAA | AAAAxx | 147 | RFAAAA + 931 | 1 | 1 | 3 | 1 | 11 | 1 | 31 | 131 | 431 | 931 | 2 | 3 | VJAAAA | BAAAAA | HHHHxx | 931 | VJAAAA +(2 rows) + +-- a more complex case +-- looks like we're coding lisp :-) +select * from onek, + (values ((select i from + (values(10000), (2), (389), (1000), (2000), ((select 10029))) as foo(i) + order by i asc limit 1))) bar (i) + where onek.unique1 = bar.i + ORDER BY unique1; + unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 | i +---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------+--- + 2 | 326 | 0 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 4 | 5 | CAAAAA | OMAAAA | OOOOxx | 2 +(1 row) + +-- try VALUES in a subquery +select * from onek + where (unique1,ten) in (values (1,1), (20,0), (99,9), (17,99)) + order by unique1; + unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4 +---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+--------- + 1 | 214 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 3 | BAAAAA | GIAAAA | OOOOxx + 20 | 306 | 0 | 0 | 0 | 0 | 0 | 20 | 20 | 20 | 20 | 0 | 1 | UAAAAA | ULAAAA | OOOOxx + 99 | 101 | 1 | 3 | 9 | 19 | 9 | 99 | 99 | 99 | 99 | 18 | 19 | VDAAAA | XDAAAA | HHHHxx +(3 rows) + +-- VALUES is also legal as a standalone query or a set-operation member +VALUES (1,2), (3,4+4), (7,77.7); + column1 | column2 +---------+--------- + 1 | 2 + 3 | 8 + 7 | 77.7 +(3 rows) + +VALUES (1,2), (3,4+4), (7,77.7) +UNION ALL +SELECT 2+2, 57 +UNION ALL +TABLE int8_tbl +ORDER BY column1,column2; + column1 | column2 +------------------+------------------- + 1 | 2 + 3 | 8 + 4 | 57 + 7 | 77.7 + 123 | 456 + 123 | 4567890123456789 + 4567890123456789 | -4567890123456789 + 4567890123456789 | 123 + 4567890123456789 | 4567890123456789 +(9 rows) + +-- +-- Test ORDER BY options +-- +CREATE TEMP TABLE foo (f1 int); +ERROR: PG-XC does not yet support temporary tables +INSERT INTO foo VALUES (42),(3),(10),(7),(null),(null),(1); +ERROR: relation "foo" does not exist +LINE 1: INSERT INTO foo VALUES (42),(3),(10),(7),(null),(null),(1); + ^ +SELECT * FROM foo ORDER BY f1; +ERROR: relation "foo" does not exist +LINE 1: SELECT * FROM foo ORDER BY f1; + ^ +SELECT * FROM foo ORDER BY f1 ASC; -- same thing +ERROR: relation "foo" does not exist +LINE 1: SELECT * FROM foo ORDER BY f1 ASC; + ^ +SELECT * FROM foo ORDER BY f1 NULLS FIRST; +ERROR: relation "foo" does not exist +LINE 1: SELECT * FROM foo ORDER BY f1 NULLS FIRST; + ^ +SELECT * FROM foo ORDER BY f1 DESC; +ERROR: relation "foo" does not exist +LINE 1: SELECT * FROM foo ORDER BY f1 DESC; + ^ +SELECT * FROM foo ORDER BY f1 DESC NULLS LAST; +ERROR: relation "foo" does not exist +LINE 1: SELECT * FROM foo ORDER BY f1 DESC NULLS LAST; + ^ +-- check if indexscans do the right things +CREATE INDEX fooi ON foo (f1); +ERROR: relation "foo" does not exist +SET enable_sort = false; +SELECT * FROM foo ORDER BY f1; +ERROR: relation "foo" does not exist +LINE 1: SELECT * FROM foo ORDER BY f1; + ^ +SELECT * FROM foo ORDER BY f1 NULLS FIRST; +ERROR: relation "foo" does not exist +LINE 1: SELECT * FROM foo ORDER BY f1 NULLS FIRST; + ^ +SELECT * FROM foo ORDER BY f1 DESC; +ERROR: relation "foo" does not exist +LINE 1: SELECT * FROM foo ORDER BY f1 DESC; + ^ +SELECT * FROM foo ORDER BY f1 DESC NULLS LAST; +ERROR: relation "foo" does not exist +LINE 1: SELECT * FROM foo ORDER BY f1 DESC NULLS LAST; + ^ +DROP INDEX fooi; +ERROR: index "fooi" does not exist +CREATE INDEX fooi ON foo (f1 DESC); +ERROR: relation "foo" does not exist +SELECT * FROM foo ORDER BY f1; +ERROR: relation "foo" does not exist +LINE 1: SELECT * FROM foo ORDER BY f1; + ^ +SELECT * FROM foo ORDER BY f1 NULLS FIRST; +ERROR: relation "foo" does not exist +LINE 1: SELECT * FROM foo ORDER BY f1 NULLS FIRST; + ^ +SELECT * FROM foo ORDER BY f1 DESC; +ERROR: relation "foo" does not exist +LINE 1: SELECT * FROM foo ORDER BY f1 DESC; + ^ +SELECT * FROM foo ORDER BY f1 DESC NULLS LAST; +ERROR: relation "foo" does not exist +LINE 1: SELECT * FROM foo ORDER BY f1 DESC NULLS LAST; + ^ +DROP INDEX fooi; +ERROR: index "fooi" does not exist +CREATE INDEX fooi ON foo (f1 DESC NULLS LAST); +ERROR: relation "foo" does not exist +SELECT * FROM foo ORDER BY f1; +ERROR: relation "foo" does not exist +LINE 1: SELECT * FROM foo ORDER BY f1; + ^ +SELECT * FROM foo ORDER BY f1 NULLS FIRST; +ERROR: relation "foo" does not exist +LINE 1: SELECT * FROM foo ORDER BY f1 NULLS FIRST; + ^ +SELECT * FROM foo ORDER BY f1 DESC; +ERROR: relation "foo" does not exist +LINE 1: SELECT * FROM foo ORDER BY f1 DESC; + ^ +SELECT * FROM foo ORDER BY f1 DESC NULLS LAST; +ERROR: relation "foo" does not exist +LINE 1: SELECT * FROM foo ORDER BY f1 DESC NULLS LAST; + ^ +-- +-- Test some corner cases that have been known to confuse the planner +-- +-- ORDER BY on a constant doesn't really need any sorting +SELECT 1 AS x ORDER BY x; + x +--- + 1 +(1 row) + +-- But ORDER BY on a set-valued expression does +create function sillysrf(int) returns setof int as + 'values (1),(10),(2),($1)' language sql immutable; +select sillysrf(42) order by 1; + sillysrf +---------- + 1 + 2 + 10 + 42 +(4 rows) + +select sillysrf(-1) order by 1; + sillysrf +---------- + -1 + 1 + 2 + 10 +(4 rows) + +drop function sillysrf(int); +-- X = X isn't a no-op, it's effectively X IS NOT NULL assuming = is strict +-- (see bug #5084) +select * from (values (2),(null),(1)) v(k) where k = k order by k; + k +--- + 1 + 2 +(2 rows) + +select * from (values (2),(null),(1)) v(k) where k = k order by k desc; + k +--- + 2 + 1 +(2 rows) + ----------------------------------------------------------------------- Summary of changes: .../regress/expected/{select.out => select_1.out} | 329 +++++--------------- 1 files changed, 73 insertions(+), 256 deletions(-) copy src/test/regress/expected/{select.out => select_1.out} (80%) hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-23 08:23:30
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via 199cedb034caa11c185356ef473b442d67069d10 (commit) from 0ff5c459cb0ef20c04dc3675020c93812b2dd8dd (commit) - Log ----------------------------------------------------------------- commit 199cedb034caa11c185356ef473b442d67069d10 Author: Michael P <mic...@us...> Date: Wed Mar 23 17:22:01 2011 +0900 Fix for regression test sanity_check This output is correct, because it checks what has been created or not until this testcase is run. Due to XC's restrictions, this output is correct. diff --git a/src/test/regress/expected/sanity_check_1.out b/src/test/regress/expected/sanity_check_1.out new file mode 100644 index 0000000..504d080 --- /dev/null +++ b/src/test/regress/expected/sanity_check_1.out @@ -0,0 +1,170 @@ +VACUUM; +-- +-- sanity check, if we don't have indices the test will take years to +-- complete. But skip TOAST relations (since they will have varying +-- names depending on the current OID counter) as well as temp tables +-- of other backends (to avoid timing-dependent behavior). +-- +SELECT relname, relhasindex + FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = relnamespace + WHERE relkind = 'r' AND (nspname ~ '^pg_temp_') IS NOT TRUE + ORDER BY relname; + relname | relhasindex +-------------------------+------------- + a | f + a_star | f + abstime_tbl | f + aggtest | f + array_index_op_test | t + array_op_test | f + b | f + b_star | f + box_tbl | f + bt_f8_heap | t + bt_i4_heap | t + bt_name_heap | t + bt_txt_heap | t + c | f + c_star | f + char_tbl | f + circle_tbl | t + city | f + date_tbl | f + dept | f + e_star | f + emp | f + equipment_r | f + f_star | f + fast_emp4000 | t + firstparent | f + float4_tbl | f + float8_tbl | f + func_index_heap | f + hash_f8_heap | t + hash_i4_heap | t + hash_name_heap | t + hash_txt_heap | t + hobbies_r | f + ihighway | t + inet_tbl | f + inhe | f + inhf | f + inhx | f + int2_tbl | f + int4_tbl | f + int8_tbl | f + interval_tbl | f + iportaltest | f + log_table | f + lseg_tbl | f + main_table | f + money_data | f + num_data | f + num_exp_add | t + num_exp_div | t + num_exp_ln | t + num_exp_log10 | t + num_exp_mul | t + num_exp_power_10_ln | t + num_exp_sqrt | t + num_exp_sub | t + num_input_test | f + num_result | f + onek | t + path_tbl | f + person | f + pg_aggregate | t + pg_am | t + pg_amop | t + pg_amproc | t + pg_attrdef | t + pg_attribute | t + pg_auth_members | t + pg_authid | t + pg_cast | t + pg_class | t + pg_constraint | t + pg_conversion | t + pg_database | t + pg_db_role_setting | t + pg_default_acl | t + pg_depend | t + pg_description | t + pg_enum | t + pg_foreign_data_wrapper | t + pg_foreign_server | t + pg_index | t + pg_inherits | t + pg_language | t + pg_largeobject | t + pg_largeobject_metadata | t + pg_namespace | t + pg_opclass | t + pg_operator | t + pg_opfamily | t + pg_pltemplate | t + pg_proc | t + pg_rewrite | t + pg_shdepend | t + pg_shdescription | t + pg_statistic | t + pg_tablespace | t + pg_trigger | t + pg_ts_config | t + pg_ts_config_map | t + pg_ts_dict | t + pg_ts_parser | t + pg_ts_template | t + pg_type | t + pg_user_mapping | t + pgxc_class | t + point_tbl | t + polygon_tbl | t + real_city | f + reltime_tbl | f + road | t + secondparent | f + shighway | t + slow_emp4000 | f + sql_features | f + sql_implementation_info | f + sql_languages | f + sql_packages | f + sql_parts | f + sql_sizing | f + sql_sizing_profiles | f + student | f + t2 | f + t3 | f + t4 | f + tenk1 | t + tenk2 | t + test_tsvector | f + text_tbl | f + thirdparent | f + time_tbl | f + timestamp_tbl | f + timestamptz_tbl | f + timetz_tbl | f + tinterval_tbl | f + varchar_tbl | f + viewtest_tbl | f +(138 rows) + +-- +-- another sanity check: every system catalog that has OIDs should have +-- a unique index on OID. This ensures that the OIDs will be unique, +-- even after the OID counter wraps around. +-- We exclude non-system tables from the check by looking at nspname. +-- +SELECT relname, nspname +FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = relnamespace +WHERE relhasoids + AND ((nspname ~ '^pg_') IS NOT FALSE) + AND NOT EXISTS (SELECT 1 FROM pg_index i WHERE indrelid = c.oid + AND indkey[0] = -2 AND indnatts = 1 + AND indisunique AND indimmediate); + relname | nspname +---------+--------- +(0 rows) + ----------------------------------------------------------------------- Summary of changes: .../{sanity_check.out => sanity_check_1.out} | 26 ++++++++----------- 1 files changed, 11 insertions(+), 15 deletions(-) copy src/test/regress/expected/{sanity_check.out => sanity_check_1.out} (92%) hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-23 08:17:52
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via 0ff5c459cb0ef20c04dc3675020c93812b2dd8dd (commit) from fc40359f8466b1b03b295a046246aa56e164eb19 (commit) - Log ----------------------------------------------------------------- commit 0ff5c459cb0ef20c04dc3675020c93812b2dd8dd Author: Michael P <mic...@us...> Date: Wed Mar 23 17:16:01 2011 +0900 Fix for regression test typed_table Postgres-XC has a restriction with the creation of unique indexes: it must contain the modulo/hash distribution column. diff --git a/src/test/regress/expected/typed_table_1.out b/src/test/regress/expected/typed_table_1.out new file mode 100644 index 0000000..0f6a208 --- /dev/null +++ b/src/test/regress/expected/typed_table_1.out @@ -0,0 +1,80 @@ +CREATE TABLE ttable1 OF nothing; +ERROR: type "nothing" does not exist +CREATE TYPE person_type AS (id int, name text); +CREATE TABLE persons OF person_type; +SELECT * FROM persons; + id | name +----+------ +(0 rows) + +\d persons + Table "public.persons" + Column | Type | Modifiers +--------+---------+----------- + id | integer | + name | text | +Typed table of type: person_type + +CREATE FUNCTION get_all_persons() RETURNS SETOF person_type +LANGUAGE SQL +AS $$ + SELECT * FROM persons; +$$; +SELECT * FROM get_all_persons(); + id | name +----+------ +(0 rows) + +-- certain ALTER TABLE operations on typed tables are not allowed +ALTER TABLE persons ADD COLUMN comment text; +ERROR: cannot add column to typed table +ALTER TABLE persons DROP COLUMN name; +ERROR: cannot drop column from typed table +ALTER TABLE persons RENAME COLUMN id TO num; +ERROR: cannot rename column of typed table +ALTER TABLE persons ALTER COLUMN name TYPE varchar; +ERROR: cannot alter column type of typed table +CREATE TABLE stuff (id int); +ALTER TABLE persons INHERIT stuff; +ERROR: cannot change inheritance of typed table +CREATE TABLE personsx OF person_type (myname WITH OPTIONS NOT NULL); -- error +ERROR: column "myname" does not exist +CREATE TABLE persons2 OF person_type ( + id WITH OPTIONS PRIMARY KEY, + UNIQUE (name) +); +NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "persons2_pkey" for table "persons2" +ERROR: Unique index of partitioned table must contain the hash/modulo distribution column. +\d persons2 +CREATE TABLE persons3 OF person_type ( + PRIMARY KEY (id), + name WITH OPTIONS DEFAULT '' +); +NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "persons3_pkey" for table "persons3" +\d persons3 + Table "public.persons3" + Column | Type | Modifiers +--------+---------+------------------ + id | integer | not null + name | text | default ''::text +Indexes: + "persons3_pkey" PRIMARY KEY, btree (id) +Typed table of type: person_type + +CREATE TABLE persons4 OF person_type ( + name WITH OPTIONS NOT NULL, + name WITH OPTIONS DEFAULT '' -- error, specified more than once +); +ERROR: column "name" specified more than once +DROP TYPE person_type RESTRICT; +ERROR: cannot drop type person_type because other objects depend on it +DETAIL: table persons depends on type person_type +function get_all_persons() depends on type person_type +table persons3 depends on type person_type +HINT: Use DROP ... CASCADE to drop the dependent objects too. +DROP TYPE person_type CASCADE; +NOTICE: drop cascades to 3 other objects +DETAIL: drop cascades to table persons +drop cascades to function get_all_persons() +drop cascades to table persons3 +DROP TABLE stuff; ----------------------------------------------------------------------- Summary of changes: .../{typed_table.out => typed_table_1.out} | 16 ++-------------- 1 files changed, 2 insertions(+), 14 deletions(-) copy src/test/regress/expected/{typed_table.out => typed_table_1.out} (84%) hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-23 08:05:49
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via fc40359f8466b1b03b295a046246aa56e164eb19 (commit) from d5fae33cce224854b83d2e2c0da3e031a7c98bd7 (commit) - Log ----------------------------------------------------------------- commit fc40359f8466b1b03b295a046246aa56e164eb19 Author: Michael P <mic...@us...> Date: Wed Mar 23 17:04:13 2011 +0900 Fix for regression test create_aggregate Postgres-XC needs a specific test for aggregates as it uses an additional type called ctype for aggregate functions. This output is correct though. diff --git a/src/test/regress/expected/create_aggregate_1.out b/src/test/regress/expected/create_aggregate_1.out new file mode 100644 index 0000000..a1afc03 --- /dev/null +++ b/src/test/regress/expected/create_aggregate_1.out @@ -0,0 +1,73 @@ +-- +-- CREATE_AGGREGATE +-- +-- all functions CREATEd +CREATE AGGREGATE newavg ( + sfunc = int4_avg_accum, basetype = int4, stype = _int8, + finalfunc = int8_avg, + initcond1 = '{0,0}' +); +ERROR: aggregate ctype must be specified +-- test comments +COMMENT ON AGGREGATE newavg_wrong (int4) IS 'an agg comment'; +ERROR: aggregate newavg_wrong(integer) does not exist +COMMENT ON AGGREGATE newavg (int4) IS 'an agg comment'; +ERROR: aggregate newavg(integer) does not exist +COMMENT ON AGGREGATE newavg (int4) IS NULL; +ERROR: aggregate newavg(integer) does not exist +-- without finalfunc; test obsolete spellings 'sfunc1' etc +CREATE AGGREGATE newsum ( + sfunc1 = int4pl, basetype = int4, stype1 = int4, + initcond1 = '0' +); +ERROR: aggregate ctype must be specified +-- zero-argument aggregate +CREATE AGGREGATE newcnt (*) ( + sfunc = int8inc, stype = int8, + initcond = '0' +); +ERROR: aggregate ctype must be specified +-- old-style spelling of same +CREATE AGGREGATE oldcnt ( + sfunc = int8inc, basetype = 'ANY', stype = int8, + initcond = '0' +); +ERROR: aggregate ctype must be specified +-- aggregate that only cares about null/nonnull input +CREATE AGGREGATE newcnt ("any") ( + sfunc = int8inc_any, stype = int8, + initcond = '0' +); +ERROR: aggregate ctype must be specified +COMMENT ON AGGREGATE nosuchagg (*) IS 'should fail'; +ERROR: aggregate nosuchagg(*) does not exist +COMMENT ON AGGREGATE newcnt (*) IS 'an agg(*) comment'; +ERROR: aggregate newcnt(*) does not exist +COMMENT ON AGGREGATE newcnt ("any") IS 'an agg(any) comment'; +ERROR: aggregate newcnt("any") does not exist +-- multi-argument aggregate +create function sum3(int8,int8,int8) returns int8 as +'select $1 + $2 + $3' language sql strict immutable; +create aggregate sum2(int8,int8) ( + sfunc = sum3, stype = int8, + initcond = '0' +); +ERROR: aggregate ctype must be specified +-- multi-argument aggregates sensitive to distinct/order, strict/nonstrict +create type aggtype as (a integer, b integer, c text); +create function aggf_trans(aggtype[],integer,integer,text) returns aggtype[] +as 'select array_append($1,ROW($2,$3,$4)::aggtype)' +language sql strict immutable; +create function aggfns_trans(aggtype[],integer,integer,text) returns aggtype[] +as 'select array_append($1,ROW($2,$3,$4)::aggtype)' +language sql immutable; +create aggregate aggfstr(integer,integer,text) ( + sfunc = aggf_trans, stype = aggtype[], + initcond = '{}' +); +ERROR: aggregate ctype must be specified +create aggregate aggfns(integer,integer,text) ( + sfunc = aggfns_trans, stype = aggtype[], + initcond = '{}' +); +ERROR: aggregate ctype must be specified ----------------------------------------------------------------------- Summary of changes: ...create_aggregate.out => create_aggregate_1.out} | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) copy src/test/regress/expected/{create_aggregate.out => create_aggregate_1.out} (79%) hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-23 08:01:50
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via d5fae33cce224854b83d2e2c0da3e031a7c98bd7 (commit) from 4f6e09f20eca268e7282810c0d8ecbf83f15a43f (commit) - Log ----------------------------------------------------------------- commit d5fae33cce224854b83d2e2c0da3e031a7c98bd7 Author: Michael P <mic...@us...> Date: Wed Mar 23 17:00:29 2011 +0900 Fix for regression test create_misc Postgres-XC does not support yet INTO clause and INHERITS with multiple parents for distributed tables. This test has a dependency with create_table and drop. diff --git a/src/test/regress/expected/create_misc_1.out b/src/test/regress/expected/create_misc_1.out new file mode 100644 index 0000000..f728a4f --- /dev/null +++ b/src/test/regress/expected/create_misc_1.out @@ -0,0 +1,185 @@ +-- +-- CREATE_MISC +-- +-- CLASS POPULATION +-- (any resemblance to real life is purely coincidental) +-- +INSERT INTO tenk2 SELECT * FROM tenk1; +SELECT * INTO TABLE onek2 FROM onek; +ERROR: INTO clause not yet supported +INSERT INTO fast_emp4000 SELECT * FROM slow_emp4000; +SELECT * + INTO TABLE Bprime + FROM tenk1 + WHERE unique2 < 1000; +ERROR: INTO clause not yet supported +INSERT INTO hobbies_r (name, person) + SELECT 'posthacking', p.name + FROM person* p + WHERE p.name = 'mike' or p.name = 'jeff'; +INSERT INTO hobbies_r (name, person) + SELECT 'basketball', p.name + FROM person p + WHERE p.name = 'joe' or p.name = 'sally'; +INSERT INTO hobbies_r (name) VALUES ('skywalking'); +INSERT INTO equipment_r (name, hobby) VALUES ('advil', 'posthacking'); +INSERT INTO equipment_r (name, hobby) VALUES ('peet''s coffee', 'posthacking'); +INSERT INTO equipment_r (name, hobby) VALUES ('hightops', 'basketball'); +INSERT INTO equipment_r (name, hobby) VALUES ('guts', 'skywalking'); +SELECT * + INTO TABLE ramp + FROM road + WHERE name ~ '.*Ramp'; +ERROR: INTO clause not yet supported +INSERT INTO ihighway + SELECT * + FROM road + WHERE name ~ 'I- .*'; +INSERT INTO shighway + SELECT * + FROM road + WHERE name ~ 'State Hwy.*'; +UPDATE shighway + SET surface = 'asphalt'; +INSERT INTO a_star (class, a) VALUES ('a', 1); +INSERT INTO a_star (class, a) VALUES ('a', 2); +INSERT INTO a_star (class) VALUES ('a'); +INSERT INTO b_star (class, a, b) VALUES ('b', 3, 'mumble'::text); +INSERT INTO b_star (class, a) VALUES ('b', 4); +INSERT INTO b_star (class, b) VALUES ('b', 'bumble'::text); +INSERT INTO b_star (class) VALUES ('b'); +INSERT INTO c_star (class, a, c) VALUES ('c', 5, 'hi mom'::name); +INSERT INTO c_star (class, a) VALUES ('c', 6); +INSERT INTO c_star (class, c) VALUES ('c', 'hi paul'::name); +INSERT INTO c_star (class) VALUES ('c'); +INSERT INTO d_star (class, a, b, c, d) + VALUES ('d', 7, 'grumble'::text, 'hi sunita'::name, '0.0'::float8); +ERROR: relation "d_star" does not exist +LINE 1: INSERT INTO d_star (class, a, b, c, d) + ^ +INSERT INTO d_star (class, a, b, c) + VALUES ('d', 8, 'stumble'::text, 'hi koko'::name); +ERROR: relation "d_star" does not exist +LINE 1: INSERT INTO d_star (class, a, b, c) + ^ +INSERT INTO d_star (class, a, b, d) + VALUES ('d', 9, 'rumble'::text, '1.1'::float8); +ERROR: relation "d_star" does not exist +LINE 1: INSERT INTO d_star (class, a, b, d) + ^ +INSERT INTO d_star (class, a, c, d) + VALUES ('d', 10, 'hi kristin'::name, '10.01'::float8); +ERROR: relation "d_star" does not exist +LINE 1: INSERT INTO d_star (class, a, c, d) + ^ +INSERT INTO d_star (class, b, c, d) + VALUES ('d', 'crumble'::text, 'hi boris'::name, '100.001'::float8); +ERROR: relation "d_star" does not exist +LINE 1: INSERT INTO d_star (class, b, c, d) + ^ +INSERT INTO d_star (class, a, b) + VALUES ('d', 11, 'fumble'::text); +ERROR: relation "d_star" does not exist +LINE 1: INSERT INTO d_star (class, a, b) + ^ +INSERT INTO d_star (class, a, c) + VALUES ('d', 12, 'hi avi'::name); +ERROR: relation "d_star" does not exist +LINE 1: INSERT INTO d_star (class, a, c) + ^ +INSERT INTO d_star (class, a, d) + VALUES ('d', 13, '1000.0001'::float8); +ERROR: relation "d_star" does not exist +LINE 1: INSERT INTO d_star (class, a, d) + ^ +INSERT INTO d_star (class, b, c) + VALUES ('d', 'tumble'::text, 'hi andrew'::name); +ERROR: relation "d_star" does not exist +LINE 1: INSERT INTO d_star (class, b, c) + ^ +INSERT INTO d_star (class, b, d) + VALUES ('d', 'humble'::text, '10000.00001'::float8); +ERROR: relation "d_star" does not exist +LINE 1: INSERT INTO d_star (class, b, d) + ^ +INSERT INTO d_star (class, c, d) + VALUES ('d', 'hi ginger'::name, '100000.000001'::float8); +ERROR: relation "d_star" does not exist +LINE 1: INSERT INTO d_star (class, c, d) + ^ +INSERT INTO d_star (class, a) VALUES ('d', 14); +ERROR: relation "d_star" does not exist +LINE 1: INSERT INTO d_star (class, a) VALUES ('d', 14); + ^ +INSERT INTO d_star (class, b) VALUES ('d', 'jumble'::text); +ERROR: relation "d_star" does not exist +LINE 1: INSERT INTO d_star (class, b) VALUES ('d', 'jumble'::text); + ^ +INSERT INTO d_star (class, c) VALUES ('d', 'hi jolly'::name); +ERROR: relation "d_star" does not exist +LINE 1: INSERT INTO d_star (class, c) VALUES ('d', 'hi jolly'::name)... + ^ +INSERT INTO d_star (class, d) VALUES ('d', '1000000.0000001'::float8); +ERROR: relation "d_star" does not exist +LINE 1: INSERT INTO d_star (class, d) VALUES ('d', '1000000.0000001'... + ^ +INSERT INTO d_star (class) VALUES ('d'); +ERROR: relation "d_star" does not exist +LINE 1: INSERT INTO d_star (class) VALUES ('d'); + ^ +INSERT INTO e_star (class, a, c, e) + VALUES ('e', 15, 'hi carol'::name, '-1'::int2); +INSERT INTO e_star (class, a, c) + VALUES ('e', 16, 'hi bob'::name); +INSERT INTO e_star (class, a, e) + VALUES ('e', 17, '-2'::int2); +INSERT INTO e_star (class, c, e) + VALUES ('e', 'hi michelle'::name, '-3'::int2); +INSERT INTO e_star (class, a) + VALUES ('e', 18); +INSERT INTO e_star (class, c) + VALUES ('e', 'hi elisa'::name); +INSERT INTO e_star (class, e) + VALUES ('e', '-4'::int2); +INSERT INTO f_star (class, a, c, e, f) + VALUES ('f', 19, 'hi claire'::name, '-5'::int2, '(1,3),(2,4)'::polygon); +INSERT INTO f_star (class, a, c, e) + VALUES ('f', 20, 'hi mike'::name, '-6'::int2); +INSERT INTO f_star (class, a, c, f) + VALUES ('f', 21, 'hi marcel'::name, '(11,44),(22,55),(33,66)'::polygon); +INSERT INTO f_star (class, a, e, f) + VALUES ('f', 22, '-7'::int2, '(111,555),(222,666),(333,777),(444,888)'::polygon); +INSERT INTO f_star (class, c, e, f) + VALUES ('f', 'hi keith'::name, '-8'::int2, + '(1111,3333),(2222,4444)'::polygon); +INSERT INTO f_star (class, a, c) + VALUES ('f', 24, 'hi marc'::name); +INSERT INTO f_star (class, a, e) + VALUES ('f', 25, '-9'::int2); +INSERT INTO f_star (class, a, f) + VALUES ('f', 26, '(11111,33333),(22222,44444)'::polygon); +INSERT INTO f_star (class, c, e) + VALUES ('f', 'hi allison'::name, '-10'::int2); +INSERT INTO f_star (class, c, f) + VALUES ('f', 'hi jeff'::name, + '(111111,333333),(222222,444444)'::polygon); +INSERT INTO f_star (class, e, f) + VALUES ('f', '-11'::int2, '(1111111,3333333),(2222222,4444444)'::polygon); +INSERT INTO f_star (class, a) VALUES ('f', 27); +INSERT INTO f_star (class, c) VALUES ('f', 'hi carl'::name); +INSERT INTO f_star (class, e) VALUES ('f', '-12'::int2); +INSERT INTO f_star (class, f) + VALUES ('f', '(11111111,33333333),(22222222,44444444)'::polygon); +INSERT INTO f_star (class) VALUES ('f'); +-- +-- for internal portal (cursor) tests +-- +CREATE TABLE iportaltest ( + i int4, + d float4, + p polygon +); +INSERT INTO iportaltest (i, d, p) + VALUES (1, 3.567, '(3.0,1.0),(4.0,2.0)'::polygon); +INSERT INTO iportaltest (i, d, p) + VALUES (2, 89.05, '(4.0,2.0),(3.0,1.0)'::polygon); ----------------------------------------------------------------------- Summary of changes: .../create_misc.sql => expected/create_misc_1.out} | 121 ++++++++----------- 1 files changed, 51 insertions(+), 70 deletions(-) copy src/test/regress/{sql/create_misc.sql => expected/create_misc_1.out} (73%) hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-23 07:56:20
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via 4f6e09f20eca268e7282810c0d8ecbf83f15a43f (commit) from 286c8b5588c6159104f44f81f253400f20f0ceb9 (commit) - Log ----------------------------------------------------------------- commit 4f6e09f20eca268e7282810c0d8ecbf83f15a43f Author: Michael P <mic...@us...> Date: Wed Mar 23 16:55:30 2011 +0900 Fix for regression test copyselect Postgres-XC does not support yet SERIAL tables, so this output is correct. diff --git a/src/test/regress/expected/copyselect_1.out b/src/test/regress/expected/copyselect_1.out new file mode 100644 index 0000000..b45da29 --- /dev/null +++ b/src/test/regress/expected/copyselect_1.out @@ -0,0 +1,158 @@ +-- +-- Test cases for COPY (select) TO +-- +create table test1 (id serial, t text); +ERROR: Postgres-XC does not support SERIAL yet +DETAIL: The feature is not currently supported +insert into test1 (t) values ('a'); +ERROR: relation "test1" does not exist +LINE 1: insert into test1 (t) values ('a'); + ^ +insert into test1 (t) values ('b'); +ERROR: relation "test1" does not exist +LINE 1: insert into test1 (t) values ('b'); + ^ +insert into test1 (t) values ('c'); +ERROR: relation "test1" does not exist +LINE 1: insert into test1 (t) values ('c'); + ^ +insert into test1 (t) values ('d'); +ERROR: relation "test1" does not exist +LINE 1: insert into test1 (t) values ('d'); + ^ +insert into test1 (t) values ('e'); +ERROR: relation "test1" does not exist +LINE 1: insert into test1 (t) values ('e'); + ^ +create table test2 (id serial, t text); +ERROR: Postgres-XC does not support SERIAL yet +DETAIL: The feature is not currently supported +insert into test2 (t) values ('A'); +ERROR: relation "test2" does not exist +LINE 1: insert into test2 (t) values ('A'); + ^ +insert into test2 (t) values ('B'); +ERROR: relation "test2" does not exist +LINE 1: insert into test2 (t) values ('B'); + ^ +insert into test2 (t) values ('C'); +ERROR: relation "test2" does not exist +LINE 1: insert into test2 (t) values ('C'); + ^ +insert into test2 (t) values ('D'); +ERROR: relation "test2" does not exist +LINE 1: insert into test2 (t) values ('D'); + ^ +insert into test2 (t) values ('E'); +ERROR: relation "test2" does not exist +LINE 1: insert into test2 (t) values ('E'); + ^ +create view v_test1 +as select 'v_'||t from test1; +ERROR: relation "test1" does not exist +LINE 2: as select 'v_'||t from test1; + ^ +-- +-- Test COPY table TO +-- +copy test1 to stdout; +ERROR: relation "test1" does not exist +-- +-- This should fail +-- +copy v_test1 to stdout; +ERROR: relation "v_test1" does not exist +-- +-- Test COPY (select) TO +-- +copy (select t from test1 where id=1) to stdout; +ERROR: relation "test1" does not exist +LINE 1: copy (select t from test1 where id=1) to stdout; + ^ +-- +-- Test COPY (select for update) TO +-- +copy (select t from test1 where id=3 for update) to stdout; +ERROR: relation "test1" does not exist +LINE 1: copy (select t from test1 where id=3 for update) to stdout; + ^ +-- +-- This should fail +-- +copy (select t into temp test3 from test1 where id=3) to stdout; +ERROR: relation "test1" does not exist +LINE 1: copy (select t into temp test3 from test1 where id=3) to std... + ^ +-- +-- This should fail +-- +copy (select * from test1) from stdin; +ERROR: syntax error at or near "from" +LINE 1: copy (select * from test1) from stdin; + ^ +-- +-- This should fail +-- +copy (select * from test1) (t,id) to stdout; +ERROR: syntax error at or near "(" +LINE 1: copy (select * from test1) (t,id) to stdout; + ^ +-- +-- Test JOIN +-- +copy (select * from test1 join test2 using (id)) to stdout; +ERROR: relation "test1" does not exist +LINE 1: copy (select * from test1 join test2 using (id)) to stdout; + ^ +-- +-- Test UNION SELECT +-- +copy (select t from test1 where id = 1 UNION select * from v_test1 ORDER BY 1) to stdout; +ERROR: relation "test1" does not exist +LINE 1: copy (select t from test1 where id = 1 UNION select * from v... + ^ +-- +-- Test subselect +-- +copy (select * from (select t from test1 where id = 1 UNION select * from v_test1 ORDER BY 1) t1) to stdout; +ERROR: relation "test1" does not exist +LINE 1: copy (select * from (select t from test1 where id = 1 UNION ... + ^ +-- +-- Test headers, CSV and quotes +-- +copy (select t from test1 where id = 1) to stdout csv header force quote t; +ERROR: relation "test1" does not exist +LINE 1: copy (select t from test1 where id = 1) to stdout csv header... + ^ +-- +-- Test psql builtins, plain table +-- +\copy test1 to stdout +ERROR: relation "test1" does not exist +\copy: ERROR: relation "test1" does not exist +-- +-- This should fail +-- +\copy v_test1 to stdout +ERROR: relation "v_test1" does not exist +\copy: ERROR: relation "v_test1" does not exist +-- +-- Test \copy (select ...) +-- +\copy (select "id",'id','id""'||t,(id + 1)*id,t,"test1"."t" from test1 where id=3) to stdout +ERROR: relation "test1" does not exist +LINE 1: ... 'id""' ||t, ( id + 1 ) *id,t, "test1" . "t" from test1 wher... + ^ +\copy: ERROR: relation "test1" does not exist +LINE 1: ... 'id""' ||t, ( id + 1 ) *id,t, "test1" . "t" from test1 wher... + ^ +-- +-- Drop everything +-- +drop table test2; +ERROR: table "test2" does not exist +drop view v_test1; +ERROR: view "v_test1" does not exist +drop table test1; +ERROR: table "test1" does not exist ----------------------------------------------------------------------- Summary of changes: src/test/regress/expected/copyselect_1.out | 158 ++++++++++++++++++++++++++++ 1 files changed, 158 insertions(+), 0 deletions(-) create mode 100644 src/test/regress/expected/copyselect_1.out hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-23 07:49:03
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via 286c8b5588c6159104f44f81f253400f20f0ceb9 (commit) from bcce6a86720fb9ad81aa8ac0d84355aa27654504 (commit) - Log ----------------------------------------------------------------- commit 286c8b5588c6159104f44f81f253400f20f0ceb9 Author: Michael P <mic...@us...> Date: Wed Mar 23 16:47:41 2011 +0900 Fix for regression test copy and point For copy, SERIAL tables are not supported yet, so output is changed in consequence. For point, output file had a grammar mistake. diff --git a/src/test/regress/expected/.gitignore b/src/test/regress/expected/.gitignore index e14ce3a..ef0f486 100644 --- a/src/test/regress/expected/.gitignore +++ b/src/test/regress/expected/.gitignore @@ -1,8 +1,10 @@ /constraints.out /copy.out +/copy_1.out /create_function_1.out /create_function_2.out /largeobject.out /largeobject_1.out /misc.out /tablespace.out +/tablespace_1.out \ No newline at end of file diff --git a/src/test/regress/expected/point_1.out b/src/test/regress/expected/point_1.out index 472930c..c824a67 100644 --- a/src/test/regress/expected/point_1.out +++ b/src/test/regress/expected/point_1.out @@ -1,7 +1,7 @@ -- -- POINT -- --- Postgres-XC case: point type cannot be ordered so table +-- Postgres-XC case: point type cannot use ORDER BY so table -- is replicated for regression tests whatever the cluster configuration CREATE TABLE POINT_TBL(f1 point) DISTRIBUTE BY REPLICATION; INSERT INTO POINT_TBL(f1) VALUES ('(0.0,0.0)'); diff --git a/src/test/regress/output/copy_1.source b/src/test/regress/output/copy_1.source new file mode 100644 index 0000000..be49c09 --- /dev/null +++ b/src/test/regress/output/copy_1.source @@ -0,0 +1,100 @@ +-- +-- COPY +-- +-- CLASS POPULATION +-- (any resemblance to real life is purely coincidental) +-- +COPY aggtest FROM '@abs_srcdir@/data/agg.data'; +COPY onek FROM '@abs_srcdir@/data/onek.data'; +COPY onek TO '@abs_builddir@/results/onek.data'; +DELETE FROM onek; +COPY onek FROM '@abs_builddir@/results/onek.data'; +COPY tenk1 FROM '@abs_srcdir@/data/tenk.data'; +COPY slow_emp4000 FROM '@abs_srcdir@/data/rect.data'; +COPY person FROM '@abs_srcdir@/data/person.data'; +COPY emp FROM '@abs_srcdir@/data/emp.data'; +COPY student FROM '@abs_srcdir@/data/student.data'; +COPY stud_emp FROM '@abs_srcdir@/data/stud_emp.data'; +ERROR: relation "stud_emp" does not exist +COPY road FROM '@abs_srcdir@/data/streets.data'; +COPY real_city FROM '@abs_srcdir@/data/real_city.data'; +COPY hash_i4_heap FROM '@abs_srcdir@/data/hash.data'; +COPY hash_name_heap FROM '@abs_srcdir@/data/hash.data'; +COPY hash_txt_heap FROM '@abs_srcdir@/data/hash.data'; +COPY hash_f8_heap FROM '@abs_srcdir@/data/hash.data'; +COPY test_tsvector FROM '@abs_srcdir@/data/tsearch.data'; +-- the data in this file has a lot of duplicates in the index key +-- fields, leading to long bucket chains and lots of table expansion. +-- this is therefore a stress test of the bucket overflow code (unlike +-- the data in hash.data, which has unique index keys). +-- +-- COPY hash_ovfl_heap FROM '@abs_srcdir@/data/hashovfl.data'; +COPY bt_i4_heap FROM '@abs_srcdir@/data/desc.data'; +COPY bt_name_heap FROM '@abs_srcdir@/data/hash.data'; +COPY bt_txt_heap FROM '@abs_srcdir@/data/desc.data'; +COPY bt_f8_heap FROM '@abs_srcdir@/data/hash.data'; +COPY array_op_test FROM '@abs_srcdir@/data/array.data'; +COPY array_index_op_test FROM '@abs_srcdir@/data/array.data'; +--- test copying in CSV mode with various styles +--- of embedded line ending characters +create temp table copytest ( + style text, + test text, + filler int); +ERROR: PG-XC does not yet support temporary tables +insert into copytest values('DOS',E'abc\r\ndef',1); +ERROR: relation "copytest" does not exist +LINE 1: insert into copytest values('DOS',E'abc\r\ndef',1); + ^ +insert into copytest values('Unix',E'abc\ndef',2); +ERROR: relation "copytest" does not exist +LINE 1: insert into copytest values('Unix',E'abc\ndef',2); + ^ +insert into copytest values('Mac',E'abc\rdef',3); +ERROR: relation "copytest" does not exist +LINE 1: insert into copytest values('Mac',E'abc\rdef',3); + ^ +insert into copytest values(E'esc\\ape',E'a\\r\\\r\\\n\\nb',4); +ERROR: relation "copytest" does not exist +LINE 1: insert into copytest values(E'esc\\ape',E'a\\r\\\r\\\n\\nb',... + ^ +copy copytest to '@abs_builddir@/results/copytest.csv' csv; +ERROR: relation "copytest" does not exist +create temp table copytest2 (like copytest); +ERROR: relation "copytest" does not exist +LINE 1: create temp table copytest2 (like copytest); + ^ +copy copytest2 from '@abs_builddir@/results/copytest.csv' csv; +ERROR: relation "copytest2" does not exist +select * from copytest except select * from copytest2; +ERROR: relation "copytest" does not exist +LINE 1: select * from copytest except select * from copytest2; + ^ +truncate copytest2; +ERROR: relation "copytest2" does not exist +--- same test but with an escape char different from quote char +copy copytest to '@abs_builddir@/results/copytest.csv' csv quote '''' escape E'\\'; +ERROR: relation "copytest" does not exist +copy copytest2 from '@abs_builddir@/results/copytest.csv' csv quote '''' escape E'\\'; +ERROR: relation "copytest2" does not exist +select * from copytest except select * from copytest2; +ERROR: relation "copytest" does not exist +LINE 1: select * from copytest except select * from copytest2; + ^ +-- test header line feature +create temp table copytest3 ( + c1 int, + "col with , comma" text, + "col with "" quote" int); +ERROR: PG-XC does not yet support temporary tables +copy copytest3 from stdin csv header; +ERROR: relation "copytest3" does not exist +this is just a line full of junk that would error out if parsed +1,a,1 +2,b,2 +\. +invalid command \. +copy copytest3 to stdout csv header; +ERROR: syntax error at or near "this" +LINE 1: this is just a line full of junk that would error out if par... + ^ ----------------------------------------------------------------------- Summary of changes: src/test/regress/expected/.gitignore | 2 + src/test/regress/expected/point_1.out | 2 +- .../{input/copy.source => output/copy_1.source} | 77 +++++++++----------- 3 files changed, 37 insertions(+), 44 deletions(-) copy src/test/regress/{input/copy.source => output/copy_1.source} (66%) hooks/post-receive -- Postgres-XC |