Fix psql-dependent add constraint tests

Some of these weren't even correct.
pull/1439/head
Jason Petersen 2017-05-31 11:43:05 -06:00
parent 1ef60069b6
commit 1116805020
No known key found for this signature in database
GPG Key ID: 9F1D3510D110ABA9
2 changed files with 22 additions and 22 deletions

View File

@ -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;

View File

@ -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;