Add comment on no default partition with hash partitioning
Discussion: https://postgr.es/m/20190806222735.GA9535@alvherre.pgsql
This commit is contained in:
parent
4e85642d93
commit
12afc7145c
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue