Commit 12afc714 authored by Alvaro Herrera's avatar Alvaro Herrera

Add comment on no default partition with hash partitioning

Discussion: https://postgr.es/m/20190806222735.GA9535@alvherre.pgsql
parent 4e85642d
......@@ -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),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment