mirror of https://github.com/citusdata/citus.git
Fix psql-dependent reference tests
parent
ad97e8d8f4
commit
dee1db807f
|
@ -1327,43 +1327,61 @@ ALTER TABLE reference_table_ddl DROP COLUMN value_1;
|
||||||
ALTER TABLE reference_table_ddl ALTER COLUMN value_2 SET DEFAULT 25.0;
|
ALTER TABLE reference_table_ddl ALTER COLUMN value_2 SET DEFAULT 25.0;
|
||||||
ALTER TABLE reference_table_ddl ALTER COLUMN value_3 SET NOT NULL;
|
ALTER TABLE reference_table_ddl ALTER COLUMN value_3 SET NOT NULL;
|
||||||
-- see that Citus applied all DDLs to the table
|
-- see that Citus applied all DDLs to the table
|
||||||
\d reference_table_ddl
|
SELECT "Column", "Type", "Modifiers" FROM table_desc WHERE relid='public.reference_table_ddl'::regclass;
|
||||||
Table "public.reference_table_ddl"
|
|
||||||
Column | Type | Modifiers
|
Column | Type | Modifiers
|
||||||
---------+-----------------------------+--------------
|
---------+-----------------------------+--------------
|
||||||
value_2 | double precision | default 25.0
|
value_2 | double precision | default 25.0
|
||||||
value_3 | text | not null
|
value_3 | text | not null
|
||||||
value_4 | timestamp without time zone |
|
value_4 | timestamp without time zone |
|
||||||
value_5 | double precision |
|
value_5 | double precision |
|
||||||
Indexes:
|
(4 rows)
|
||||||
"reference_index_2" btree (value_2, value_3)
|
|
||||||
|
\d reference_index_2
|
||||||
|
Index "public.reference_index_2"
|
||||||
|
Column | Type | Definition
|
||||||
|
---------+------------------+------------
|
||||||
|
value_2 | double precision | value_2
|
||||||
|
value_3 | text | value_3
|
||||||
|
btree, for table "public.reference_table_ddl"
|
||||||
|
|
||||||
-- also to the shard placements
|
-- also to the shard placements
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
\d reference_table_ddl*
|
SELECT "Column", "Type", "Modifiers" FROM table_desc WHERE relid='public.reference_table_ddl_1250019'::regclass;
|
||||||
Table "public.reference_table_ddl_1250019"
|
|
||||||
Column | Type | Modifiers
|
Column | Type | Modifiers
|
||||||
---------+-----------------------------+--------------
|
---------+-----------------------------+--------------
|
||||||
value_2 | double precision | default 25.0
|
value_2 | double precision | default 25.0
|
||||||
value_3 | text | not null
|
value_3 | text | not null
|
||||||
value_4 | timestamp without time zone |
|
value_4 | timestamp without time zone |
|
||||||
value_5 | double precision |
|
value_5 | double precision |
|
||||||
Indexes:
|
(4 rows)
|
||||||
"reference_index_2_1250019" btree (value_2, value_3)
|
|
||||||
|
\d reference_index_2_1250019
|
||||||
|
Index "public.reference_index_2_1250019"
|
||||||
|
Column | Type | Definition
|
||||||
|
---------+------------------+------------
|
||||||
|
value_2 | double precision | value_2
|
||||||
|
value_3 | text | value_3
|
||||||
|
btree, for table "public.reference_table_ddl_1250019"
|
||||||
|
|
||||||
\c - - - :master_port
|
\c - - - :master_port
|
||||||
DROP INDEX reference_index_2;
|
DROP INDEX reference_index_2;
|
||||||
NOTICE: using one-phase commit for distributed DDL commands
|
NOTICE: using one-phase commit for distributed DDL commands
|
||||||
HINT: You can enable two-phase commit for extra safety with: SET citus.multi_shard_commit_protocol TO '2pc'
|
HINT: You can enable two-phase commit for extra safety with: SET citus.multi_shard_commit_protocol TO '2pc'
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
\d reference_table_ddl*
|
SELECT "Column", "Type", "Modifiers" FROM table_desc WHERE relid='public.reference_table_ddl_1250019'::regclass;
|
||||||
Table "public.reference_table_ddl_1250019"
|
|
||||||
Column | Type | Modifiers
|
Column | Type | Modifiers
|
||||||
---------+-----------------------------+--------------
|
---------+-----------------------------+--------------
|
||||||
value_2 | double precision | default 25.0
|
value_2 | double precision | default 25.0
|
||||||
value_3 | text | not null
|
value_3 | text | not null
|
||||||
value_4 | timestamp without time zone |
|
value_4 | timestamp without time zone |
|
||||||
value_5 | double precision |
|
value_5 | double precision |
|
||||||
|
(4 rows)
|
||||||
|
|
||||||
|
\di reference_index_2*
|
||||||
|
List of relations
|
||||||
|
Schema | Name | Type | Owner | Table
|
||||||
|
--------+------+------+-------+-------
|
||||||
|
(0 rows)
|
||||||
|
|
||||||
\c - - - :master_port
|
\c - - - :master_port
|
||||||
-- as we expect, renaming and setting WITH OIDS does not work for reference tables
|
-- as we expect, renaming and setting WITH OIDS does not work for reference tables
|
||||||
|
|
|
@ -859,15 +859,18 @@ ALTER TABLE reference_table_ddl ALTER COLUMN value_2 SET DEFAULT 25.0;
|
||||||
ALTER TABLE reference_table_ddl ALTER COLUMN value_3 SET NOT NULL;
|
ALTER TABLE reference_table_ddl ALTER COLUMN value_3 SET NOT NULL;
|
||||||
|
|
||||||
-- see that Citus applied all DDLs to the table
|
-- see that Citus applied all DDLs to the table
|
||||||
\d reference_table_ddl
|
SELECT "Column", "Type", "Modifiers" FROM table_desc WHERE relid='public.reference_table_ddl'::regclass;
|
||||||
|
\d reference_index_2
|
||||||
|
|
||||||
-- also to the shard placements
|
-- also to the shard placements
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
\d reference_table_ddl*
|
SELECT "Column", "Type", "Modifiers" FROM table_desc WHERE relid='public.reference_table_ddl_1250019'::regclass;
|
||||||
|
\d reference_index_2_1250019
|
||||||
\c - - - :master_port
|
\c - - - :master_port
|
||||||
DROP INDEX reference_index_2;
|
DROP INDEX reference_index_2;
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
\d reference_table_ddl*
|
SELECT "Column", "Type", "Modifiers" FROM table_desc WHERE relid='public.reference_table_ddl_1250019'::regclass;
|
||||||
|
\di reference_index_2*
|
||||||
\c - - - :master_port
|
\c - - - :master_port
|
||||||
|
|
||||||
-- as we expect, renaming and setting WITH OIDS does not work for reference tables
|
-- as we expect, renaming and setting WITH OIDS does not work for reference tables
|
||||||
|
|
Loading…
Reference in New Issue