diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2018-04-12 16:51:55 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2018-04-12 16:52:29 -0300 |
commit | 181ccbb5e49cdc628e0c8334a9ed57dbc736efe8 (patch) | |
tree | 5bdb3ad0de82bf162fc422f9dae6571333671f72 | |
parent | 2fe977712c7375ccb1b6ddf7dfb234d0db903f16 (diff) | |
download | postgresql-181ccbb5e49cdc628e0c8334a9ed57dbc736efe8.tar.gz postgresql-181ccbb5e49cdc628e0c8334a9ed57dbc736efe8.zip |
Add comment about default partition in check_new_partition_bound
The intention of the test is not immediately obvious, so we need this
much.
-rw-r--r-- | src/backend/catalog/partition.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/backend/catalog/partition.c b/src/backend/catalog/partition.c index 0f5932feeef..55130e66e4b 100644 --- a/src/backend/catalog/partition.c +++ b/src/backend/catalog/partition.c @@ -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; |