diff options
author | Robert Haas <rhaas@postgresql.org> | 2017-10-05 12:19:40 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2017-10-05 12:19:40 -0400 |
commit | c31e9d4bafd80da52408af5f87fe874c9ca0c952 (patch) | |
tree | c589635f7a6dc0ef0b98664a29ca6d86e8b4362d /src/backend/commands/tablecmds.c | |
parent | e9baa5e9fa147e00a2466ab2c40eb99c8a700824 (diff) | |
download | postgresql-c31e9d4bafd80da52408af5f87fe874c9ca0c952.tar.gz postgresql-c31e9d4bafd80da52408af5f87fe874c9ca0c952.zip |
Improve error message when skipping scan of default partition.
It seems like a good idea to clearly distinguish between skipping the
scan of the new partition itself and skipping the scan of the default
partition.
Amit Langote
Discussion: http://postgr.es/m/1f08b844-0078-aa8d-452e-7af3bf77d05f@lab.ntt.co.jp
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r-- | src/backend/commands/tablecmds.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 563bcda30cb..d90c739952a 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -13635,9 +13635,14 @@ ValidatePartitionConstraints(List **wqueue, Relation scanrel, */ if (PartConstraintImpliedByRelConstraint(scanrel, partConstraint)) { - ereport(INFO, - (errmsg("partition constraint for table \"%s\" is implied by existing constraints", - RelationGetRelationName(scanrel)))); + if (!validate_default) + ereport(INFO, + (errmsg("partition constraint for table \"%s\" is implied by existing constraints", + RelationGetRelationName(scanrel)))); + else + ereport(INFO, + (errmsg("updated partition constraint for default partition \"%s\" is implied by existing constraints", + RelationGetRelationName(scanrel)))); return; } |