Removes ModifyTable check from set_deparse_plan in ruleutils_14.c

Relevant PG commit:
86dc90056dfdbd9d1b891718d2e5614e3e432f35
pull/5209/head
Halil Ozan Akgul 2021-08-16 16:23:19 +03:00 committed by Sait Talha Nisanci
parent f557bae64c
commit 131062d6b5
1 changed files with 1 additions and 5 deletions

View File

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