diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/test/regress/expected/identity.out | 6 | ||||
-rw-r--r-- | src/test/regress/sql/identity.sql | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/test/regress/expected/identity.out b/src/test/regress/expected/identity.out index 31ad041055f..29539e7f632 100644 --- a/src/test/regress/expected/identity.out +++ b/src/test/regress/expected/identity.out @@ -756,11 +756,13 @@ ALTER TABLE pitest3_p1 ALTER COLUMN f3 ADD GENERATED ALWAYS AS IDENTITY (START WITH 3); ERROR: cannot add identity to a column of a partition -- fails, changing only the partitioned table not allowed +BEGIN; +ALTER TABLE pitest3_p1 ALTER COLUMN f3 SET NOT NULL; ALTER TABLE ONLY pitest3 - ALTER COLUMN f3 SET NOT NULL, ALTER COLUMN f3 ADD GENERATED ALWAYS AS IDENTITY (START WITH 3); -ERROR: constraint must be added to child tables too +ERROR: cannot add identity to a column of only the partitioned table HINT: Do not specify the ONLY keyword. +ROLLBACK; ALTER TABLE pitest3 ALTER COLUMN f3 SET NOT NULL, ALTER COLUMN f3 ADD GENERATED ALWAYS AS IDENTITY (START WITH 3); diff --git a/src/test/regress/sql/identity.sql b/src/test/regress/sql/identity.sql index 27ca708ff19..84c43a19a31 100644 --- a/src/test/regress/sql/identity.sql +++ b/src/test/regress/sql/identity.sql @@ -418,9 +418,11 @@ ALTER TABLE pitest3_p1 ALTER COLUMN f3 SET NOT NULL, ALTER COLUMN f3 ADD GENERATED ALWAYS AS IDENTITY (START WITH 3); -- fails, changing only the partitioned table not allowed +BEGIN; +ALTER TABLE pitest3_p1 ALTER COLUMN f3 SET NOT NULL; ALTER TABLE ONLY pitest3 - ALTER COLUMN f3 SET NOT NULL, ALTER COLUMN f3 ADD GENERATED ALWAYS AS IDENTITY (START WITH 3); +ROLLBACK; ALTER TABLE pitest3 ALTER COLUMN f3 SET NOT NULL, ALTER COLUMN f3 ADD GENERATED ALWAYS AS IDENTITY (START WITH 3); |