mirror of https://github.com/citusdata/citus.git
Fix psql-dependent add constraint tests
Some of these weren't even correct.pull/1439/head
parent
1ef60069b6
commit
1116805020
|
@ -456,17 +456,17 @@ INSERT INTO products VALUES(1,'product_1', 10, 8);
|
||||||
ERROR: single-shard DML commands must not appear in transaction blocks which contain multi-shard data modifications
|
ERROR: single-shard DML commands must not appear in transaction blocks which contain multi-shard data modifications
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
-- There should be no constraint on master and worker(s)
|
-- There should be no constraint on master and worker(s)
|
||||||
\d products
|
SELECT "Constraint", "Definition" FROM table_checks WHERE relid='products'::regclass;
|
||||||
Table "public.products"
|
Constraint | Definition
|
||||||
Column | Type | Modifiers
|
------------+------------
|
||||||
------------------+---------+-----------
|
(0 rows)
|
||||||
product_no | integer |
|
|
||||||
name | text |
|
|
||||||
price | numeric |
|
|
||||||
discounted_price | numeric |
|
|
||||||
|
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
\d products_1450199
|
SELECT "Constraint", "Definition" FROM table_checks WHERE relid='public.products_1450202'::regclass;
|
||||||
|
Constraint | Definition
|
||||||
|
------------+------------
|
||||||
|
(0 rows)
|
||||||
|
|
||||||
\c - - - :master_port
|
\c - - - :master_port
|
||||||
-- Tests to check the effect of rollback
|
-- Tests to check the effect of rollback
|
||||||
BEGIN;
|
BEGIN;
|
||||||
|
@ -478,16 +478,16 @@ ALTER TABLE products ADD CONSTRAINT check_price CHECK(price > discounted_price);
|
||||||
ALTER TABLE products ADD CONSTRAINT p_key_product PRIMARY KEY(product_no);
|
ALTER TABLE products ADD CONSTRAINT p_key_product PRIMARY KEY(product_no);
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
-- There should be no constraint on master and worker(s)
|
-- There should be no constraint on master and worker(s)
|
||||||
\d products
|
SELECT "Constraint", "Definition" FROM table_checks WHERE relid='products'::regclass;
|
||||||
Table "public.products"
|
Constraint | Definition
|
||||||
Column | Type | Modifiers
|
------------+------------
|
||||||
------------------+---------+-----------
|
(0 rows)
|
||||||
product_no | integer |
|
|
||||||
name | text |
|
|
||||||
price | numeric |
|
|
||||||
discounted_price | numeric |
|
|
||||||
|
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
\d products_1450199
|
SELECT "Constraint", "Definition" FROM table_checks WHERE relid='public.products_1450202'::regclass;
|
||||||
|
Constraint | Definition
|
||||||
|
------------+------------
|
||||||
|
(0 rows)
|
||||||
|
|
||||||
\c - - - :master_port
|
\c - - - :master_port
|
||||||
DROP TABLE products;
|
DROP TABLE products;
|
||||||
|
|
|
@ -398,11 +398,11 @@ INSERT INTO products VALUES(1,'product_1', 10, 8);
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
|
|
||||||
-- There should be no constraint on master and worker(s)
|
-- There should be no constraint on master and worker(s)
|
||||||
\d products
|
SELECT "Constraint", "Definition" FROM table_checks WHERE relid='products'::regclass;
|
||||||
|
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
|
|
||||||
\d products_1450199
|
SELECT "Constraint", "Definition" FROM table_checks WHERE relid='public.products_1450202'::regclass;
|
||||||
|
|
||||||
\c - - - :master_port
|
\c - - - :master_port
|
||||||
|
|
||||||
|
@ -415,11 +415,11 @@ ALTER TABLE products ADD CONSTRAINT p_key_product PRIMARY KEY(product_no);
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
|
|
||||||
-- There should be no constraint on master and worker(s)
|
-- There should be no constraint on master and worker(s)
|
||||||
\d products
|
SELECT "Constraint", "Definition" FROM table_checks WHERE relid='products'::regclass;
|
||||||
|
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
|
|
||||||
\d products_1450199
|
SELECT "Constraint", "Definition" FROM table_checks WHERE relid='public.products_1450202'::regclass;
|
||||||
|
|
||||||
\c - - - :master_port
|
\c - - - :master_port
|
||||||
DROP TABLE products;
|
DROP TABLE products;
|
||||||
|
|
Loading…
Reference in New Issue