Skip to content

Commit ad4a7ed

Browse files
committed
Synchronize error messages.
Commits 6476b26 and 14f67a8 didn't use quite the same error message for what is basically the same situation. Amit Langote, pared back a bit by me. Discussion: http://postgr.es/m/54dc76d0-3b5b-ba5a-27dc-fb31a3975b61@lab.ntt.co.jp
1 parent 0a047a1 commit ad4a7ed

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/backend/catalog/partition.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ check_default_allows_bound(Relation parent, Relation default_rel,
988988
if (PartConstraintImpliedByRelConstraint(default_rel, def_part_constraints))
989989
{
990990
ereport(INFO,
991-
(errmsg("partition constraint for table \"%s\" is implied by existing constraints",
991+
(errmsg("updated partition constraint for default partition \"%s\" is implied by existing constraints",
992992
RelationGetRelationName(default_rel))));
993993
return;
994994
}
@@ -1033,7 +1033,7 @@ check_default_allows_bound(Relation parent, Relation default_rel,
10331033
def_part_constraints))
10341034
{
10351035
ereport(INFO,
1036-
(errmsg("partition constraint for table \"%s\" is implied by existing constraints",
1036+
(errmsg("updated partition constraint for default partition \"%s\" is implied by existing constraints",
10371037
RelationGetRelationName(part_rel))));
10381038

10391039
heap_close(part_rel, NoLock);

src/test/regress/expected/alter_table.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3345,7 +3345,7 @@ INFO: partition constraint for table "part_3_4" is implied by existing constrai
33453345
-- check if default partition scan skipped
33463346
ALTER TABLE list_parted2_def ADD CONSTRAINT check_a CHECK (a IN (5, 6));
33473347
CREATE TABLE part_55_66 PARTITION OF list_parted2 FOR VALUES IN (55, 66);
3348-
INFO: partition constraint for table "list_parted2_def" is implied by existing constraints
3348+
INFO: updated partition constraint for default partition "list_parted2_def" is implied by existing constraints
33493349
-- check validation when attaching range partitions
33503350
CREATE TABLE range_parted (
33513351
a int,
@@ -3492,7 +3492,7 @@ DROP TABLE quuux1, quuux2;
34923492
-- should validate for quuux1, but not for quuux2
34933493
CREATE TABLE quuux1 PARTITION OF quuux FOR VALUES IN (1);
34943494
CREATE TABLE quuux2 PARTITION OF quuux FOR VALUES IN (2);
3495-
INFO: partition constraint for table "quuux_default1" is implied by existing constraints
3495+
INFO: updated partition constraint for default partition "quuux_default1" is implied by existing constraints
34963496
DROP TABLE quuux;
34973497
--
34983498
-- DETACH PARTITION

0 commit comments

Comments
 (0)