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); }