From f1f5ceb124b8662f63bebc6808bcf0472b579eaa Mon Sep 17 00:00:00 2001
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: Tue, 6 Aug 2019 12:25:56 -0400
Subject: [PATCH] Add comment on no default partition with hash partitioning

---
 src/backend/parser/parse_utilcmd.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c
index a9b2f8bacd..83c8048387 100644
--- a/src/backend/parser/parse_utilcmd.c
+++ b/src/backend/parser/parse_utilcmd.c
@@ -3727,6 +3727,10 @@ transformPartitionBound(ParseState *pstate, Relation parent,
 
 	if (spec->is_default)
 	{
+		/*
+		 * Hash partitioning does not support a default partition; there's no
+		 * use case for it and it's likely to cause trouble for users.
+		 */
 		if (strategy == PARTITION_STRATEGY_HASH)
 			ereport(ERROR,
 					(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
-- 
2.17.1

