mirror of https://github.com/citusdata/citus.git
Rebase & Update tests
parent
2b9fbce19e
commit
0d0cd9222c
|
|
@ -628,7 +628,7 @@ ERROR: cannot build foreign key between reference table and a partition
|
||||||
-- this should work
|
-- this should work
|
||||||
alter table citus_local_parent_1 add constraint fkey_to_drop_test foreign key(a) references ref(a);
|
alter table citus_local_parent_1 add constraint fkey_to_drop_test foreign key(a) references ref(a);
|
||||||
-- this should undistribute the table, and the entries should be gone from pg_dist_partition
|
-- this should undistribute the table, and the entries should be gone from pg_dist_partition
|
||||||
select logicalrelid from pg_dist_partition where logicalrelid::text like 'citus_local_parent%';
|
select logicalrelid from pg_dist_partition where logicalrelid::text like 'citus_local_parent%' order by logicalrelid;
|
||||||
logicalrelid
|
logicalrelid
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
citus_local_parent_1
|
citus_local_parent_1
|
||||||
|
|
@ -640,6 +640,12 @@ select logicalrelid from pg_dist_partition where logicalrelid::text like 'citus_
|
||||||
|
|
||||||
set client_min_messages to error;
|
set client_min_messages to error;
|
||||||
alter table citus_local_parent_1 drop constraint fkey_to_drop_test;
|
alter table citus_local_parent_1 drop constraint fkey_to_drop_test;
|
||||||
|
SELECT undistribute_table('citus_local_parent_1', true);
|
||||||
|
undistribute_table
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
|
||||||
|
(1 row)
|
||||||
|
|
||||||
select logicalrelid from pg_dist_partition where logicalrelid::text like 'citus_local_parent%';
|
select logicalrelid from pg_dist_partition where logicalrelid::text like 'citus_local_parent%';
|
||||||
logicalrelid
|
logicalrelid
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -337,9 +337,10 @@ alter table citus_local_parent_1_child_1 add foreign key(a) references ref(a);
|
||||||
-- this should work
|
-- this should work
|
||||||
alter table citus_local_parent_1 add constraint fkey_to_drop_test foreign key(a) references ref(a);
|
alter table citus_local_parent_1 add constraint fkey_to_drop_test foreign key(a) references ref(a);
|
||||||
-- this should undistribute the table, and the entries should be gone from pg_dist_partition
|
-- this should undistribute the table, and the entries should be gone from pg_dist_partition
|
||||||
select logicalrelid from pg_dist_partition where logicalrelid::text like 'citus_local_parent%';
|
select logicalrelid from pg_dist_partition where logicalrelid::text like 'citus_local_parent%' order by logicalrelid;
|
||||||
set client_min_messages to error;
|
set client_min_messages to error;
|
||||||
alter table citus_local_parent_1 drop constraint fkey_to_drop_test;
|
alter table citus_local_parent_1 drop constraint fkey_to_drop_test;
|
||||||
|
SELECT undistribute_table('citus_local_parent_1', true);
|
||||||
select logicalrelid from pg_dist_partition where logicalrelid::text like 'citus_local_parent%';
|
select logicalrelid from pg_dist_partition where logicalrelid::text like 'citus_local_parent%';
|
||||||
|
|
||||||
-- verify attaching partition with a foreign key errors out
|
-- verify attaching partition with a foreign key errors out
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue