projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e85642
)
Add comment on no default partition with hash partitioning
author
Alvaro Herrera
Wed, 7 Aug 2019 16:27:47 +0000
(12:27 -0400)
committer
Alvaro Herrera
Wed, 7 Aug 2019 16:27:47 +0000
(12:27 -0400)
Discussion: https://postgr.es/m/
20190806222735
[email protected]
src/backend/parser/parse_utilcmd.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/parser/parse_utilcmd.c
b/src/backend/parser/parse_utilcmd.c
index a9b2f8bacd807d49241b2bd451a1bc903da7f1e6..6e5768c66cffc7bd039282cae44133730ef10c60 100644
(file)
--- a/
src/backend/parser/parse_utilcmd.c
+++ b/
src/backend/parser/parse_utilcmd.c
@@
-3727,6
+3727,12
@@
transformPartitionBound(ParseState *pstate, Relation parent,
if (spec->is_default)
{
+ /*
+ * Hash partitioning does not support a default partition; there's no
+ * use case for it (since the set of partitions to create is perfectly
+ * defined), and if users do get into it accidentally, it's hard to
+ * back out from it afterwards.
+ */
if (strategy == PARTITION_STRATEGY_HASH)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),