diff options
| author | Simon Riggs <simon@2ndQuadrant.com> | 2018-04-12 11:22:56 +0100 |
|---|---|---|
| committer | Simon Riggs <simon@2ndQuadrant.com> | 2018-04-12 11:22:56 +0100 |
| commit | 08ea7a2291db21a618d19d612c8060cda68f1892 (patch) | |
| tree | 4d10675439742c7206e089bd21e793332562ae83 /src/backend/optimizer/prep | |
| parent | c9c875a28fa6cbc38c227fb9e656dd7be948166f (diff) | |
Revert MERGE patch
This reverts commits d204ef63776b8a00ca220adec23979091564e465,
83454e3c2b28141c0db01c7d2027e01040df5249 and a few more commits thereafter
(complete list at the end) related to MERGE feature.
While the feature was fully functional, with sufficient test coverage and
necessary documentation, it was felt that some parts of the executor and
parse-analyzer can use a different design and it wasn't possible to do that in
the available time. So it was decided to revert the patch for PG11 and retry
again in the future.
Thanks again to all reviewers and bug reporters.
List of commits reverted, in reverse chronological order:
f1464c5380 Improve parse representation for MERGE
ddb4158579 MERGE syntax diagram correction
530e69e59b Allow cpluspluscheck to pass by renaming variable
01b88b4df5 MERGE minor errata
3af7b2b0d4 MERGE fix variable warning in non-assert builds
a5d86181ec MERGE INSERT allows only one VALUES clause
4b2d44031f MERGE post-commit review
4923550c20 Tab completion for MERGE
aa3faa3c7a WITH support in MERGE
83454e3c2b New files for MERGE
d204ef6377 MERGE SQL Command following SQL:2016
Author: Pavan Deolasee
Reviewed-by: Michael Paquier
Diffstat (limited to 'src/backend/optimizer/prep')
| -rw-r--r-- | src/backend/optimizer/prep/preptlist.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/backend/optimizer/prep/preptlist.c b/src/backend/optimizer/prep/preptlist.c index 8a87cfd14ae..8603feef2b8 100644 --- a/src/backend/optimizer/prep/preptlist.c +++ b/src/backend/optimizer/prep/preptlist.c @@ -118,46 +118,6 @@ preprocess_targetlist(PlannerInfo *root) tlist = expand_targetlist(tlist, command_type, result_relation, target_relation); - if (command_type == CMD_MERGE) - { - ListCell *l; - - /* - * For MERGE, add any junk column(s) needed to allow the executor to - * identify the rows to be updated or deleted, with different - * handling for partitioned tables. - */ - rewriteTargetListMerge(parse, target_relation); - - /* - * For MERGE command, handle targetlist of each MergeAction separately. - * Give the same treatment to MergeAction->targetList as we would have - * given to a regular INSERT/UPDATE/DELETE. - */ - foreach(l, parse->mergeActionList) - { - MergeAction *action = (MergeAction *) lfirst(l); - - switch (action->commandType) - { - case CMD_INSERT: - case CMD_UPDATE: - action->targetList = expand_targetlist(action->targetList, - action->commandType, - result_relation, - target_relation); - break; - case CMD_DELETE: - break; - case CMD_NOTHING: - break; - default: - elog(ERROR, "unknown action in MERGE WHEN clause"); - - } - } - } - /* * Add necessary junk columns for rowmarked rels. These values are needed * for locking of rels selected FOR UPDATE/SHARE, and to do EvalPlanQual @@ -388,7 +348,6 @@ expand_targetlist(List *tlist, int command_type, true /* byval */ ); } break; - case CMD_MERGE: case CMD_UPDATE: if (!att_tup->attisdropped) { |
