]> granicus.if.org Git - postgresql/commitdiff
Synchronize error messages.
authorRobert Haas <rhaas@postgresql.org>
Thu, 12 Oct 2017 19:14:22 +0000 (15:14 -0400)
committerRobert Haas <rhaas@postgresql.org>
Thu, 12 Oct 2017 19:14:22 +0000 (15:14 -0400)
Commits 6476b26115f3ef25a9cd87880e0ac5ec5f7a05f6
and 14f67a8ee282ebc0de78e773fbd597f460ab4a54 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

src/backend/catalog/partition.c
src/test/regress/expected/alter_table.out

index ebda85e4efc68d7ad60984f48e41f077aa4e97d9..07fdf66c3858ff91ca0d7817d00462023d2c1fb7 100644 (file)
@@ -988,7 +988,7 @@ check_default_allows_bound(Relation parent, Relation default_rel,
        if (PartConstraintImpliedByRelConstraint(default_rel, def_part_constraints))
        {
                ereport(INFO,
-                               (errmsg("partition constraint for table \"%s\" is implied by existing constraints",
+                               (errmsg("updated partition constraint for default partition \"%s\" is implied by existing constraints",
                                                RelationGetRelationName(default_rel))));
                return;
        }
@@ -1033,7 +1033,7 @@ check_default_allows_bound(Relation parent, Relation default_rel,
                                                                                                         def_part_constraints))
                        {
                                ereport(INFO,
-                                               (errmsg("partition constraint for table \"%s\" is implied by existing constraints",
+                                               (errmsg("updated partition constraint for default partition \"%s\" is implied by existing constraints",
                                                                RelationGetRelationName(part_rel))));
 
                                heap_close(part_rel, NoLock);
index dbe438dcd4b25bbe3b4480bbf4beb3351c1366c9..98f4db1f85ee020bb13ad7244023bc11a4d01168 100644 (file)
@@ -3345,7 +3345,7 @@ INFO:  partition constraint for table "part_3_4" is implied by existing constrai
 -- check if default partition scan skipped
 ALTER TABLE list_parted2_def ADD CONSTRAINT check_a CHECK (a IN (5, 6));
 CREATE TABLE part_55_66 PARTITION OF list_parted2 FOR VALUES IN (55, 66);
-INFO:  partition constraint for table "list_parted2_def" is implied by existing constraints
+INFO:  updated partition constraint for default partition "list_parted2_def" is implied by existing constraints
 -- check validation when attaching range partitions
 CREATE TABLE range_parted (
        a int,
@@ -3492,7 +3492,7 @@ DROP TABLE quuux1, quuux2;
 -- should validate for quuux1, but not for quuux2
 CREATE TABLE quuux1 PARTITION OF quuux FOR VALUES IN (1);
 CREATE TABLE quuux2 PARTITION OF quuux FOR VALUES IN (2);
-INFO:  partition constraint for table "quuux_default1" is implied by existing constraints
+INFO:  updated partition constraint for default partition "quuux_default1" is implied by existing constraints
 DROP TABLE quuux;
 --
 -- DETACH PARTITION