partition-WCO-qual-parent-fix.patch
text/plain
Filename: partition-WCO-qual-parent-fix.patch
Type: text/plain
Part: 0
Patch
Format: unified
| File | + | − |
|---|---|---|
| src/backend/executor/execPartition.c | 1 | 1 |
diff --git a/src/backend/executor/execPartition.c b/src/backend/executor/execPartition.c
index 54efc9e545..f6fe7cd61d 100644
--- a/src/backend/executor/execPartition.c
+++ b/src/backend/executor/execPartition.c
@@ -413,7 +413,7 @@ ExecInitPartitionInfo(ModifyTableState *mtstate,
{
WithCheckOption *wco = castNode(WithCheckOption, lfirst(ll));
ExprState *wcoExpr = ExecInitQual(castNode(List, wco->qual),
- mtstate->mt_plans[0]);
+ &mtstate->ps);
wcoExprs = lappend(wcoExprs, wcoExpr);
}