projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2fe9777
)
Add comment about default partition in check_new_partition_bound
author
Alvaro Herrera
Thu, 12 Apr 2018 19:51:55 +0000
(16:51 -0300)
committer
Alvaro Herrera
Thu, 12 Apr 2018 19:52:29 +0000
(16:52 -0300)
The intention of the test is not immediately obvious, so we need this
much.
src/backend/catalog/partition.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/catalog/partition.c
b/src/backend/catalog/partition.c
index 0f5932feeef700515d9eb5dd41114ecabdce34d9..55130e66e4b23968eea0524d720c3e8ed204b112 100644
(file)
--- 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;