1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Add comment about default partition in check_new_partition_bound

The intention of the test is not immediately obvious, so we need this
much.
This commit is contained in:
Alvaro Herrera
2018-04-12 16:51:55 -03:00
parent 2fe977712c
commit 181ccbb5e4

View File

@ -858,6 +858,12 @@ check_new_partition_bound(char *relname, Relation parent,
if (spec->is_default)
{
/*
* The default partition bound never conflicts with any other
* partition's; if that's what we're attaching, the only possible
* problem is that one already exists, so check for that and we're
* done.
*/
if (boundinfo == NULL || !partition_bound_has_default(boundinfo))
return;