mirror of
https://github.com/postgres/postgres.git
synced 2025-06-17 17:02:08 +03:00
Add comment on no default partition with hash partitioning
Discussion: https://postgr.es/m/20190806222735.GA9535@alvherre.pgsql
This commit is contained in:
@ -3727,6 +3727,12 @@ transformPartitionBound(ParseState *pstate, Relation parent,
|
|||||||
|
|
||||||
if (spec->is_default)
|
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)
|
if (strategy == PARTITION_STRATEGY_HASH)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
|
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
|
||||||
|
Reference in New Issue
Block a user