Skip to content

Commit 12afc71

Browse files
committed
Add comment on no default partition with hash partitioning
Discussion: https://postgr.es/m/20190806222735.GA9535@alvherre.pgsql
1 parent 4e85642 commit 12afc71

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/backend/parser/parse_utilcmd.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3727,6 +3727,12 @@ transformPartitionBound(ParseState *pstate, Relation parent,
37273727

37283728
if (spec->is_default)
37293729
{
3730+
/*
3731+
* Hash partitioning does not support a default partition; there's no
3732+
* use case for it (since the set of partitions to create is perfectly
3733+
* defined), and if users do get into it accidentally, it's hard to
3734+
* back out from it afterwards.
3735+
*/
37303736
if (strategy == PARTITION_STRATEGY_HASH)
37313737
ereport(ERROR,
37323738
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy