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-24 16:44:52
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via c696488cee189743e90303c52954f9e4d791e18c (commit) from d12c17cc28433adedc44e63f5eb0f34b79c8523f (commit) - Log ----------------------------------------------------------------- commit c696488cee189743e90303c52954f9e4d791e18c Author: Michael P <mic...@us...> Date: Fri Mar 25 01:41:10 2011 +0900 Block DEFERRED constraints (DEFERRABLE) DEFERRED constraints are checked at transaction COMMIT. In a Postgres-XC transaction that involved DML failing on DEFERRED constraints, Datanodes return to Coordinator transaction errors, this was resulting in transaction partially committed in the cluster. In the case of pg_regress, test case constraints was putting the cluster in a stall state. IMMEDIATE constraints (default) are still available. diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index c8928f3..896ed43 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -3867,6 +3867,14 @@ AfterTriggerSetState(ConstraintsSetStmt *stmt) if (afterTriggers == NULL) return; +#ifdef PGXC + if (stmt->deferred) + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("Postgres-XC does not support DEFERRED constraints yet"), + errdetail("The feature is not currently supported"))); +#endif + /* * If in a subtransaction, and we didn't save the current state already, * save it so it can be restored if the subtransaction aborts. diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index 6cfc1e6..21b5cfd 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -1345,6 +1345,15 @@ transformIndexConstraint(Constraint *constraint, CreateStmtContext *cxt) index->deferrable = constraint->deferrable; index->initdeferred = constraint->initdeferred; +#ifdef PGXC + /* DEFERRABLE INITIALLY DEFERRED constraints are not supported in Postgres-XC */ + if (constraint->deferrable && constraint->initdeferred) + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("Postgres-XC does not support DEFERRED constraints yet"), + errdetail("The feature is not currently supported"))); +#endif + if (constraint->conname != NULL) index->idxname = pstrdup(constraint->conname); else @@ -2290,6 +2299,12 @@ transformConstraintAttrs(ParseState *pstate, List *constraintList) break; case CONSTR_ATTR_DEFERRED: +#ifdef PGXC + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("Postgres-XC does not support DEFERRED constraints yet"), + errdetail("The feature is not currently supported"))); +#endif if (!SUPPORTS_ATTRS(lastprimarycon)) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), ----------------------------------------------------------------------- Summary of changes: src/backend/commands/trigger.c | 8 ++++++++ src/backend/parser/parse_utilcmd.c | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 0 deletions(-) hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-24 14:44:39
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been deleted was 12b82128657ffc41a525828c1c1f5763f7b88cb9 ----------------------------------------------------------------------- 12b82128657ffc41a525828c1c1f5763f7b88cb9 This change will fix bug ID 3220353,a test case in strings.sql was failing because of missing handling for aliases in planner ----------------------------------------------------------------------- hooks/post-receive -- Postgres-XC |
From: Abbas B. <ga...@us...> - 2011-03-24 09:53:09
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via 12b82128657ffc41a525828c1c1f5763f7b88cb9 (commit) from d12c17cc28433adedc44e63f5eb0f34b79c8523f (commit) - Log ----------------------------------------------------------------- commit 12b82128657ffc41a525828c1c1f5763f7b88cb9 Author: Abbas <abb...@en...> Date: Thu Mar 24 14:52:29 2011 +0500 This change will fix bug ID 3220353,a test case in strings.sql was failing because of missing handling for aliases in planner diff --git a/src/backend/pgxc/plan/planner.c b/src/backend/pgxc/plan/planner.c index e4d13cb..0d6d813 100644 --- a/src/backend/pgxc/plan/planner.c +++ b/src/backend/pgxc/plan/planner.c @@ -2244,6 +2244,10 @@ reconstruct_step_query(List *rtable, bool has_order_by, List *extra_sort, foreach(l, sub_tlist) { TargetEntry *tle = (TargetEntry *) lfirst(l); + + if (tle->resjunk) + continue; + char *exprstr = deparse_expression((Node *) tle->expr, context, useprefix, false); ----------------------------------------------------------------------- Summary of changes: src/backend/pgxc/plan/planner.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-24 09:48:47
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via d12c17cc28433adedc44e63f5eb0f34b79c8523f (commit) from d4b2b6421ffb3d443a2f9bf923b9615f4c5752fb (commit) - Log ----------------------------------------------------------------- commit d12c17cc28433adedc44e63f5eb0f34b79c8523f Author: Michael P <mic...@us...> Date: Thu Mar 24 18:47:29 2011 +0900 Fix for regression test truncate Postgres-XC does not support yet SERIAL, TRIGGER and INHERITS based on multiple parents for distributed tables, so this output is correct. diff --git a/src/test/regress/expected/truncate_1.out b/src/test/regress/expected/truncate_1.out new file mode 100644 index 0000000..4bccc4e --- /dev/null +++ b/src/test/regress/expected/truncate_1.out @@ -0,0 +1,418 @@ +-- Test basic TRUNCATE functionality. +CREATE TABLE truncate_a (col1 integer primary key); +NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "truncate_a_pkey" for table "truncate_a" +INSERT INTO truncate_a VALUES (1); +INSERT INTO truncate_a VALUES (2); +SELECT * FROM truncate_a ORDER BY 1; + col1 +------ + 1 + 2 +(2 rows) + +-- Roll truncate back +BEGIN; +TRUNCATE truncate_a; +ROLLBACK; +SELECT * FROM truncate_a ORDER BY 1; + col1 +------ + 1 + 2 +(2 rows) + +-- Commit the truncate this time +BEGIN; +TRUNCATE truncate_a; +COMMIT; +SELECT * FROM truncate_a ORDER BY 1; + col1 +------ +(0 rows) + +-- Test foreign-key checks +CREATE TABLE trunc_b (a int REFERENCES truncate_a); +CREATE TABLE trunc_c (a serial PRIMARY KEY); +ERROR: Postgres-XC does not support SERIAL yet +DETAIL: The feature is not currently supported +CREATE TABLE trunc_d (a int REFERENCES trunc_c); +ERROR: relation "trunc_c" does not exist +CREATE TABLE trunc_e (a int REFERENCES truncate_a, b int REFERENCES trunc_c); +ERROR: relation "trunc_c" does not exist +TRUNCATE TABLE truncate_a; -- fail +ERROR: cannot truncate a table referenced in a foreign key constraint +DETAIL: Table "trunc_b" references "truncate_a". +HINT: Truncate table "trunc_b" at the same time, or use TRUNCATE ... CASCADE. +TRUNCATE TABLE truncate_a,trunc_b; -- fail +TRUNCATE TABLE truncate_a,trunc_b,trunc_e; -- ok +ERROR: relation "trunc_e" does not exist +TRUNCATE TABLE truncate_a,trunc_e; -- fail +ERROR: relation "trunc_e" does not exist +TRUNCATE TABLE trunc_c; -- fail +ERROR: relation "trunc_c" does not exist +TRUNCATE TABLE trunc_c,trunc_d; -- fail +ERROR: relation "trunc_c" does not exist +TRUNCATE TABLE trunc_c,trunc_d,trunc_e; -- ok +ERROR: relation "trunc_c" does not exist +TRUNCATE TABLE trunc_c,trunc_d,trunc_e,truncate_a; -- fail +ERROR: relation "trunc_c" does not exist +TRUNCATE TABLE trunc_c,trunc_d,trunc_e,truncate_a,trunc_b; -- ok +ERROR: relation "trunc_c" does not exist +TRUNCATE TABLE truncate_a RESTRICT; -- fail +ERROR: cannot truncate a table referenced in a foreign key constraint +DETAIL: Table "trunc_b" references "truncate_a". +HINT: Truncate table "trunc_b" at the same time, or use TRUNCATE ... CASCADE. +TRUNCATE TABLE truncate_a CASCADE; -- ok +NOTICE: truncate cascades to table "trunc_b" +-- circular references +ALTER TABLE truncate_a ADD FOREIGN KEY (col1) REFERENCES trunc_c; +ERROR: relation "trunc_c" does not exist +-- Add some data to verify that truncating actually works ... +INSERT INTO trunc_c VALUES (1); +ERROR: relation "trunc_c" does not exist +LINE 1: INSERT INTO trunc_c VALUES (1); + ^ +INSERT INTO truncate_a VALUES (1); +INSERT INTO trunc_b VALUES (1); +INSERT INTO trunc_d VALUES (1); +ERROR: relation "trunc_d" does not exist +LINE 1: INSERT INTO trunc_d VALUES (1); + ^ +INSERT INTO trunc_e VALUES (1,1); +ERROR: relation "trunc_e" does not exist +LINE 1: INSERT INTO trunc_e VALUES (1,1); + ^ +TRUNCATE TABLE trunc_c; +ERROR: relation "trunc_c" does not exist +TRUNCATE TABLE trunc_c,truncate_a; +ERROR: relation "trunc_c" does not exist +TRUNCATE TABLE trunc_c,truncate_a,trunc_d; +ERROR: relation "trunc_c" does not exist +TRUNCATE TABLE trunc_c,truncate_a,trunc_d,trunc_e; +ERROR: relation "trunc_c" does not exist +TRUNCATE TABLE trunc_c,truncate_a,trunc_d,trunc_e,trunc_b; +ERROR: relation "trunc_c" does not exist +-- Verify that truncating did actually work +SELECT * FROM truncate_a + UNION ALL + SELECT * FROM trunc_c + UNION ALL + SELECT * FROM trunc_b + UNION ALL + SELECT * FROM trunc_d; +ERROR: relation "trunc_c" does not exist +LINE 3: SELECT * FROM trunc_c + ^ +SELECT * FROM trunc_e; +ERROR: relation "trunc_e" does not exist +LINE 1: SELECT * FROM trunc_e; + ^ +-- Add data again to test TRUNCATE ... CASCADE +INSERT INTO trunc_c VALUES (1); +ERROR: relation "trunc_c" does not exist +LINE 1: INSERT INTO trunc_c VALUES (1); + ^ +INSERT INTO truncate_a VALUES (1); +ERROR: duplicate key value violates unique constraint "truncate_a_pkey" +INSERT INTO trunc_b VALUES (1); +INSERT INTO trunc_d VALUES (1); +ERROR: relation "trunc_d" does not exist +LINE 1: INSERT INTO trunc_d VALUES (1); + ^ +INSERT INTO trunc_e VALUES (1,1); +ERROR: relation "trunc_e" does not exist +LINE 1: INSERT INTO trunc_e VALUES (1,1); + ^ +TRUNCATE TABLE trunc_c CASCADE; -- ok +ERROR: relation "trunc_c" does not exist +SELECT * FROM truncate_a + UNION ALL + SELECT * FROM trunc_c + UNION ALL + SELECT * FROM trunc_b + UNION ALL + SELECT * FROM trunc_d; +ERROR: relation "trunc_c" does not exist +LINE 3: SELECT * FROM trunc_c + ^ +SELECT * FROM trunc_e; +ERROR: relation "trunc_e" does not exist +LINE 1: SELECT * FROM trunc_e; + ^ +DROP TABLE truncate_a,trunc_c,trunc_b,trunc_d,trunc_e CASCADE; +ERROR: table "trunc_c" does not exist +-- Test TRUNCATE with inheritance +CREATE TABLE trunc_f (col1 integer primary key); +NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "trunc_f_pkey" for table "trunc_f" +INSERT INTO trunc_f VALUES (1); +INSERT INTO trunc_f VALUES (2); +CREATE TABLE trunc_fa (col2a text) INHERITS (trunc_f); +INSERT INTO trunc_fa VALUES (3, 'three'); +CREATE TABLE trunc_fb (col2b int) INHERITS (trunc_f); +INSERT INTO trunc_fb VALUES (4, 444); +CREATE TABLE trunc_faa (col3 text) INHERITS (trunc_fa); +INSERT INTO trunc_faa VALUES (5, 'five', 'FIVE'); +BEGIN; +SELECT * FROM trunc_f ORDER BY 1; + col1 +------ + 1 + 2 + 3 + 4 + 5 +(5 rows) + +TRUNCATE trunc_f; +SELECT * FROM trunc_f ORDER BY 1; + col1 +------ +(0 rows) + +ROLLBACK; +BEGIN; +SELECT * FROM trunc_f ORDER BY 1; + col1 +------ + 1 + 2 + 3 + 4 + 5 +(5 rows) + +TRUNCATE ONLY trunc_f; +SELECT * FROM trunc_f ORDER BY 1; + col1 +------ + 3 + 4 + 5 +(3 rows) + +ROLLBACK; +BEGIN; +SELECT * FROM trunc_f ORDER BY 1; + col1 +------ + 1 + 2 + 3 + 4 + 5 +(5 rows) + +SELECT * FROM trunc_fa ORDER BY 1, 2; + col1 | col2a +------+------- + 3 | three + 5 | five +(2 rows) + +SELECT * FROM trunc_faa ORDER BY 1, 2; + col1 | col2a | col3 +------+-------+------ + 5 | five | FIVE +(1 row) + +TRUNCATE ONLY trunc_fb, ONLY trunc_fa; +SELECT * FROM trunc_f ORDER BY 1; + col1 +------ + 1 + 2 + 5 +(3 rows) + +SELECT * FROM trunc_fa ORDER BY 1, 2; + col1 | col2a +------+------- + 5 | five +(1 row) + +SELECT * FROM trunc_faa ORDER BY 1, 2; + col1 | col2a | col3 +------+-------+------ + 5 | five | FIVE +(1 row) + +ROLLBACK; +BEGIN; +SELECT * FROM trunc_f ORDER BY 1; + col1 +------ + 1 + 2 + 3 + 4 + 5 +(5 rows) + +SELECT * FROM trunc_fa ORDER BY 1, 2; + col1 | col2a +------+------- + 3 | three + 5 | five +(2 rows) + +SELECT * FROM trunc_faa ORDER BY 1, 2; + col1 | col2a | col3 +------+-------+------ + 5 | five | FIVE +(1 row) + +TRUNCATE ONLY trunc_fb, trunc_fa; +SELECT * FROM trunc_f ORDER BY 1; + col1 +------ + 1 + 2 +(2 rows) + +SELECT * FROM trunc_fa ORDER BY 1, 2; + col1 | col2a +------+------- +(0 rows) + +SELECT * FROM trunc_faa ORDER BY 1, 2; + col1 | col2a | col3 +------+-------+------ +(0 rows) + +ROLLBACK; +DROP TABLE trunc_f CASCADE; +NOTICE: drop cascades to 3 other objects +DETAIL: drop cascades to table trunc_fa +drop cascades to table trunc_faa +drop cascades to table trunc_fb +-- Test ON TRUNCATE triggers +CREATE TABLE trunc_trigger_test (f1 int, f2 text, f3 text); +CREATE TABLE trunc_trigger_log (tgop text, tglevel text, tgwhen text, + tgargv text, tgtable name, rowcount bigint); +CREATE FUNCTION trunctrigger() RETURNS trigger as $$ +declare c bigint; +begin + execute 'select count(*) from ' || quote_ident(tg_table_name) into c; + insert into trunc_trigger_log values + (TG_OP, TG_LEVEL, TG_WHEN, TG_ARGV[0], tg_table_name, c); + return null; +end; +$$ LANGUAGE plpgsql; +-- basic before trigger +INSERT INTO trunc_trigger_test VALUES(1, 'foo', 'bar'), (2, 'baz', 'quux'); +CREATE TRIGGER t +BEFORE TRUNCATE ON trunc_trigger_test +FOR EACH STATEMENT +EXECUTE PROCEDURE trunctrigger('before trigger truncate'); +ERROR: Postgres-XC does not support TRIGGER yet +DETAIL: The feature is not currently supported +SELECT count(*) as "Row count in test table" FROM trunc_trigger_test; + Row count in test table +------------------------- + 2 +(1 row) + +SELECT * FROM trunc_trigger_log; + tgop | tglevel | tgwhen | tgargv | tgtable | rowcount +------+---------+--------+--------+---------+---------- +(0 rows) + +TRUNCATE trunc_trigger_test; +SELECT count(*) as "Row count in test table" FROM trunc_trigger_test; + Row count in test table +------------------------- + 0 +(1 row) + +SELECT * FROM trunc_trigger_log; + tgop | tglevel | tgwhen | tgargv | tgtable | rowcount +------+---------+--------+--------+---------+---------- +(0 rows) + +DROP TRIGGER t ON trunc_trigger_test; +ERROR: trigger "t" for table "trunc_trigger_test" does not exist +truncate trunc_trigger_log; +-- same test with an after trigger +INSERT INTO trunc_trigger_test VALUES(1, 'foo', 'bar'), (2, 'baz', 'quux'); +CREATE TRIGGER tt +AFTER TRUNCATE ON trunc_trigger_test +FOR EACH STATEMENT +EXECUTE PROCEDURE trunctrigger('after trigger truncate'); +ERROR: Postgres-XC does not support TRIGGER yet +DETAIL: The feature is not currently supported +SELECT count(*) as "Row count in test table" FROM trunc_trigger_test; + Row count in test table +------------------------- + 2 +(1 row) + +SELECT * FROM trunc_trigger_log; + tgop | tglevel | tgwhen | tgargv | tgtable | rowcount +------+---------+--------+--------+---------+---------- +(0 rows) + +TRUNCATE trunc_trigger_test; +SELECT count(*) as "Row count in test table" FROM trunc_trigger_test; + Row count in test table +------------------------- + 0 +(1 row) + +SELECT * FROM trunc_trigger_log; + tgop | tglevel | tgwhen | tgargv | tgtable | rowcount +------+---------+--------+--------+---------+---------- +(0 rows) + +DROP TABLE trunc_trigger_test; +DROP TABLE trunc_trigger_log; +DROP FUNCTION trunctrigger(); +-- test TRUNCATE ... RESTART IDENTITY +CREATE SEQUENCE truncate_a_id1 START WITH 33; +CREATE TABLE truncate_a (id serial, + id1 integer default nextval('truncate_a_id1')); +ERROR: Postgres-XC does not support SERIAL yet +DETAIL: The feature is not currently supported +ALTER SEQUENCE truncate_a_id1 OWNED BY truncate_a.id1; +ERROR: column "id1" of relation "truncate_a" does not exist +INSERT INTO truncate_a DEFAULT VALUES; +ERROR: null value in column "col1" violates not-null constraint +INSERT INTO truncate_a DEFAULT VALUES; +ERROR: null value in column "col1" violates not-null constraint +SELECT * FROM truncate_a ORDER BY id; +ERROR: column "id" does not exist +LINE 1: SELECT * FROM truncate_a ORDER BY id; + ^ +TRUNCATE truncate_a; +ERROR: cannot truncate a table referenced in a foreign key constraint +DETAIL: Table "trunc_b" references "truncate_a". +HINT: Truncate table "trunc_b" at the same time, or use TRUNCATE ... CASCADE. +INSERT INTO truncate_a DEFAULT VALUES; +ERROR: null value in column "col1" violates not-null constraint +INSERT INTO truncate_a DEFAULT VALUES; +ERROR: null value in column "col1" violates not-null constraint +SELECT * FROM truncate_a ORDER BY id; +ERROR: column "id" does not exist +LINE 1: SELECT * FROM truncate_a ORDER BY id; + ^ +TRUNCATE truncate_a RESTART IDENTITY; +ERROR: cannot truncate a table referenced in a foreign key constraint +DETAIL: Table "trunc_b" references "truncate_a". +HINT: Truncate table "trunc_b" at the same time, or use TRUNCATE ... CASCADE. +INSERT INTO truncate_a DEFAULT VALUES; +ERROR: null value in column "col1" violates not-null constraint +INSERT INTO truncate_a DEFAULT VALUES; +ERROR: null value in column "col1" violates not-null constraint +SELECT * FROM truncate_a ORDER BY id; +ERROR: column "id" does not exist +LINE 1: SELECT * FROM truncate_a ORDER BY id; + ^ +DROP TABLE truncate_a; +ERROR: cannot drop table truncate_a because other objects depend on it +DETAIL: constraint trunc_b_a_fkey on table trunc_b depends on table truncate_a +HINT: Use DROP ... CASCADE to drop the dependent objects too. +SELECT nextval('truncate_a_id1'); -- fail, seq should have been dropped + nextval +--------- + 33 +(1 row) + ----------------------------------------------------------------------- Summary of changes: .../expected/{truncate.out => truncate_1.out} | 173 +++++++++++--------- 1 files changed, 93 insertions(+), 80 deletions(-) copy src/test/regress/expected/{truncate.out => truncate_1.out} (71%) hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-24 09:38:43
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been deleted was dadf2a7116e557d57fb1c2badf321c53d148ac63 ----------------------------------------------------------------------- dadf2a7116e557d57fb1c2badf321c53d148ac63 Fix for regression test without_oid ----------------------------------------------------------------------- hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-24 09:34:04
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via dadf2a7116e557d57fb1c2badf321c53d148ac63 (commit) from d4b2b6421ffb3d443a2f9bf923b9615f4c5752fb (commit) - Log ----------------------------------------------------------------- commit dadf2a7116e557d57fb1c2badf321c53d148ac63 Author: Michael P <mic...@us...> Date: Thu Mar 24 18:32:52 2011 +0900 Fix for regression test without_oid SERIAL and TRIGGER are not yet supported by Postgres-XC, so this output is correct. diff --git a/src/test/regress/expected/without_oid_1.out b/src/test/regress/expected/without_oid_1.out new file mode 100644 index 0000000..5c03a3e --- /dev/null +++ b/src/test/regress/expected/without_oid_1.out @@ -0,0 +1,111 @@ +-- +-- WITHOUT OID +-- +-- +-- This test tries to verify that WITHOUT OIDS actually saves space. +-- On machines where MAXALIGN is 8, WITHOUT OIDS may or may not save any +-- space, depending on the size of the tuple header + null bitmap. +-- As of 8.3 we need a null bitmap of 8 or less bits for the difference +-- to appear. +-- +CREATE TABLE wi (i INT, + n1 int, n2 int, n3 int, n4 int, + n5 int, n6 int, n7 int) WITH OIDS; +CREATE TABLE wo (i INT, + n1 int, n2 int, n3 int, n4 int, + n5 int, n6 int, n7 int) WITHOUT OIDS; +INSERT INTO wi VALUES (1); -- 1 +INSERT INTO wo SELECT i FROM wi; -- 1 +INSERT INTO wo SELECT i+1 FROM wi; -- 1+1=2 +INSERT INTO wi SELECT i+1 FROM wo; -- 1+2=3 +INSERT INTO wi SELECT i+3 FROM wi; -- 3+3=6 +INSERT INTO wo SELECT i+2 FROM wi; -- 2+6=8 +INSERT INTO wo SELECT i+8 FROM wo; -- 8+8=16 +INSERT INTO wi SELECT i+6 FROM wo; -- 6+16=22 +INSERT INTO wi SELECT i+22 FROM wi; -- 22+22=44 +INSERT INTO wo SELECT i+16 FROM wi; -- 16+44=60 +INSERT INTO wo SELECT i+60 FROM wo; -- 60+60=120 +INSERT INTO wi SELECT i+44 FROM wo; -- 44+120=164 +INSERT INTO wi SELECT i+164 FROM wi; -- 164+164=328 +INSERT INTO wo SELECT i+120 FROM wi; -- 120+328=448 +INSERT INTO wo SELECT i+448 FROM wo; -- 448+448=896 +INSERT INTO wi SELECT i+328 FROM wo; -- 328+896=1224 +INSERT INTO wi SELECT i+1224 FROM wi; -- 1224+1224=2448 +INSERT INTO wo SELECT i+896 FROM wi; -- 896+2448=3344 +INSERT INTO wo SELECT i+3344 FROM wo; -- 3344+3344=6688 +INSERT INTO wi SELECT i+2448 FROM wo; -- 2448+6688=9136 +INSERT INTO wo SELECT i+6688 FROM wi WHERE i<=2448; -- 6688+2448=9136 +SELECT count(oid) FROM wi; + count +------- + 1 +(1 row) + +-- should fail +SELECT count(oid) FROM wo; +ERROR: column "oid" does not exist +LINE 1: SELECT count(oid) FROM wo; + ^ +VACUUM ANALYZE wi; +VACUUM ANALYZE wo; +SELECT min(relpages) < max(relpages), min(reltuples) - max(reltuples) + FROM pg_class + WHERE relname IN ('wi', 'wo'); + ?column? | ?column? +----------+---------- + f | -3 +(1 row) + +DROP TABLE wi; +DROP TABLE wo; +-- +-- WITH / WITHOUT OIDS in CREATE TABLE AS +-- +CREATE TABLE create_table_test ( + a int, + b int +); +COPY create_table_test FROM stdin; +CREATE TABLE create_table_test2 WITH OIDS AS + SELECT a + b AS c1, a - b AS c2 FROM create_table_test; +ERROR: INTO clause not yet supported +CREATE TABLE create_table_test3 WITHOUT OIDS AS + SELECT a + b AS c1, a - b AS c2 FROM create_table_test; +ERROR: INTO clause not yet supported +SELECT count(oid) FROM create_table_test2; +ERROR: relation "create_table_test2" does not exist +LINE 1: SELECT count(oid) FROM create_table_test2; + ^ +-- should fail +SELECT count(oid) FROM create_table_test3; +ERROR: relation "create_table_test3" does not exist +LINE 1: SELECT count(oid) FROM create_table_test3; + ^ +PREPARE table_source(int) AS + SELECT a + b AS c1, a - b AS c2, $1 AS c3 FROM create_table_test; +ERROR: Postgres-XC does not support PREPARE yet +DETAIL: The feature is not currently supported +CREATE TABLE execute_with WITH OIDS AS EXECUTE table_source(1); +ERROR: Postgres-XC does not support EXECUTE yet +DETAIL: The feature is not currently supported +CREATE TABLE execute_without WITHOUT OIDS AS EXECUTE table_source(2); +ERROR: Postgres-XC does not support EXECUTE yet +DETAIL: The feature is not currently supported +SELECT count(oid) FROM execute_with; +ERROR: relation "execute_with" does not exist +LINE 1: SELECT count(oid) FROM execute_with; + ^ +-- should fail +SELECT count(oid) FROM execute_without; +ERROR: relation "execute_without" does not exist +LINE 1: SELECT count(oid) FROM execute_without; + ^ +DROP TABLE create_table_test; +DROP TABLE create_table_test2; +ERROR: table "create_table_test2" does not exist +DROP TABLE create_table_test3; +ERROR: table "create_table_test3" does not exist +DROP TABLE execute_with; +ERROR: table "execute_with" does not exist +DROP TABLE execute_without; +ERROR: table "execute_without" does not exist ----------------------------------------------------------------------- Summary of changes: .../{without_oid.out => without_oid_1.out} | 40 ++++++++++++-------- 1 files changed, 24 insertions(+), 16 deletions(-) copy src/test/regress/expected/{without_oid.out => without_oid_1.out} (75%) hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-24 08:38:31
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via d4b2b6421ffb3d443a2f9bf923b9615f4c5752fb (commit) from 6fd26e495ab4f8503042d0cb92aa1fae1c9a4342 (commit) - Log ----------------------------------------------------------------- commit d4b2b6421ffb3d443a2f9bf923b9615f4c5752fb Author: Michael P <mic...@us...> Date: Thu Mar 24 17:36:31 2011 +0900 Fix for regression test copy2 SERIAL and TEMP table are not yet supported by Postgres-XC, so this output is correct. It may be necessary to write additional test cases for Postgres-XC in the case of copy. diff --git a/src/test/regress/expected/copy2_1.out b/src/test/regress/expected/copy2_1.out new file mode 100644 index 0000000..0e07e98 --- /dev/null +++ b/src/test/regress/expected/copy2_1.out @@ -0,0 +1,245 @@ +CREATE TEMP TABLE x ( + a serial, + b int, + c text not null default 'stuff', + d text, + e text +) WITH OIDS; +ERROR: Postgres-XC does not support SERIAL yet +DETAIL: The feature is not currently supported +CREATE FUNCTION fn_x_before () RETURNS TRIGGER AS ' + BEGIN + NEW.e := ''before trigger fired''::text; + return NEW; + END; +' LANGUAGE plpgsql; +CREATE FUNCTION fn_x_after () RETURNS TRIGGER AS ' + BEGIN + UPDATE x set e=''after trigger fired'' where c=''stuff''; + return NULL; + END; +' LANGUAGE plpgsql; +CREATE TRIGGER trg_x_after AFTER INSERT ON x +FOR EACH ROW EXECUTE PROCEDURE fn_x_after(); +ERROR: relation "x" does not exist +CREATE TRIGGER trg_x_before BEFORE INSERT ON x +FOR EACH ROW EXECUTE PROCEDURE fn_x_before(); +ERROR: relation "x" does not exist +COPY x (a, b, c, d, e) from stdin; +ERROR: relation "x" does not exist +9999 \N \\N \NN \N +invalid command \N +10000 21 31 41 51 +\. +invalid command \. +COPY x (b, d) from stdin; +ERROR: syntax error at or near "9999" +LINE 1: 9999 + ^ +1 test_1 +\. +invalid command \. +COPY x (b, d) from stdin; +ERROR: syntax error at or near "1" +LINE 1: 1 test_1 + ^ +2 test_2 +3 test_3 +4 test_4 +5 test_5 +\. +invalid command \. +COPY x (a, b, c, d, e) from stdin; +ERROR: syntax error at or near "2" +LINE 1: 2 test_2 + ^ +10001 22 32 42 52 +10002 23 33 43 53 +10003 24 34 44 54 +10004 25 35 45 55 +10005 26 36 46 56 +\. +invalid command \. +-- non-existent column in column list: should fail +COPY x (xyz) from stdin; +ERROR: syntax error at or near "10001" +LINE 1: 10001 22 32 42 52 + ^ +-- too many columns in column list: should fail +COPY x (a, b, c, d, e, d, c) from stdin; +ERROR: relation "x" does not exist +-- missing data: should fail +COPY x from stdin; +ERROR: relation "x" does not exist +\. +invalid command \. +COPY x from stdin; +ERROR: relation "x" does not exist +2000 230 23 23 +\. +invalid command \. +COPY x from stdin; +ERROR: syntax error at or near "2000" +LINE 1: 2000 230 23 23 + ^ +2001 231 \N \N +invalid command \N +\. +invalid command \. +-- extra data: should fail +COPY x from stdin; +ERROR: syntax error at or near "2001" +LINE 1: 2001 231 + ^ +2002 232 40 50 60 70 80 +\. +invalid command \. +-- various COPY options: delimiters, oids, NULL string +COPY x (b, c, d, e) from stdin with oids delimiter ',' null 'x'; +ERROR: syntax error at or near "2002" +LINE 1: 2002 232 40 50 60 70 80 + ^ +500000,x,45,80,90 +500001,x,\x,\\x,\\\x +invalid command \x, +500002,x,\,,\\\,,\\ +invalid command \,, +\. +invalid command \. +COPY x from stdin WITH DELIMITER AS ';' NULL AS ''; +ERROR: syntax error at or near "500000" +LINE 1: 500000,x,45,80,90 + ^ +3000;;c;; +ERROR: syntax error at or near "3000" +LINE 1: 3000; + ^ +ERROR: syntax error at or near "c" +LINE 1: c; + ^ +\. +invalid command \. +COPY x from stdin WITH DELIMITER AS ':' NULL AS E'\\X'; +ERROR: relation "x" does not exist +4000:\X:C:\X:\X +invalid command \X:C: +4001:1:empty:: +4002:2:null:\X:\X +invalid command \X: +4003:3:Backslash:\\:\\ +invalid command \ +4004:4:BackslashX:\\X:\\X +invalid command \ +4005:5:N:\N:\N +invalid command \N: +4006:6:BackslashN:\\N:\\N +invalid command \ +4007:7:XX:\XX:\XX +invalid command \XX: +4008:8:Delimiter:\::\: +\. +invalid command \. +-- check results of copy in +SELECT * FROM x ORDER BY a, b; +ERROR: syntax error at or near "4000" +LINE 1: 4000: + ^ +-- COPY w/ oids on a table w/o oids should fail +CREATE TABLE no_oids ( + a int, + b int +) WITHOUT OIDS; +INSERT INTO no_oids (a, b) VALUES (5, 10); +INSERT INTO no_oids (a, b) VALUES (20, 30); +-- should fail +COPY no_oids FROM stdin WITH OIDS; +ERROR: table "no_oids" does not have OIDs +COPY no_oids TO stdout WITH OIDS; +ERROR: table "no_oids" does not have OIDs +-- check copy out +COPY x TO stdout; +ERROR: relation "x" does not exist +COPY x (c, e) TO stdout; +ERROR: relation "x" does not exist +COPY x (b, e) TO stdout WITH NULL 'I''m null'; +ERROR: relation "x" does not exist +CREATE TEMP TABLE y ( + col1 text, + col2 text +); +ERROR: PG-XC does not yet support temporary tables +INSERT INTO y VALUES ('Jackson, Sam', E'\\h'); +ERROR: relation "y" does not exist +LINE 1: INSERT INTO y VALUES ('Jackson, Sam', E'\\h'); + ^ +INSERT INTO y VALUES ('It is "perfect".',E'\t'); +ERROR: relation "y" does not exist +LINE 1: INSERT INTO y VALUES ('It is "perfect".',E'\t'); + ^ +INSERT INTO y VALUES ('', NULL); +ERROR: relation "y" does not exist +LINE 1: INSERT INTO y VALUES ('', NULL); + ^ +COPY y TO stdout WITH CSV; +ERROR: relation "y" does not exist +COPY y TO stdout WITH CSV QUOTE '''' DELIMITER '|'; +ERROR: relation "y" does not exist +COPY y TO stdout WITH CSV FORCE QUOTE col2 ESCAPE E'\\'; +ERROR: relation "y" does not exist +COPY y TO stdout WITH CSV FORCE QUOTE *; +ERROR: relation "y" does not exist +-- Repeat above tests with new 9.0 option syntax +COPY y TO stdout (FORMAT CSV); +ERROR: relation "y" does not exist +COPY y TO stdout (FORMAT CSV, QUOTE '''', DELIMITER '|'); +ERROR: relation "y" does not exist +COPY y TO stdout (FORMAT CSV, FORCE_QUOTE (col2), ESCAPE E'\\'); +ERROR: relation "y" does not exist +COPY y TO stdout (FORMAT CSV, FORCE_QUOTE *); +ERROR: relation "y" does not exist +\copy y TO stdout (FORMAT CSV) +ERROR: relation "y" does not exist +\copy: ERROR: relation "y" does not exist +\copy y TO stdout (FORMAT CSV, QUOTE '''', DELIMITER '|') +ERROR: relation "y" does not exist +\copy: ERROR: relation "y" does not exist +\copy y TO stdout (FORMAT CSV, FORCE_QUOTE (col2), ESCAPE E'\\') +ERROR: relation "y" does not exist +\copy: ERROR: relation "y" does not exist +\copy y TO stdout (FORMAT CSV, FORCE_QUOTE *) +ERROR: relation "y" does not exist +\copy: ERROR: relation "y" does not exist +--test that we read consecutive LFs properly +CREATE TEMP TABLE testnl (a int, b text, c int); +ERROR: PG-XC does not yet support temporary tables +COPY testnl FROM stdin CSV; +ERROR: relation "testnl" does not exist +1,"a field with two LFs + +inside",2 +\. +invalid command \. +-- test end of copy marker +CREATE TEMP TABLE testeoc (a text); +ERROR: syntax error at or near "1" +LINE 1: 1,"a field with two LFs + ^ +COPY testeoc FROM stdin CSV; +ERROR: relation "testeoc" does not exist +a\. +invalid command \. +\.b +invalid command \.b +c\.d +invalid command \.d +"\." +\. +invalid command \. +COPY testeoc TO stdout CSV; +ERROR: syntax error at or near "a" +LINE 1: a + ^ +DROP TABLE x, y; +ERROR: table "x" does not exist +DROP FUNCTION fn_x_before(); +DROP FUNCTION fn_x_after(); ----------------------------------------------------------------------- Summary of changes: src/test/regress/expected/copy2_1.out | 245 +++++++++++++++++++++++++++++++++ 1 files changed, 245 insertions(+), 0 deletions(-) create mode 100644 src/test/regress/expected/copy2_1.out hooks/post-receive -- Postgres-XC |