1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

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
This commit is contained in:
Robert Haas
2017-10-05 12:19:40 -04:00
parent e9baa5e9fa
commit c31e9d4baf
2 changed files with 10 additions and 5 deletions

View File

@ -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;
}