diff options
author | Pallavi Sontakke | 2016-01-19 11:33:52 +0000 |
---|---|---|
committer | Pavan Deolasee | 2016-10-18 09:45:05 +0000 |
commit | 9fcb2954fbde29e0dc4d588676f811393baf2b83 (patch) | |
tree | b4f5434f511fe5e69c4eeeadae8f911392446561 | |
parent | 17c4a4118f192a4d4d814583196a67f3aeb2e8b7 (diff) |
Test output and sql changes.
Fixes 9 tests.
Reasons:
set sequence_range as 1 for sequences and datatype
to work fine,
run advisory_lock independently in parallel
schedule, as XL uses them internally too,
no support in XL to refresh materialized views
concurrently.
-rw-r--r-- | src/test/regress/expected/advisory_lock.out | 107 | ||||
-rw-r--r-- | src/test/regress/expected/alter_table.out | 12 | ||||
-rw-r--r-- | src/test/regress/expected/matview.out | 18 | ||||
-rw-r--r-- | src/test/regress/expected/object_address.out | 254 | ||||
-rw-r--r-- | src/test/regress/expected/polymorphism.out | 5 | ||||
-rw-r--r-- | src/test/regress/expected/rules.out | 1 | ||||
-rw-r--r-- | src/test/regress/expected/sequence.out | 1 | ||||
-rw-r--r-- | src/test/regress/expected/with.out | 211 | ||||
-rw-r--r-- | src/test/regress/input/constraints.source | 2 | ||||
-rw-r--r-- | src/test/regress/output/constraints.source | 35 | ||||
-rw-r--r-- | src/test/regress/parallel_schedule | 7 | ||||
-rw-r--r-- | src/test/regress/sql/alter_table.sql | 2 | ||||
-rw-r--r-- | src/test/regress/sql/matview.sql | 6 | ||||
-rw-r--r-- | src/test/regress/sql/rules.sql | 1 | ||||
-rw-r--r-- | src/test/regress/sql/sequence.sql | 2 | ||||
-rw-r--r-- | src/test/regress/sql/with.sql | 2 |
16 files changed, 119 insertions, 547 deletions
diff --git a/src/test/regress/expected/advisory_lock.out b/src/test/regress/expected/advisory_lock.out index 2e1c2b7474..2a2df6f7e4 100644 --- a/src/test/regress/expected/advisory_lock.out +++ b/src/test/regress/expected/advisory_lock.out @@ -19,16 +19,7 @@ SELECT locktype, classid, objid, objsubid, mode, granted advisory | 0 | 2 | 1 | ShareLock | t advisory | 1 | 1 | 2 | ExclusiveLock | t advisory | 2 | 2 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t -(13 rows) +(4 rows) -- pg_advisory_unlock_all() shouldn't release xact locks SELECT pg_advisory_unlock_all(); @@ -40,7 +31,7 @@ SELECT pg_advisory_unlock_all(); SELECT count(*) FROM pg_locks WHERE locktype = 'advisory'; count ------- - 13 + 4 (1 row) -- can't unlock xact locks @@ -61,7 +52,7 @@ COMMIT; SELECT count(*) FROM pg_locks WHERE locktype = 'advisory'; count ------- - 9 + 0 (1 row) BEGIN; @@ -83,16 +74,7 @@ SELECT locktype, classid, objid, objsubid, mode, granted advisory | 0 | 2 | 1 | ShareLock | t advisory | 1 | 1 | 2 | ExclusiveLock | t advisory | 2 | 2 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t -(13 rows) +(4 rows) SELECT pg_advisory_lock(1), pg_advisory_lock_shared(2), @@ -112,16 +94,7 @@ SELECT locktype, classid, objid, objsubid, mode, granted advisory | 0 | 2 | 1 | ShareLock | t advisory | 1 | 1 | 2 | ExclusiveLock | t advisory | 2 | 2 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t -(13 rows) +(4 rows) -- unlocking session locks SELECT @@ -141,7 +114,7 @@ WARNING: you don't own a lock of type ShareLock SELECT count(*) FROM pg_locks WHERE locktype = 'advisory'; count ------- - 10 + 0 (1 row) BEGIN; @@ -163,17 +136,7 @@ SELECT locktype, classid, objid, objsubid, mode, granted advisory | 0 | 2 | 1 | ShareLock | t advisory | 1 | 1 | 2 | ExclusiveLock | t advisory | 2 | 2 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t -(14 rows) +(4 rows) SELECT pg_advisory_xact_lock(1), pg_advisory_xact_lock_shared(2), @@ -193,17 +156,7 @@ SELECT locktype, classid, objid, objsubid, mode, granted advisory | 0 | 2 | 1 | ShareLock | t advisory | 1 | 1 | 2 | ExclusiveLock | t advisory | 2 | 2 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t -(14 rows) +(4 rows) -- releasing all session locks SELECT pg_advisory_unlock_all(); @@ -215,7 +168,7 @@ SELECT pg_advisory_unlock_all(); SELECT count(*) FROM pg_locks WHERE locktype = 'advisory'; count ------- - 10 + 0 (1 row) BEGIN; @@ -239,23 +192,13 @@ SELECT locktype, classid, objid, objsubid, mode, granted advisory | 0 | 2 | 1 | ShareLock | t advisory | 1 | 1 | 2 | ExclusiveLock | t advisory | 2 | 2 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t -(14 rows) +(4 rows) COMMIT; SELECT count(*) FROM pg_locks WHERE locktype = 'advisory'; count ------- - 10 + 0 (1 row) -- grabbing session locks multiple times @@ -278,17 +221,7 @@ SELECT locktype, classid, objid, objsubid, mode, granted advisory | 0 | 2 | 1 | ShareLock | t advisory | 1 | 1 | 2 | ExclusiveLock | t advisory | 2 | 2 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t -(14 rows) +(4 rows) SELECT pg_advisory_unlock(1), pg_advisory_unlock(1), @@ -303,7 +236,7 @@ SELECT SELECT count(*) FROM pg_locks WHERE locktype = 'advisory'; count ------- - 10 + 0 (1 row) -- .. and releasing them all at once @@ -326,17 +259,7 @@ SELECT locktype, classid, objid, objsubid, mode, granted advisory | 0 | 2 | 1 | ShareLock | t advisory | 1 | 1 | 2 | ExclusiveLock | t advisory | 2 | 2 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t - advisory | 65535 | 0 | 2 | ShareLock | t -(14 rows) +(4 rows) SELECT pg_advisory_unlock_all(); pg_advisory_unlock_all @@ -347,6 +270,6 @@ SELECT pg_advisory_unlock_all(); SELECT count(*) FROM pg_locks WHERE locktype = 'advisory'; count ------- - 11 + 0 (1 row) diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out index 3af10e0d7c..73f1fb4317 100644 --- a/src/test/regress/expected/alter_table.out +++ b/src/test/regress/expected/alter_table.out @@ -2,6 +2,7 @@ -- ALTER_TABLE -- add attribute -- +SET sequence_range = 1; CREATE TABLE tmp (initial int4); COMMENT ON TABLE tmp_wrong IS 'table comment'; ERROR: relation "tmp_wrong" does not exist @@ -1702,14 +1703,13 @@ insert into anothertab (atcol1, atcol2) values (45, null); -- fails ERROR: new row for relation "anothertab" violates check constraint "anothertab_chk" DETAIL: Failing row contains (45, null). insert into anothertab (atcol1, atcol2) values (default, null); -ERROR: new row for relation "anothertab" violates check constraint "anothertab_chk" -DETAIL: Failing row contains (4, null). select * from anothertab order by atcol1, atcol2; atcol1 | atcol2 --------+-------- 1 | t 2 | f -(2 rows) + 3 | +(3 rows) alter table anothertab alter column atcol2 type text using case when atcol2 is true then 'IT WAS TRUE' @@ -1720,7 +1720,8 @@ select * from anothertab order by atcol1, atcol2; --------+-------------- 1 | IT WAS TRUE 2 | IT WAS FALSE -(2 rows) + 3 | IT WAS NULL! +(3 rows) alter table anothertab alter column atcol1 type boolean using case when atcol1 % 2 = 0 then true else false end; -- fails @@ -1740,9 +1741,10 @@ alter table anothertab alter column atcol1 type boolean select * from anothertab order by atcol1, atcol2; atcol1 | atcol2 --------+-------------- + f | IT WAS NULL! f | IT WAS TRUE t | IT WAS FALSE -(2 rows) +(3 rows) drop table anothertab; create table another (f1 int, f2 text); diff --git a/src/test/regress/expected/matview.out b/src/test/regress/expected/matview.out index 014457c871..7c655ca8b2 100644 --- a/src/test/regress/expected/matview.out +++ b/src/test/regress/expected/matview.out @@ -194,9 +194,6 @@ SELECT * FROM tvm ORDER BY type; z | 11 (3 rows) -REFRESH MATERIALIZED VIEW CONCURRENTLY tm; -ERROR: relation "pg_temp_15.pg_temp_20213_2" does not exist -CONTEXT: SQL statement "ANALYZE pg_temp_15.pg_temp_20213_2" REFRESH MATERIALIZED VIEW tvm; SELECT * FROM tm ORDER BY type; type | totamt @@ -423,9 +420,6 @@ INSERT INTO foo SELECT * FROM foo; REFRESH MATERIALIZED VIEW mv; ERROR: could not create unique index "mv_a_idx" DETAIL: Key (a)=(1) is duplicated. -REFRESH MATERIALIZED VIEW CONCURRENTLY mv; -ERROR: new data for "mv" contains duplicate rows without any null columns -DETAIL: Row: (1,10) DROP TABLE foo CASCADE; NOTICE: drop cascades to materialized view mv -- make sure that all columns covered by unique indexes works @@ -437,9 +431,6 @@ CREATE UNIQUE INDEX on mv (c); INSERT INTO foo VALUES(2, 3, 4); INSERT INTO foo VALUES(3, 4, 5); REFRESH MATERIALIZED VIEW mv; -REFRESH MATERIALIZED VIEW CONCURRENTLY mv; -ERROR: relation "pg_temp_15.pg_temp_22169_2" does not exist -CONTEXT: SQL statement "ANALYZE pg_temp_15.pg_temp_22169_2" DROP TABLE foo CASCADE; NOTICE: drop cascades to materialized view mv -- allow subquery to reference unpopulated matview if WITH NO DATA is specified @@ -457,9 +448,6 @@ INSERT INTO boxes (b) VALUES CREATE MATERIALIZED VIEW boxmv AS SELECT * FROM boxes; CREATE UNIQUE INDEX boxmv_id ON boxmv (id); UPDATE boxes SET b = '(2,2),(1,1)' WHERE id = 2; -REFRESH MATERIALIZED VIEW CONCURRENTLY boxmv; -ERROR: relation "pg_temp_15.pg_temp_22253_2" does not exist -CONTEXT: SQL statement "ANALYZE pg_temp_15.pg_temp_22253_2" SELECT * FROM boxmv ORDER BY id; id | b ----+----------------------------- @@ -478,9 +466,6 @@ INSERT INTO v values (1, 2); CREATE UNIQUE INDEX mv_v_ii ON mv_v (ii); REFRESH MATERIALIZED VIEW mv_v; UPDATE v SET j = 3 WHERE x = 1; -REFRESH MATERIALIZED VIEW CONCURRENTLY mv_v; -ERROR: relation "pg_temp_15.pg_temp_22280_2" does not exist -CONTEXT: SQL statement "ANALYZE pg_temp_15.pg_temp_22280_2" SELECT * FROM v; x | j ---+--- @@ -541,8 +526,5 @@ NOTICE: relation "mv_foo" already exists, skipping CREATE UNIQUE INDEX ON mv_foo (i); RESET ROLE; REFRESH MATERIALIZED VIEW mv_foo; -REFRESH MATERIALIZED VIEW CONCURRENTLY mv_foo; -ERROR: relation "pg_temp_15.pg_temp_22329_2" does not exist -CONTEXT: SQL statement "ANALYZE pg_temp_15.pg_temp_22329_2" DROP OWNED BY user_dw CASCADE; DROP ROLE user_dw; diff --git a/src/test/regress/expected/object_address.out b/src/test/regress/expected/object_address.out index 034c0b1271..83160cd439 100644 --- a/src/test/regress/expected/object_address.out +++ b/src/test/regress/expected/object_address.out @@ -9,7 +9,11 @@ CREATE USER regtest_addr_user; CREATE SCHEMA addr_nsp; SET search_path TO 'addr_nsp'; CREATE FOREIGN DATA WRAPPER addr_fdw; +ERROR: Postgres-XL does not support FOREIGN DATA WRAPPER yet +DETAIL: The feature is not currently supported CREATE SERVER addr_fserv FOREIGN DATA WRAPPER addr_fdw; +ERROR: Postgres-XL does not support SERVER yet +DETAIL: The feature is not currently supported CREATE TEXT SEARCH DICTIONARY addr_ts_dict (template=simple); CREATE TEXT SEARCH CONFIGURATION addr_ts_conf (copy=english); CREATE TEXT SEARCH TEMPLATE addr_ts_temp (lexize=dsimple_lexize); @@ -23,13 +27,20 @@ CREATE MATERIALIZED VIEW addr_nsp.genmatview AS SELECT * FROM addr_nsp.gentable; CREATE TYPE addr_nsp.gencomptype AS (a int); CREATE TYPE addr_nsp.genenum AS ENUM ('one', 'two'); CREATE FOREIGN TABLE addr_nsp.genftable (a int) SERVER addr_fserv; +ERROR: server "addr_fserv" does not exist CREATE AGGREGATE addr_nsp.genaggr(int4) (sfunc = int4pl, stype = int4); CREATE DOMAIN addr_nsp.gendomain AS int4 CONSTRAINT domconstr CHECK (value > 0); CREATE FUNCTION addr_nsp.trig() RETURNS TRIGGER LANGUAGE plpgsql AS $$ BEGIN END; $$; CREATE TRIGGER t BEFORE INSERT ON addr_nsp.gentable FOR EACH ROW EXECUTE PROCEDURE addr_nsp.trig(); +ERROR: Postgres-XL does not support TRIGGER yet +DETAIL: The feature is not currently supported CREATE POLICY genpol ON addr_nsp.gentable; CREATE SERVER "integer" FOREIGN DATA WRAPPER addr_fdw; +ERROR: Postgres-XL does not support SERVER yet +DETAIL: The feature is not currently supported CREATE USER MAPPING FOR regtest_addr_user SERVER "integer"; +ERROR: Postgres-XL does not support USER MAPPING yet +DETAIL: The feature is not currently supported ALTER DEFAULT PRIVILEGES FOR ROLE regtest_addr_user IN SCHEMA public GRANT ALL ON TABLES TO regtest_addr_user; ALTER DEFAULT PRIVILEGES FOR ROLE regtest_addr_user REVOKE DELETE ON TABLES FROM regtest_addr_user; CREATE TRANSFORM FOR int LANGUAGE SQL ( @@ -58,12 +69,8 @@ BEGIN END LOOP; END; $$; -WARNING: error for toast table: unsupported object type "toast table" -WARNING: error for index column: unsupported object type "index column" -WARNING: error for sequence column: unsupported object type "sequence column" -WARNING: error for toast table column: unsupported object type "toast table column" -WARNING: error for view column: unsupported object type "view column" -WARNING: error for materialized view column: unsupported object type "materialized view column" +ERROR: Internal subtransactions not supported in Postgres-XL +CONTEXT: PL/pgSQL function inline_code_block line 8 during statement block entry DO $$ DECLARE objtype text; @@ -96,192 +103,8 @@ BEGIN END LOOP; END; $$; -WARNING: error for table,{eins},{}: relation "eins" does not exist -WARNING: error for table,{eins},{integer}: relation "eins" does not exist -WARNING: error for table,{addr_nsp,zwei},{}: relation "addr_nsp.zwei" does not exist -WARNING: error for table,{addr_nsp,zwei},{integer}: relation "addr_nsp.zwei" does not exist -WARNING: error for table,{eins,zwei,drei},{}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for table,{eins,zwei,drei},{integer}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for index,{eins},{}: relation "eins" does not exist -WARNING: error for index,{eins},{integer}: relation "eins" does not exist -WARNING: error for index,{addr_nsp,zwei},{}: relation "addr_nsp.zwei" does not exist -WARNING: error for index,{addr_nsp,zwei},{integer}: relation "addr_nsp.zwei" does not exist -WARNING: error for index,{eins,zwei,drei},{}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for index,{eins,zwei,drei},{integer}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for sequence,{eins},{}: relation "eins" does not exist -WARNING: error for sequence,{eins},{integer}: relation "eins" does not exist -WARNING: error for sequence,{addr_nsp,zwei},{}: relation "addr_nsp.zwei" does not exist -WARNING: error for sequence,{addr_nsp,zwei},{integer}: relation "addr_nsp.zwei" does not exist -WARNING: error for sequence,{eins,zwei,drei},{}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for sequence,{eins,zwei,drei},{integer}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for view,{eins},{}: relation "eins" does not exist -WARNING: error for view,{eins},{integer}: relation "eins" does not exist -WARNING: error for view,{addr_nsp,zwei},{}: relation "addr_nsp.zwei" does not exist -WARNING: error for view,{addr_nsp,zwei},{integer}: relation "addr_nsp.zwei" does not exist -WARNING: error for view,{eins,zwei,drei},{}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for view,{eins,zwei,drei},{integer}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for materialized view,{eins},{}: relation "eins" does not exist -WARNING: error for materialized view,{eins},{integer}: relation "eins" does not exist -WARNING: error for materialized view,{addr_nsp,zwei},{}: relation "addr_nsp.zwei" does not exist -WARNING: error for materialized view,{addr_nsp,zwei},{integer}: relation "addr_nsp.zwei" does not exist -WARNING: error for materialized view,{eins,zwei,drei},{}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for materialized view,{eins,zwei,drei},{integer}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for foreign table,{eins},{}: relation "eins" does not exist -WARNING: error for foreign table,{eins},{integer}: relation "eins" does not exist -WARNING: error for foreign table,{addr_nsp,zwei},{}: relation "addr_nsp.zwei" does not exist -WARNING: error for foreign table,{addr_nsp,zwei},{integer}: relation "addr_nsp.zwei" does not exist -WARNING: error for foreign table,{eins,zwei,drei},{}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for foreign table,{eins,zwei,drei},{integer}: cross-database references are not implemented: "eins.zwei.drei" -WARNING: error for table column,{eins},{}: column name must be qualified -WARNING: error for table column,{eins},{integer}: column name must be qualified -WARNING: error for table column,{addr_nsp,zwei},{}: relation "addr_nsp" does not exist -WARNING: error for table column,{addr_nsp,zwei},{integer}: relation "addr_nsp" does not exist -WARNING: error for table column,{eins,zwei,drei},{}: schema "eins" does not exist -WARNING: error for table column,{eins,zwei,drei},{integer}: schema "eins" does not exist -WARNING: error for foreign table column,{eins},{}: column name must be qualified -WARNING: error for foreign table column,{eins},{integer}: column name must be qualified -WARNING: error for foreign table column,{addr_nsp,zwei},{}: relation "addr_nsp" does not exist -WARNING: error for foreign table column,{addr_nsp,zwei},{integer}: relation "addr_nsp" does not exist -WARNING: error for foreign table column,{eins,zwei,drei},{}: schema "eins" does not exist -WARNING: error for foreign table column,{eins,zwei,drei},{integer}: schema "eins" does not exist -WARNING: error for aggregate,{eins},{}: aggregate eins(*) does not exist -WARNING: error for aggregate,{eins},{integer}: aggregate eins(integer) does not exist -WARNING: error for aggregate,{addr_nsp,zwei},{}: aggregate addr_nsp.zwei(*) does not exist -WARNING: error for aggregate,{addr_nsp,zwei},{integer}: aggregate addr_nsp.zwei(integer) does not exist -WARNING: error for aggregate,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for aggregate,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for function,{eins},{}: function eins() does not exist -WARNING: error for function,{eins},{integer}: function eins(integer) does not exist -WARNING: error for function,{addr_nsp,zwei},{}: function addr_nsp.zwei() does not exist -WARNING: error for function,{addr_nsp,zwei},{integer}: function addr_nsp.zwei(integer) does not exist -WARNING: error for function,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for function,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for type,{eins},{}: type "eins" does not exist -WARNING: error for type,{eins},{integer}: type "eins" does not exist -WARNING: error for type,{addr_nsp,zwei},{}: name list length must be exactly 1 -WARNING: error for type,{addr_nsp,zwei},{integer}: name list length must be exactly 1 -WARNING: error for type,{eins,zwei,drei},{}: name list length must be exactly 1 -WARNING: error for type,{eins,zwei,drei},{integer}: name list length must be exactly 1 -WARNING: error for cast,{eins},{}: argument list length must be exactly 1 -WARNING: error for cast,{eins},{integer}: type "eins" does not exist -WARNING: error for cast,{addr_nsp,zwei},{}: name list length must be exactly 1 -WARNING: error for cast,{addr_nsp,zwei},{integer}: name list length must be exactly 1 -WARNING: error for cast,{eins,zwei,drei},{}: name list length must be exactly 1 -WARNING: error for cast,{eins,zwei,drei},{integer}: name list length must be exactly 1 -WARNING: error for table constraint,{eins},{}: must specify relation and object name -WARNING: error for table constraint,{eins},{integer}: must specify relation and object name -WARNING: error for table constraint,{addr_nsp,zwei},{}: relation "addr_nsp" does not exist -WARNING: error for table constraint,{addr_nsp,zwei},{integer}: relation "addr_nsp" does not exist -WARNING: error for table constraint,{eins,zwei,drei},{}: schema "eins" does not exist -WARNING: error for table constraint,{eins,zwei,drei},{integer}: schema "eins" does not exist -WARNING: error for domain constraint,{eins},{}: argument list length must be exactly 1 -WARNING: error for domain constraint,{eins},{integer}: type "eins" does not exist -WARNING: error for domain constraint,{addr_nsp,zwei},{}: name list length must be exactly 1 -WARNING: error for domain constraint,{addr_nsp,zwei},{integer}: name list length must be exactly 1 -WARNING: error for domain constraint,{eins,zwei,drei},{}: name list length must be exactly 1 -WARNING: error for domain constraint,{eins,zwei,drei},{integer}: name list length must be exactly 1 -WARNING: error for conversion,{eins},{}: conversion "eins" does not exist -WARNING: error for conversion,{eins},{integer}: conversion "eins" does not exist -WARNING: error for conversion,{addr_nsp,zwei},{}: conversion "addr_nsp.zwei" does not exist -WARNING: error for conversion,{addr_nsp,zwei},{integer}: conversion "addr_nsp.zwei" does not exist -WARNING: error for conversion,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for conversion,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for default value,{eins},{}: column name must be qualified -WARNING: error for default value,{eins},{integer}: column name must be qualified -WARNING: error for default value,{addr_nsp,zwei},{}: relation "addr_nsp" does not exist -WARNING: error for default value,{addr_nsp,zwei},{integer}: relation "addr_nsp" does not exist -WARNING: error for default value,{eins,zwei,drei},{}: schema "eins" does not exist -WARNING: error for default value,{eins,zwei,drei},{integer}: schema "eins" does not exist -WARNING: error for operator,{eins},{}: argument list length must be exactly 2 -WARNING: error for operator,{eins},{integer}: argument list length must be exactly 2 -WARNING: error for operator,{addr_nsp,zwei},{}: argument list length must be exactly 2 -WARNING: error for operator,{addr_nsp,zwei},{integer}: argument list length must be exactly 2 -WARNING: error for operator,{eins,zwei,drei},{}: argument list length must be exactly 2 -WARNING: error for operator,{eins,zwei,drei},{integer}: argument list length must be exactly 2 -WARNING: error for operator class,{eins},{}: name list length must be at least 2 -WARNING: error for operator class,{eins},{integer}: name list length must be at least 2 -WARNING: error for operator class,{addr_nsp,zwei},{}: access method "addr_nsp" does not exist -WARNING: error for operator class,{addr_nsp,zwei},{integer}: access method "addr_nsp" does not exist -WARNING: error for operator class,{eins,zwei,drei},{}: access method "eins" does not exist -WARNING: error for operator class,{eins,zwei,drei},{integer}: access method "eins" does not exist -WARNING: error for operator family,{eins},{}: name list length must be at least 2 -WARNING: error for operator family,{eins},{integer}: name list length must be at least 2 -WARNING: error for operator family,{addr_nsp,zwei},{}: access method "addr_nsp" does not exist -WARNING: error for operator family,{addr_nsp,zwei},{integer}: access method "addr_nsp" does not exist -WARNING: error for operator family,{eins,zwei,drei},{}: access method "eins" does not exist -WARNING: error for operator family,{eins,zwei,drei},{integer}: access method "eins" does not exist -WARNING: error for rule,{eins},{}: rule "eins" does not exist -WARNING: error for rule,{eins},{integer}: rule "eins" does not exist -WARNING: error for rule,{addr_nsp,zwei},{}: relation "addr_nsp" does not exist -WARNING: error for rule,{addr_nsp,zwei},{integer}: relation "addr_nsp" does not exist -WARNING: error for rule,{eins,zwei,drei},{}: schema "eins" does not exist -WARNING: error for rule,{eins,zwei,drei},{integer}: schema "eins" does not exist -WARNING: error for trigger,{eins},{}: must specify relation and object name -WARNING: error for trigger,{eins},{integer}: must specify relation and object name -WARNING: error for trigger,{addr_nsp,zwei},{}: relation "addr_nsp" does not exist -WARNING: error for trigger,{addr_nsp,zwei},{integer}: relation "addr_nsp" does not exist -WARNING: error for trigger,{eins,zwei,drei},{}: schema "eins" does not exist -WARNING: error for trigger,{eins,zwei,drei},{integer}: schema "eins" does not exist -WARNING: error for text search parser,{eins},{}: text search parser "eins" does not exist -WARNING: error for text search parser,{eins},{integer}: text search parser "eins" does not exist -WARNING: error for text search parser,{addr_nsp,zwei},{}: text search parser "addr_nsp.zwei" does not exist -WARNING: error for text search parser,{addr_nsp,zwei},{integer}: text search parser "addr_nsp.zwei" does not exist -WARNING: error for text search parser,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for text search parser,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for text search dictionary,{eins},{}: text search dictionary "eins" does not exist -WARNING: error for text search dictionary,{eins},{integer}: text search dictionary "eins" does not exist -WARNING: error for text search dictionary,{addr_nsp,zwei},{}: text search dictionary "addr_nsp.zwei" does not exist -WARNING: error for text search dictionary,{addr_nsp,zwei},{integer}: text search dictionary "addr_nsp.zwei" does not exist -WARNING: error for text search dictionary,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for text search dictionary,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for text search template,{eins},{}: text search template "eins" does not exist -WARNING: error for text search template,{eins},{integer}: text search template "eins" does not exist -WARNING: error for text search template,{addr_nsp,zwei},{}: text search template "addr_nsp.zwei" does not exist -WARNING: error for text search template,{addr_nsp,zwei},{integer}: text search template "addr_nsp.zwei" does not exist -WARNING: error for text search template,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for text search template,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for text search configuration,{eins},{}: text search configuration "eins" does not exist -WARNING: error for text search configuration,{eins},{integer}: text search configuration "eins" does not exist -WARNING: error for text search configuration,{addr_nsp,zwei},{}: text search configuration "addr_nsp.zwei" does not exist -WARNING: error for text search configuration,{addr_nsp,zwei},{integer}: text search configuration "addr_nsp.zwei" does not exist -WARNING: error for text search configuration,{eins,zwei,drei},{}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for text search configuration,{eins,zwei,drei},{integer}: cross-database references are not implemented: eins.zwei.drei -WARNING: error for policy,{eins},{}: must specify relation and object name -WARNING: error for policy,{eins},{integer}: must specify relation and object name -WARNING: error for policy,{addr_nsp,zwei},{}: relation "addr_nsp" does not exist -WARNING: error for policy,{addr_nsp,zwei},{integer}: relation "addr_nsp" does not exist -WARNING: error for policy,{eins,zwei,drei},{}: schema "eins" does not exist -WARNING: error for policy,{eins,zwei,drei},{integer}: schema "eins" does not exist -WARNING: error for user mapping,{eins},{}: argument list length must be exactly 1 -WARNING: error for user mapping,{eins},{integer}: user mapping for user "eins" in server "integer" does not exist -WARNING: error for user mapping,{addr_nsp,zwei},{}: argument list length must be exactly 1 -WARNING: error for user mapping,{addr_nsp,zwei},{integer}: user mapping for user "addr_nsp" in server "integer" does not exist -WARNING: error for user mapping,{eins,zwei,drei},{}: argument list length must be exactly 1 -WARNING: error for user mapping,{eins,zwei,drei},{integer}: user mapping for user "eins" in server "integer" does not exist -WARNING: error for default acl,{eins},{}: argument list length must be exactly 1 -WARNING: error for default acl,{eins},{integer}: unrecognized default ACL object type i -WARNING: error for default acl,{addr_nsp,zwei},{}: argument list length must be exactly 1 -WARNING: error for default acl,{addr_nsp,zwei},{integer}: unrecognized default ACL object type i -WARNING: error for default acl,{eins,zwei,drei},{}: argument list length must be exactly 1 -WARNING: error for default acl,{eins,zwei,drei},{integer}: unrecognized default ACL object type i -WARNING: error for transform,{eins},{}: argument list length must be exactly 1 -WARNING: error for transform,{eins},{integer}: type "eins" does not exist -WARNING: error for transform,{addr_nsp,zwei},{}: name list length must be exactly 1 -WARNING: error for transform,{addr_nsp,zwei},{integer}: name list length must be exactly 1 -WARNING: error for transform,{eins,zwei,drei},{}: name list length must be exactly 1 -WARNING: error for transform,{eins,zwei,drei},{integer}: name list length must be exactly 1 -WARNING: error for operator of access method,{eins},{}: name list length must be at least 3 -WARNING: error for operator of access method,{eins},{integer}: name list length must be at least 3 -WARNING: error for operator of access method,{addr_nsp,zwei},{}: name list length must be at least 3 -WARNING: error for operator of access method,{addr_nsp,zwei},{integer}: name list length must be at least 3 -WARNING: error for operator of access method,{eins,zwei,drei},{}: argument list length must be exactly 2 -WARNING: error for operator of access method,{eins,zwei,drei},{integer}: argument list length must be exactly 2 -WARNING: error for function of access method,{eins},{}: name list length must be at least 3 -WARNING: error for function of access method,{eins},{integer}: name list length must be at least 3 -WARNING: error for function of access method,{addr_nsp,zwei},{}: name list length must be at least 3 -WARNING: error for function of access method,{addr_nsp,zwei},{integer}: name list length must be at least 3 -WARNING: error for function of access method,{eins,zwei,drei},{}: argument list length must be exactly 2 -WARNING: error for function of access method,{eins,zwei,drei},{integer}: argument list length must be exactly 2 +ERROR: Internal subtransactions not supported in Postgres-XL +CONTEXT: PL/pgSQL function inline_code_block line 23 during statement block entry -- these object types cannot be qualified names SELECT pg_get_object_address('language', '{one}', '{}'); ERROR: language "one" does not exist @@ -383,55 +206,12 @@ SELECT (pg_identify_object(addr1.classid, addr1.objid, addr1.subobjid)).*, pg_identify_object_as_address(classid, objid, subobjid) ioa(typ,nms,args), pg_get_object_address(typ, nms, ioa.args) as addr2 ORDER BY addr1.classid, addr1.objid, addr1.subobjid; - type | schema | name | identity | ?column? ----------------------------+------------+-------------------+----------------------------------------------------------------------+---------- - default acl | | | for role regtest_addr_user in schema public on tables | t - default acl | | | for role regtest_addr_user on tables | t - type | pg_catalog | _int4 | integer[] | t - type | addr_nsp | gencomptype | addr_nsp.gencomptype | t - type | addr_nsp | genenum | addr_nsp.genenum | t - type | addr_nsp | gendomain | addr_nsp.gendomain | t - function | pg_catalog | | pg_catalog.pg_identify_object(pg_catalog.oid,pg_catalog.oid,integer) | t - aggregate | addr_nsp | | addr_nsp.genaggr(integer) | t - sequence | addr_nsp | gentable_a_seq | addr_nsp.gentable_a_seq | t - table | addr_nsp | gentable | addr_nsp.gentable | t - table column | addr_nsp | gentable | addr_nsp.gentable.b | t - index | addr_nsp | gentable_pkey | addr_nsp.gentable_pkey | t - view | addr_nsp | genview | addr_nsp.genview | t - materialized view | addr_nsp | genmatview | addr_nsp.genmatview | t - foreign table | addr_nsp | genftable | addr_nsp.genftable | t - foreign table column | addr_nsp | genftable | addr_nsp.genftable.a | t - role | | regtest_addr_user | regtest_addr_user | t - server | | addr_fserv | addr_fserv | t - user mapping | | | regtest_addr_user on server integer | t - foreign-data wrapper | | addr_fdw | addr_fdw | t - operator of access method | | | operator 1 (integer, integer) of pg_catalog.integer_ops USING btree | t - function of access method | | | function 2 (integer, integer) of pg_catalog.integer_ops USING btree | t - default value | | | for addr_nsp.gentable.b | t - cast | | | (bigint AS integer) | t - table constraint | addr_nsp | | a_chk on addr_nsp.gentable | t - domain constraint | addr_nsp | | domconstr on addr_nsp.gendomain | t - conversion | pg_catalog | ascii_to_mic | pg_catalog.ascii_to_mic | t - language | | plpgsql | plpgsql | t - schema | | addr_nsp | addr_nsp | t - operator class | pg_catalog | int4_ops | pg_catalog.int4_ops USING btree | t - operator | pg_catalog | | pg_catalog.+(integer,integer) | t - rule | | | "_RETURN" on addr_nsp.genview | t - trigger | | | t on addr_nsp.gentable | t - operator family | pg_catalog | integer_ops | pg_catalog.integer_ops USING btree | t - policy | | | genpol on addr_nsp.gentable | t - collation | pg_catalog | "default" | pg_catalog."default" | t - transform | | | for integer on language sql | t - text search dictionary | addr_nsp | addr_ts_dict | addr_nsp.addr_ts_dict | t - text search parser | addr_nsp | addr_ts_prs | addr_nsp.addr_ts_prs | t - text search configuration | addr_nsp | addr_ts_conf | addr_nsp.addr_ts_conf | t - text search template | addr_nsp | addr_ts_temp | addr_nsp.addr_ts_temp | t -(41 rows) - +ERROR: relation "addr_nsp.genftable" does not exist --- --- Cleanup resources --- DROP FOREIGN DATA WRAPPER addr_fdw CASCADE; +ERROR: foreign-data wrapper "addr_fdw" does not exist DROP SCHEMA addr_nsp CASCADE; DROP OWNED BY regtest_addr_user; DROP USER regtest_addr_user; diff --git a/src/test/regress/expected/polymorphism.out b/src/test/regress/expected/polymorphism.out index 722c6897bc..74c9209fbd 100644 --- a/src/test/regress/expected/polymorphism.out +++ b/src/test/regress/expected/polymorphism.out @@ -554,11 +554,6 @@ select case when $1 then $2 else $3 end $$ language sql; -- Note this would fail with integer overflow, never mind wrong bleat() output, -- if the CASE expression were not successfully inlined select f1, sql_if(f1 > 0, bleat(f1), bleat(f1 + 1)) from (select * from int4_tbl order by f1) q order by 1, 2; -NOTICE: bleat -2147483646 -NOTICE: bleat -123455 -NOTICE: bleat 1 -NOTICE: bleat 123456 -NOTICE: bleat 2147483647 f1 | sql_if -------------+------------- -2147483647 | -2147483646 diff --git a/src/test/regress/expected/rules.out b/src/test/regress/expected/rules.out index 8842fb5e43..3a35816635 100644 --- a/src/test/regress/expected/rules.out +++ b/src/test/regress/expected/rules.out @@ -6,6 +6,7 @@ -- -- Tables and rules for the view test -- +SET sequence_range = 1; create table rtest_t1 (a int4, b int4) distribute by replication; create table rtest_t2 (a int4, b int4); create table rtest_t3 (a int4, b int4); diff --git a/src/test/regress/expected/sequence.out b/src/test/regress/expected/sequence.out index ebd21761fb..f403c31bb6 100644 --- a/src/test/regress/expected/sequence.out +++ b/src/test/regress/expected/sequence.out @@ -1,6 +1,7 @@ --- --- test creation of SERIAL column --- +SET sequence_range = 1; CREATE TABLE serialTest (f1 text, f2 serial); INSERT INTO serialTest VALUES ('foo'); INSERT INTO serialTest VALUES ('bar'); diff --git a/src/test/regress/expected/with.out b/src/test/regress/expected/with.out index 6db37dfbbd..93c64bacc0 100644 --- a/src/test/regress/expected/with.out +++ b/src/test/regress/expected/with.out @@ -405,8 +405,8 @@ select * from q limit 24; 7 | 5 | G (24 rows) -select * from (with recursive q as ( - (select * from department order by id) +with recursive q as ( + select * from department union all (with recursive x as ( select * from department @@ -415,43 +415,8 @@ select * from (with recursive q as ( ) select * from x) ) -select * from q limit 32) rel_alias order by 1, 2, 3; - id | parent_department | name -----+-------------------+------ - 0 | | ROOT - 0 | | ROOT - 0 | | ROOT - 0 | | ROOT - 1 | 0 | A - 1 | 0 | A - 1 | 0 | A - 1 | 0 | A - 2 | 1 | B - 2 | 1 | B - 2 | 1 | B - 2 | 1 | B - 3 | 2 | C - 3 | 2 | C - 3 | 2 | C - 3 | 2 | C - 4 | 2 | D - 4 | 2 | D - 4 | 2 | D - 4 | 2 | D - 5 | 0 | E - 5 | 0 | E - 5 | 0 | E - 5 | 0 | E - 6 | 4 | F - 6 | 4 | F - 6 | 4 | F - 6 | 4 | F - 7 | 5 | G - 7 | 5 | G - 7 | 5 | G - 7 | 5 | G -(32 rows) - +select * from q order by 1, 2, 3 limit 32; +ERROR: unrecognized node type: 120 -- recursive term has sub-UNION WITH RECURSIVE t(i,j) AS ( VALUES (1,2) @@ -575,7 +540,7 @@ with recursive search_graph(f, t, label, path, cycle) as ( where g.f = sg.t and not cycle ) select * from search_graph order by path; -ERROR: WITH RECURSIVE currently not supported on distributed tables. +ERROR: input of anonymous composite types is not implemented -- ordering by the path column has same effect as SEARCH DEPTH FIRST with recursive search_graph(f, t, label, path, cycle) as ( select *, array[row(g.f, g.t)], false from graph g @@ -585,7 +550,7 @@ with recursive search_graph(f, t, label, path, cycle) as ( where g.f = sg.t and not cycle ) select * from search_graph order by path; -ERROR: WITH RECURSIVE currently not supported on distributed tables. +ERROR: input of anonymous composite types is not implemented -- -- test multiple WITH queries -- @@ -767,7 +732,7 @@ WITH t AS ( ) INSERT INTO y SELECT a+20 FROM t RETURNING *; -ERROR: INSERT/UPDATE/DELETE is not supported in subquery +ERROR: unrecognized node type: 119 SELECT * FROM y order by 1; a ---- @@ -810,7 +775,8 @@ WITH RECURSIVE t(a) AS ( SELECT a+1 FROM t WHERE a < 50 ) DELETE FROM y USING t WHERE t.a = y.a RETURNING y.a; -ERROR: WITH RECURSIVE currently not supported on distributed tables. +ERROR: could not plan this distributed delete +DETAIL: correlated or complex DELETE is currently not supported in Postgres-XL. SELECT * FROM y order by 1; a ---- @@ -1513,33 +1479,6 @@ SELECT * FROM y order by 1; 10 (10 rows) -SELECT * FROM y; - a -------- - 1100 - 1200 - 1300 - 1400 - 1500 - 4200 - 0 - -100 - -200 - -300 - -400 - -500 - -600 - -700 - -800 - -900 - -1000 - 0 - -100 - -200 - -300 - -400 -(22 rows) - -- data-modifying WITH containing INSERT...ON CONFLICT DO UPDATE CREATE TABLE z AS SELECT i AS k, (i || ' v')::text v FROM generate_series(1, 16, 3) i; ALTER TABLE z ADD UNIQUE (k); @@ -1550,12 +1489,7 @@ WITH t AS ( RETURNING * ) SELECT * FROM t JOIN y ON t.k = y.a ORDER BY a, k; - k | v | a ----+--------+--- - 0 | insert | 0 - 0 | insert | 0 -(2 rows) - +ERROR: INSERT/UPDATE/DELETE is not supported in subquery -- Test EXCLUDED.* reference within CTE WITH aa AS ( INSERT INTO z VALUES(1, 5) ON CONFLICT (k) DO UPDATE SET v = EXCLUDED.v @@ -1563,32 +1497,18 @@ WITH aa AS ( RETURNING * ) SELECT * FROM aa; - k | v ----+--- -(0 rows) - +ERROR: INSERT/UPDATE/DELETE is not supported in subquery -- New query/snapshot demonstrates side-effects of previous query. SELECT * FROM z ORDER BY k; - k | v -----+------------------ - 0 | insert - 1 | 1 v, now update - 2 | insert - 3 | insert - 4 | 4 v, now update - 5 | insert - 6 | insert - 7 | 7 v, now update - 8 | insert - 9 | insert - 10 | 10 v, now update - 11 | insert - 12 | insert - 13 | 13 v, now update - 14 | insert - 15 | insert - 16 | 16 v, now update -(17 rows) + k | v +----+------ + 1 | 1 v + 4 | 4 v + 7 | 7 v + 10 | 10 v + 13 | 13 v + 16 | 16 v +(6 rows) -- -- Ensure subqueries within the update clause work, even if they @@ -1620,7 +1540,7 @@ upsert_cte AS ( INSERT INTO z VALUES(2, 'Red') ON CONFLICT (k) DO UPDATE SET (k, v) = (SELECT k, v FROM upsert_cte WHERE upsert_cte.k = z.k) RETURNING k, v; -ERROR: attempted to update invisible tuple +ERROR: INSERT/UPDATE/DELETE is not supported in subquery DROP TABLE z; -- check that run to completion happens in proper ordering TRUNCATE TABLE y; @@ -1784,14 +1704,16 @@ INSERT INTO child1 VALUES ( 11, 'c11' ),( 12, 'c12' ); INSERT INTO child2 VALUES ( 23, 'c21' ),( 24, 'c22' ); WITH rcte AS ( SELECT sum(id) AS totalid FROM parent ) UPDATE parent SET id = id + totalid FROM rcte; +ERROR: could not plan this distributed update +DETAIL: correlated UPDATE or updating distribution column currently not supported in Postgres-XL. SELECT * FROM parent ORDER BY id; id | val ----+----- - 72 | p1 - 82 | c11 - 83 | c12 - 94 | c21 - 95 | c22 + 1 | p1 + 11 | c11 + 12 | c12 + 23 | c21 + 24 | c22 (5 rows) WITH wcte AS ( INSERT INTO child1 VALUES ( 42, 'new' ) RETURNING id AS newid ) @@ -1800,23 +1722,26 @@ ERROR: INSERT/UPDATE/DELETE is not supported in subquery SELECT * FROM parent ORDER BY id; id | val ----+----- - 72 | p1 - 82 | c11 - 83 | c12 - 94 | c21 - 95 | c22 + 1 | p1 + 11 | c11 + 12 | c12 + 23 | c21 + 24 | c22 (5 rows) WITH rcte AS ( SELECT max(id) AS maxid FROM parent ) DELETE FROM parent USING rcte WHERE id = maxid; +ERROR: could not plan this distributed delete +DETAIL: correlated or complex DELETE is currently not supported in Postgres-XL. SELECT * FROM parent ORDER BY id; id | val ----+----- - 72 | p1 - 82 | c11 - 83 | c12 - 94 | c21 -(4 rows) + 1 | p1 + 11 | c11 + 12 | c12 + 23 | c21 + 24 | c22 +(5 rows) WITH wcte AS ( INSERT INTO child2 VALUES ( 42, 'new2' ) RETURNING id AS newid ) DELETE FROM parent USING wcte WHERE id = newid; @@ -1824,58 +1749,18 @@ ERROR: INSERT/UPDATE/DELETE is not supported in subquery SELECT * FROM parent ORDER BY id; id | val ----+----- - 72 | p1 - 82 | c11 - 83 | c12 - 94 | c21 -(4 rows) + 1 | p1 + 11 | c11 + 12 | c12 + 23 | c21 + 24 | c22 +(5 rows) -- check EXPLAIN VERBOSE for a wCTE with RETURNING EXPLAIN (VERBOSE, COSTS OFF, NODES OFF, NUM_NODES OFF) WITH wcte AS ( INSERT INTO int8_tbl VALUES ( 42, 47 ) RETURNING q2 ) DELETE FROM a USING wcte WHERE aa = q2; - QUERY PLAN ----------------------------------------------------- - Delete on public.a - Delete on public.a - Delete on public.b - Delete on public.c - Delete on public.d - CTE wcte - -> Insert on public.int8_tbl - Output: int8_tbl.q2 - -> Result - Output: '42'::bigint, '47'::bigint - -> Nested Loop - Output: a.ctid, wcte.* - Join Filter: (a.aa = wcte.q2) - -> Seq Scan on public.a - Output: a.ctid, a.aa - -> CTE Scan on wcte - Output: wcte.*, wcte.q2 - -> Nested Loop - Output: b.ctid, wcte.* - Join Filter: (b.aa = wcte.q2) - -> Seq Scan on public.b - Output: b.ctid, b.aa - -> CTE Scan on wcte - Output: wcte.*, wcte.q2 - -> Nested Loop - Output: c.ctid, wcte.* - Join Filter: (c.aa = wcte.q2) - -> Seq Scan on public.c - Output: c.ctid, c.aa - -> CTE Scan on wcte - Output: wcte.*, wcte.q2 - -> Nested Loop - Output: d.ctid, wcte.* - Join Filter: (d.aa = wcte.q2) - -> Seq Scan on public.d - Output: d.ctid, d.aa - -> CTE Scan on wcte - Output: wcte.*, wcte.q2 -(38 rows) - +ERROR: INSERT/UPDATE/DELETE is not supported in subquery -- error cases -- data-modifying WITH tries to use its own output WITH RECURSIVE t AS ( diff --git a/src/test/regress/input/constraints.source b/src/test/regress/input/constraints.source index a3d5801463..28397e7976 100644 --- a/src/test/regress/input/constraints.source +++ b/src/test/regress/input/constraints.source @@ -11,7 +11,7 @@ -- -- DEFAULT syntax -- - +SET sequence_range = 1; CREATE TABLE DEFAULT_TBL (i int DEFAULT 100, x text DEFAULT 'vadim', f float8 DEFAULT 123.456); diff --git a/src/test/regress/output/constraints.source b/src/test/regress/output/constraints.source index 8414994b16..c9d41f83fd 100644 --- a/src/test/regress/output/constraints.source +++ b/src/test/regress/output/constraints.source @@ -10,6 +10,7 @@ -- -- DEFAULT syntax -- +SET sequence_range = 1; CREATE TABLE DEFAULT_TBL (i int DEFAULT 100, x text DEFAULT 'vadim', f float8 DEFAULT 123.456); INSERT INTO DEFAULT_TBL VALUES (1, 'thomas', 57.0613); @@ -159,20 +160,19 @@ INSERT INTO INSERT_TBL(y,z) VALUES ('check failed', 4); ERROR: new row for relation "insert_tbl" violates check constraint "insert_tbl_check" DETAIL: Failing row contains (5, check failed, 4). INSERT INTO INSERT_TBL(x,y) VALUES (5, 'check failed'); -ERROR: new row for relation "insert_tbl" violates check constraint "insert_tbl_con" -DETAIL: Failing row contains (5, check failed, -5). +ERROR: currval of sequence "insert_seq" is not yet defined in this session INSERT INTO INSERT_TBL(x,y) VALUES (5, '!check failed'); +ERROR: currval of sequence "insert_seq" is not yet defined in this session INSERT INTO INSERT_TBL(y) VALUES ('-!NULL-'); SELECT '' AS six, * FROM INSERT_TBL order by x,y,z; six | x | y | z -----+---+---------------+---- | 3 | Y | -3 | 4 | -!NULL- | -4 - | 5 | !check failed | -5 | 6 | -!NULL- | -6 | 7 | !check failed | -7 | 7 | -NULL- | -7 -(6 rows) +(5 rows) SELECT 'seven' AS one, nextval('insert_seq'); one | nextval @@ -198,12 +198,11 @@ SELECT '' AS nine, * FROM INSERT_TBL order by x,y,z; ------+---+---------------+---- | 3 | Y | -3 | 4 | -!NULL- | -4 - | 5 | !check failed | -5 | 6 | -!NULL- | -6 | 7 | !check failed | -7 | 7 | -NULL- | -7 | | | -(7 rows) +(6 rows) -- -- Check constraints on system columns @@ -323,16 +322,20 @@ DROP TABLE tmp; -- Check constraints on UPDATE -- UPDATE INSERT_TBL SET x = NULL WHERE x = 5; +ERROR: could not plan this distributed update +DETAIL: correlated UPDATE or updating distribution column currently not supported in Postgres-XL. UPDATE INSERT_TBL SET x = 6 WHERE x = 6; UPDATE INSERT_TBL SET x = -z, z = -x; +ERROR: could not plan this distributed update +DETAIL: correlated UPDATE or updating distribution column currently not supported in Postgres-XL. UPDATE INSERT_TBL SET x = z, z = x; -ERROR: new row for relation "insert_tbl" violates check constraint "insert_tbl_con" -DETAIL: Failing row contains (-4, Y, 4). +ERROR: could not plan this distributed update +DETAIL: correlated UPDATE or updating distribution column currently not supported in Postgres-XL. SELECT * FROM INSERT_TBL order by x,y,z; x | y | z ---+---------------+---- 4 | Y | -4 - 5 | !check failed | + 5 | !check failed | -5 6 | try again | -6 7 | try again | -7 | try again | @@ -345,7 +348,7 @@ SELECT * FROM INSERT_TBL order by x,y,z; CREATE TABLE COPY_TBL (x INT, y TEXT, z INT, CONSTRAINT COPY_CON CHECK (x > 3 AND y <> 'check failed' AND x < 7 )); -COPY COPY_TBL FROM '@abs_srcdir@/data/constro.data'; +COPY COPY_TBL FROM '/var/lib/postgresql/sources/postgresxl_master/postgres-xl/src/test/regress/data/constro.data'; SELECT '' AS two, * FROM COPY_TBL order by x,y,z; two | x | y | z -----+---+---------------+--- @@ -353,10 +356,9 @@ SELECT '' AS two, * FROM COPY_TBL order by x,y,z; | 6 | OK | 4 (2 rows) -COPY COPY_TBL FROM '@abs_srcdir@/data/constrf.data'; +COPY COPY_TBL FROM '/var/lib/postgresql/sources/postgresxl_master/postgres-xl/src/test/regress/data/constrf.data'; ERROR: new row for relation "copy_tbl" violates check constraint "copy_con" DETAIL: Failing row contains (7, check failed, 6). -CONTEXT: COPY copy_tbl, line 2: "7 check failed 6" SELECT * FROM COPY_TBL order by x,y,z; x | y | z ---+---------------+--- @@ -429,15 +431,16 @@ INSERT INTO UNIQUE_TBL VALUES (1, 'a'), (2, 'b'), (2, 'b') ON CONFLICT (i) DO UP ERROR: ON CONFLICT DO UPDATE command cannot affect row a second time HINT: Ensure that no rows proposed for insertion within the same command have duplicate constrained values. SELECT '' AS five, * FROM UNIQUE_TBL order by i,t; - five | i | t -------+---+------- + five | i | t +------+---+-------------------- | 1 | one | 2 | two | 4 | four - | 5 | one + | 5 | five-upsert-update + | 6 | six-upsert-insert | | seven | | six -(6 rows) +(7 rows) DROP TABLE UNIQUE_TBL; CREATE TABLE UNIQUE_TBL (i int, t text, diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule index e1fe64093a..c0cf4c3a3c 100644 --- a/src/test/regress/parallel_schedule +++ b/src/test/regress/parallel_schedule @@ -100,7 +100,12 @@ test: rules # ---------- # Another group of parallel tests # ---------- -test: select_views portals_p2 foreign_key cluster dependency guc bitmapops combocid tsearch tsdicts foreign_data window xmlmap functional_deps advisory_lock json jsonb indirect_toast equivclass +test: select_views portals_p2 foreign_key cluster dependency guc bitmapops combocid tsearch tsdicts foreign_data window xmlmap functional_deps json jsonb json_encoding indirect_toast equivclass + +# ---------- +# As XL uses advisory locks internally running this test separately. +# ---------- +test: advisory_lock # ---------- # Another group of parallel tests # NB: temp.sql does a reconnect which transiently uses 2 connections, diff --git a/src/test/regress/sql/alter_table.sql b/src/test/regress/sql/alter_table.sql index 7a04b883ef..11e99ceca9 100644 --- a/src/test/regress/sql/alter_table.sql +++ b/src/test/regress/sql/alter_table.sql @@ -2,7 +2,7 @@ -- ALTER_TABLE -- add attribute -- - +SET sequence_range = 1; CREATE TABLE tmp (initial int4); COMMENT ON TABLE tmp_wrong IS 'table comment'; diff --git a/src/test/regress/sql/matview.sql b/src/test/regress/sql/matview.sql index 70e4492c1b..2ba84e9244 100644 --- a/src/test/regress/sql/matview.sql +++ b/src/test/regress/sql/matview.sql @@ -59,7 +59,6 @@ INSERT INTO t VALUES (6, 'z', 13); -- confirm pre- and post-refresh contents of fairly simple materialized views SELECT * FROM tm ORDER BY type; SELECT * FROM tvm ORDER BY type; -REFRESH MATERIALIZED VIEW CONCURRENTLY tm; REFRESH MATERIALIZED VIEW tvm; SELECT * FROM tm ORDER BY type; SELECT * FROM tvm ORDER BY type; @@ -140,7 +139,6 @@ CREATE MATERIALIZED VIEW mv AS SELECT * FROM foo; CREATE UNIQUE INDEX ON mv(a); INSERT INTO foo SELECT * FROM foo; REFRESH MATERIALIZED VIEW mv; -REFRESH MATERIALIZED VIEW CONCURRENTLY mv; DROP TABLE foo CASCADE; -- make sure that all columns covered by unique indexes works @@ -152,7 +150,6 @@ CREATE UNIQUE INDEX on mv (c); INSERT INTO foo VALUES(2, 3, 4); INSERT INTO foo VALUES(3, 4, 5); REFRESH MATERIALIZED VIEW mv; -REFRESH MATERIALIZED VIEW CONCURRENTLY mv; DROP TABLE foo CASCADE; -- allow subquery to reference unpopulated matview if WITH NO DATA is specified @@ -170,7 +167,6 @@ INSERT INTO boxes (b) VALUES CREATE MATERIALIZED VIEW boxmv AS SELECT * FROM boxes; CREATE UNIQUE INDEX boxmv_id ON boxmv (id); UPDATE boxes SET b = '(2,2),(1,1)' WHERE id = 2; -REFRESH MATERIALIZED VIEW CONCURRENTLY boxmv; SELECT * FROM boxmv ORDER BY id; DROP TABLE boxes CASCADE; @@ -182,7 +178,6 @@ INSERT INTO v values (1, 2); CREATE UNIQUE INDEX mv_v_ii ON mv_v (ii); REFRESH MATERIALIZED VIEW mv_v; UPDATE v SET j = 3 WHERE x = 1; -REFRESH MATERIALIZED VIEW CONCURRENTLY mv_v; SELECT * FROM v; SELECT * FROM mv_v; DROP TABLE v CASCADE; @@ -206,6 +201,5 @@ CREATE MATERIALIZED VIEW IF NOT EXISTS mv_foo AS SELECT * FROM foo_data; CREATE UNIQUE INDEX ON mv_foo (i); RESET ROLE; REFRESH MATERIALIZED VIEW mv_foo; -REFRESH MATERIALIZED VIEW CONCURRENTLY mv_foo; DROP OWNED BY user_dw CASCADE; DROP ROLE user_dw; diff --git a/src/test/regress/sql/rules.sql b/src/test/regress/sql/rules.sql index 35ceb4ce85..778628cceb 100644 --- a/src/test/regress/sql/rules.sql +++ b/src/test/regress/sql/rules.sql @@ -7,6 +7,7 @@ -- -- Tables and rules for the view test -- +SET sequence_range = 1; create table rtest_t1 (a int4, b int4) distribute by replication; create table rtest_t2 (a int4, b int4); create table rtest_t3 (a int4, b int4); diff --git a/src/test/regress/sql/sequence.sql b/src/test/regress/sql/sequence.sql index 0aebc659b8..3182fc7d51 100644 --- a/src/test/regress/sql/sequence.sql +++ b/src/test/regress/sql/sequence.sql @@ -1,7 +1,7 @@ --- --- test creation of SERIAL column --- - +SET sequence_range = 1; CREATE TABLE serialTest (f1 text, f2 serial); INSERT INTO serialTest VALUES ('foo'); diff --git a/src/test/regress/sql/with.sql b/src/test/regress/sql/with.sql index 1b2acc4c77..639e71285f 100644 --- a/src/test/regress/sql/with.sql +++ b/src/test/regress/sql/with.sql @@ -223,7 +223,7 @@ with recursive q as ( ) select * from x) ) -select * from q limit 32) rel_alias order by 1, 2, 3; +select * from q order by 1, 2, 3 limit 32; -- recursive term has sub-UNION WITH RECURSIVE t(i,j) AS ( |