aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_utilcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/parser/parse_utilcmd.c')
-rw-r--r--src/backend/parser/parse_utilcmd.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c
index 20586797cc5..655da02c109 100644
--- a/src/backend/parser/parse_utilcmd.c
+++ b/src/backend/parser/parse_utilcmd.c
@@ -3307,6 +3307,18 @@ transformPartitionBound(ParseState *pstate, Relation parent,
/* Avoid scribbling on input */
result_spec = copyObject(spec);
+ if (spec->is_default)
+ {
+ /*
+ * In case of the default partition, parser had no way to identify the
+ * partition strategy. Assign the parent's strategy to the default
+ * partition bound spec.
+ */
+ result_spec->strategy = strategy;
+
+ return result_spec;
+ }
+
if (strategy == PARTITION_STRATEGY_LIST)
{
ListCell *cell;