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/include/nodes/execnodes.h | |
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/include/nodes/execnodes.h')
-rw-r--r-- | src/include/nodes/execnodes.h | 65 |
1 files changed, 1 insertions, 64 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index c53e1132697..9fe0b790956 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -363,17 +363,8 @@ typedef struct JunkFilter AttrNumber *jf_cleanMap; TupleTableSlot *jf_resultSlot; AttrNumber jf_junkAttNo; - AttrNumber jf_otherJunkAttNo; } JunkFilter; -typedef struct MergeState -{ - /* List of MERGE MATCHED action states */ - List *matchedActionStates; - /* List of MERGE NOT MATCHED action states */ - List *notMatchedActionStates; -} MergeState; - /* * OnConflictSetState * @@ -470,38 +461,8 @@ typedef struct ResultRelInfo /* true if ready for tuple routing */ bool ri_PartitionReadyForRouting; - - int ri_PartitionLeafIndex; - /* for running MERGE on this result relation */ - MergeState *ri_mergeState; - - /* - * While executing MERGE, the target relation is processed twice; once - * as a target relation and once to run a join between the target and the - * source. We generate two different RTEs for these two purposes, one with - * rte->inh set to false and other with rte->inh set to true. - * - * Since the plan re-evaluated by EvalPlanQual uses the join RTE, we must - * install the updated tuple in the scan corresponding to that RTE. The - * following member tracks the index of the second RTE for EvalPlanQual - * purposes. ri_mergeTargetRTI is non-zero only when MERGE is in-progress. - * We use ri_mergeTargetRTI to run EvalPlanQual for MERGE and - * ri_RangeTableIndex elsewhere. - */ - Index ri_mergeTargetRTI; } ResultRelInfo; -/* - * Get the Range table index for EvalPlanQual. - * - * We use the ri_mergeTargetRTI if set, otherwise use ri_RangeTableIndex. - * ri_mergeTargetRTI should really be ever set iff we're running MERGE. - */ -#define GetEPQRangeTableIndex(r) \ - (((r)->ri_mergeTargetRTI > 0) \ - ? (r)->ri_mergeTargetRTI \ - : (r)->ri_RangeTableIndex) - /* ---------------- * EState information * @@ -1019,11 +980,6 @@ typedef struct PlanState if (((PlanState *)(node))->instrument) \ ((PlanState *)(node))->instrument->nfiltered2 += (delta); \ } while(0) -#define InstrCountFiltered3(node, delta) \ - do { \ - if (((PlanState *)(node))->instrument) \ - ((PlanState *)(node))->instrument->nfiltered3 += (delta); \ - } while(0) /* * EPQState is state for executing an EvalPlanQual recheck on a candidate @@ -1071,27 +1027,13 @@ typedef struct ProjectSetState } ProjectSetState; /* ---------------- - * MergeActionState information - * ---------------- - */ -typedef struct MergeActionState -{ - NodeTag type; - bool matched; /* true=MATCHED, false=NOT MATCHED */ - ExprState *whenqual; /* WHEN AND conditions */ - CmdType commandType; /* INSERT/UPDATE/DELETE/DO NOTHING */ - ProjectionInfo *proj; /* tuple projection info */ - TupleDesc tupDesc; /* tuple descriptor for projection */ -} MergeActionState; - -/* ---------------- * ModifyTableState information * ---------------- */ typedef struct ModifyTableState { PlanState ps; /* its first field is NodeTag */ - CmdType operation; /* INSERT, UPDATE, DELETE or MERGE */ + CmdType operation; /* INSERT, UPDATE, or DELETE */ bool canSetTag; /* do we set the command tag/es_processed? */ bool mt_done; /* are we done? */ PlanState **mt_plans; /* subplans (one per target rel) */ @@ -1107,8 +1049,6 @@ typedef struct ModifyTableState List *mt_excludedtlist; /* the excluded pseudo relation's tlist */ TupleTableSlot *mt_conflproj; /* CONFLICT ... SET ... projection target */ - TupleTableSlot *mt_mergeproj; /* MERGE action projection target */ - /* Tuple-routing support info */ struct PartitionTupleRouting *mt_partition_tuple_routing; @@ -1120,9 +1060,6 @@ typedef struct ModifyTableState /* Per plan map for tuple conversion from child to root */ TupleConversionMap **mt_per_subplan_tupconv_maps; - - /* Flags showing which subcommands are present INS/UPD/DEL/DO NOTHING */ - int mt_merge_subcommands; } ModifyTableState; /* ---------------- |