1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Revert "Modified files for MERGE"

This reverts commit 354f13855e.
This commit is contained in:
Simon Riggs
2018-04-02 21:34:15 +01:00
parent 354f13855e
commit 7cf8a5c302
82 changed files with 165 additions and 2570 deletions

View File

@ -794,24 +794,6 @@ subquery_planner(PlannerGlobal *glob, Query *parse,
/* exclRelTlist contains only Vars, so no preprocessing needed */
}
foreach(l, parse->mergeActionList)
{
MergeAction *action = (MergeAction *) lfirst(l);
action->targetList = (List *)
preprocess_expression(root,
(Node *) action->targetList,
EXPRKIND_TARGET);
action->qual =
preprocess_expression(root,
(Node *) action->qual,
EXPRKIND_QUAL);
}
parse->mergeSourceTargetList = (List *)
preprocess_expression(root, (Node *) parse->mergeSourceTargetList,
EXPRKIND_TARGET);
root->append_rel_list = (List *)
preprocess_expression(root, (Node *) root->append_rel_list,
EXPRKIND_APPINFO);
@ -1553,7 +1535,6 @@ inheritance_planner(PlannerInfo *root)
subroot->parse->returningList);
Assert(!parse->onConflict);
Assert(parse->mergeActionList == NIL);
}
/* Result path must go into outer query's FINAL upperrel */
@ -1612,15 +1593,12 @@ inheritance_planner(PlannerInfo *root)
partitioned_rels,
partColsUpdated,
resultRelations,
0,
subpaths,
subroots,
withCheckOptionLists,
returningLists,
rowMarks,
NULL,
NULL,
NULL,
SS_assign_special_param(root)));
}
@ -2151,8 +2129,8 @@ grouping_planner(PlannerInfo *root, bool inheritance_update,
}
/*
* If this is an INSERT/UPDATE/DELETE/MERGE, and we're not being
* called from inheritance_planner, add the ModifyTable node.
* If this is an INSERT/UPDATE/DELETE, and we're not being called from
* inheritance_planner, add the ModifyTable node.
*/
if (parse->commandType != CMD_SELECT && !inheritance_update)
{
@ -2192,15 +2170,12 @@ grouping_planner(PlannerInfo *root, bool inheritance_update,
NIL,
false,
list_make1_int(parse->resultRelation),
parse->mergeTarget_relation,
list_make1(path),
list_make1(root),
withCheckOptionLists,
returningLists,
rowMarks,
parse->onConflict,
parse->mergeSourceTargetList,
parse->mergeActionList,
SS_assign_special_param(root));
}