diff options
Diffstat (limited to 'src/test/regress/expected/alter_table.out')
-rw-r--r-- | src/test/regress/expected/alter_table.out | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out index 5a97b4b2a53..7c0f48d8ed4 100644 --- a/src/test/regress/expected/alter_table.out +++ b/src/test/regress/expected/alter_table.out @@ -4109,7 +4109,8 @@ DROP USER regress_alter_table_user1; -- default partition create table defpart_attach_test (a int) partition by list (a); create table defpart_attach_test1 partition of defpart_attach_test for values in (1); -create table defpart_attach_test_d (like defpart_attach_test); +create table defpart_attach_test_d (b int, a int); +alter table defpart_attach_test_d drop b; insert into defpart_attach_test_d values (1), (2); -- error because its constraint as the default partition would be violated -- by the row containing 1 @@ -4120,6 +4121,12 @@ alter table defpart_attach_test_d add check (a > 1); -- should be attached successfully and without needing to be scanned alter table defpart_attach_test attach partition defpart_attach_test_d default; INFO: partition constraint for table "defpart_attach_test_d" is implied by existing constraints +-- check that attaching a partition correctly reports any rows in the default +-- partition that should not be there for the new partition to be attached +-- successfully +create table defpart_attach_test_2 (like defpart_attach_test_d); +alter table defpart_attach_test attach partition defpart_attach_test_2 for values in (2); +ERROR: updated partition constraint for default partition would be violated by some row drop table defpart_attach_test; -- check combinations of temporary and permanent relations when attaching -- partitions. |