aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/expected/alter_table.out2
-rw-r--r--src/test/regress/expected/indexing.out8
-rw-r--r--src/test/regress/sql/alter_table.sql2
-rw-r--r--src/test/regress/sql/indexing.sql7
4 files changed, 17 insertions, 2 deletions
diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out
index ccd2c38dbc9..04838dfad16 100644
--- a/src/test/regress/expected/alter_table.out
+++ b/src/test/regress/expected/alter_table.out
@@ -3646,7 +3646,7 @@ ALTER TABLE list_parted2 ATTACH PARTITION list_parted2 FOR VALUES IN (0);
ERROR: circular inheritance not allowed
DETAIL: "list_parted2" is already a child of "list_parted2".
-- If a partitioned table being created or an existing table being attached
--- as a paritition does not have a constraint that would allow validation scan
+-- as a partition does not have a constraint that would allow validation scan
-- to be skipped, but an individual partition does, then the partition's
-- validation scan is skipped.
CREATE TABLE quuux (a int, b text) PARTITION BY LIST (a);
diff --git a/src/test/regress/expected/indexing.out b/src/test/regress/expected/indexing.out
index 375f55b3378..3fa47cba968 100644
--- a/src/test/regress/expected/indexing.out
+++ b/src/test/regress/expected/indexing.out
@@ -885,6 +885,14 @@ for values from (0) to (1000) partition by range (b); -- fail
ERROR: insufficient columns in PRIMARY KEY constraint definition
DETAIL: PRIMARY KEY constraint on table "idxpart2" lacks column "b" which is part of the partition key.
drop table idxpart;
+-- Ditto for the ATTACH PARTITION case
+create table idxpart (a int primary key, b int) partition by range (a);
+create table idxpart1 (a int not null, b int, primary key (a, b))
+ partition by range (a, b);
+alter table idxpart attach partition idxpart1 for values from (1) to (1000);
+ERROR: insufficient columns in PRIMARY KEY constraint definition
+DETAIL: PRIMARY KEY constraint on table "idxpart1" lacks column "b" which is part of the partition key.
+DROP TABLE idxpart, idxpart1;
-- Multi-layer partitioning works correctly in this case:
create table idxpart (a int, b int, primary key (a, b)) partition by range (a);
create table idxpart2 partition of idxpart for values from (0) to (1000) partition by range (b);
diff --git a/src/test/regress/sql/alter_table.sql b/src/test/regress/sql/alter_table.sql
index b73f523e8ab..66f5e50d97c 100644
--- a/src/test/regress/sql/alter_table.sql
+++ b/src/test/regress/sql/alter_table.sql
@@ -2348,7 +2348,7 @@ ALTER TABLE part_5 ATTACH PARTITION list_parted2 FOR VALUES IN ('b');
ALTER TABLE list_parted2 ATTACH PARTITION list_parted2 FOR VALUES IN (0);
-- If a partitioned table being created or an existing table being attached
--- as a paritition does not have a constraint that would allow validation scan
+-- as a partition does not have a constraint that would allow validation scan
-- to be skipped, but an individual partition does, then the partition's
-- validation scan is skipped.
CREATE TABLE quuux (a int, b text) PARTITION BY LIST (a);
diff --git a/src/test/regress/sql/indexing.sql b/src/test/regress/sql/indexing.sql
index f3d0387f34f..902d8c59ca9 100644
--- a/src/test/regress/sql/indexing.sql
+++ b/src/test/regress/sql/indexing.sql
@@ -450,6 +450,13 @@ create table idxpart2 partition of idxpart
for values from (0) to (1000) partition by range (b); -- fail
drop table idxpart;
+-- Ditto for the ATTACH PARTITION case
+create table idxpart (a int primary key, b int) partition by range (a);
+create table idxpart1 (a int not null, b int, primary key (a, b))
+ partition by range (a, b);
+alter table idxpart attach partition idxpart1 for values from (1) to (1000);
+DROP TABLE idxpart, idxpart1;
+
-- Multi-layer partitioning works correctly in this case:
create table idxpart (a int, b int, primary key (a, b)) partition by range (a);
create table idxpart2 partition of idxpart for values from (0) to (1000) partition by range (b);