aboutsummaryrefslogtreecommitdiff
path: root/src/include/nodes/execnodes.h
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2018-04-02 21:34:15 +0100
committerSimon Riggs <simon@2ndQuadrant.com>2018-04-02 21:34:15 +0100
commit7cf8a5c302735d193dcf901b87e03e324903c632 (patch)
tree0f9815ae865d08f20e7037c148c3078fad0138e7 /src/include/nodes/execnodes.h
parent354f13855e6381d288dfaa52bcd4f2cb0fd4a5eb (diff)
downloadpostgresql-7cf8a5c302735d193dcf901b87e03e324903c632.tar.gz
postgresql-7cf8a5c302735d193dcf901b87e03e324903c632.zip
Revert "Modified files for MERGE"
This reverts commit 354f13855e6381d288dfaa52bcd4f2cb0fd4a5eb.
Diffstat (limited to 'src/include/nodes/execnodes.h')
-rw-r--r--src/include/nodes/execnodes.h65
1 files changed, 1 insertions, 64 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index ff63d179b2a..6070a42b6fe 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -360,17 +360,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
*
@@ -461,38 +452,8 @@ typedef struct ResultRelInfo
/* relation descriptor for root partitioned table */
Relation ri_PartitionRoot;
-
- 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
*
@@ -1005,11 +966,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
@@ -1057,27 +1013,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) */
@@ -1093,8 +1035,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;
@@ -1106,9 +1046,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;
/* ----------------