From 131062d6b57064ddc6b36b3789e42fcfa00b6314 Mon Sep 17 00:00:00 2001 From: Halil Ozan Akgul Date: Mon, 16 Aug 2021 16:23:19 +0300 Subject: [PATCH] Removes ModifyTable check from set_deparse_plan in ruleutils_14.c Relevant PG commit: 86dc90056dfdbd9d1b891718d2e5614e3e432f35 --- src/backend/distributed/deparser/ruleutils_14.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/backend/distributed/deparser/ruleutils_14.c b/src/backend/distributed/deparser/ruleutils_14.c index 1c1c7576b..75b4b9115 100644 --- a/src/backend/distributed/deparser/ruleutils_14.c +++ b/src/backend/distributed/deparser/ruleutils_14.c @@ -1674,16 +1674,12 @@ set_deparse_plan(deparse_namespace *dpns, Plan *plan) * We special-case Append and MergeAppend to pretend that the first child * plan is the OUTER referent; we have to interpret OUTER Vars in their * tlists according to one of the children, and the first one is the most - * natural choice. Likewise special-case ModifyTable to pretend that the - * first child plan is the OUTER referent; this is to support RETURNING - * lists containing references to non-target relations. + * natural choice. */ if (IsA(plan, Append)) dpns->outer_plan = linitial(((Append *) plan)->appendplans); else if (IsA(plan, MergeAppend)) dpns->outer_plan = linitial(((MergeAppend *) plan)->mergeplans); - else if (IsA(plan, ModifyTable)) - dpns->outer_plan = linitial(((ModifyTable *) plan)->plans); else dpns->outer_plan = outerPlan(plan);