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/executor | |
parent | c9c875a28fa6cbc38c227fb9e656dd7be948166f (diff) | |
download | postgresql-08ea7a2291db21a618d19d612c8060cda68f1892.tar.gz postgresql-08ea7a2291db21a618d19d612c8060cda68f1892.zip |
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/executor')
-rw-r--r-- | src/include/executor/execMerge.h | 31 | ||||
-rw-r--r-- | src/include/executor/execPartition.h | 1 | ||||
-rw-r--r-- | src/include/executor/instrument.h | 7 | ||||
-rw-r--r-- | src/include/executor/nodeModifyTable.h | 23 | ||||
-rw-r--r-- | src/include/executor/spi.h | 1 |
5 files changed, 2 insertions, 61 deletions
diff --git a/src/include/executor/execMerge.h b/src/include/executor/execMerge.h deleted file mode 100644 index 5ea8c4e50a8..00000000000 --- a/src/include/executor/execMerge.h +++ /dev/null @@ -1,31 +0,0 @@ -/*------------------------------------------------------------------------- - * - * execMerge.h - * - * - * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group - * Portions Copyright (c) 1994, Regents of the University of California - * - * src/include/executor/execMerge.h - * - *------------------------------------------------------------------------- - */ -#ifndef EXECMERGE_H -#define EXECMERGE_H - -#include "nodes/execnodes.h" - -/* flags for mt_merge_subcommands */ -#define MERGE_INSERT 0x01 -#define MERGE_UPDATE 0x02 -#define MERGE_DELETE 0x04 - -extern void ExecMerge(ModifyTableState *mtstate, EState *estate, - TupleTableSlot *slot, JunkFilter *junkfilter, - ResultRelInfo *resultRelInfo); - -extern void ExecInitMerge(ModifyTableState *mtstate, - EState *estate, - ResultRelInfo *resultRelInfo); - -#endif /* NODEMERGE_H */ diff --git a/src/include/executor/execPartition.h b/src/include/executor/execPartition.h index b2daf24c41d..0c36c8be30c 100644 --- a/src/include/executor/execPartition.h +++ b/src/include/executor/execPartition.h @@ -186,7 +186,6 @@ extern int ExecFindPartition(ResultRelInfo *resultRelInfo, PartitionDispatch *pd, TupleTableSlot *slot, EState *estate); -extern int ExecFindPartitionByOid(PartitionTupleRouting *proute, Oid partoid); extern ResultRelInfo *ExecInitPartitionInfo(ModifyTableState *mtstate, ResultRelInfo *resultRelInfo, PartitionTupleRouting *proute, diff --git a/src/include/executor/instrument.h b/src/include/executor/instrument.h index 1bc7a88dbd6..6e3c71759b8 100644 --- a/src/include/executor/instrument.h +++ b/src/include/executor/instrument.h @@ -59,11 +59,8 @@ typedef struct Instrumentation double ntuples; /* Total tuples produced */ double ntuples2; /* Secondary node-specific tuple counter */ double nloops; /* # of run cycles for this node */ - double nfiltered1; /* # tuples removed by scanqual or joinqual OR - * # tuples inserted by MERGE */ - double nfiltered2; /* # tuples removed by "other" quals OR - * # tuples updated by MERGE */ - double nfiltered3; /* # tuples deleted by MERGE */ + double nfiltered1; /* # tuples removed by scanqual or joinqual */ + double nfiltered2; /* # tuples removed by "other" quals */ BufferUsage bufusage; /* Total buffer usage */ } Instrumentation; diff --git a/src/include/executor/nodeModifyTable.h b/src/include/executor/nodeModifyTable.h index 7e9ab3cb6b4..0d7e579e1cb 100644 --- a/src/include/executor/nodeModifyTable.h +++ b/src/include/executor/nodeModifyTable.h @@ -18,28 +18,5 @@ extern ModifyTableState *ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags); extern void ExecEndModifyTable(ModifyTableState *node); extern void ExecReScanModifyTable(ModifyTableState *node); -extern TupleTableSlot *ExecPrepareTupleRouting(ModifyTableState *mtstate, - EState *estate, - struct PartitionTupleRouting *proute, - ResultRelInfo *targetRelInfo, - TupleTableSlot *slot); -extern TupleTableSlot *ExecDelete(ModifyTableState *mtstate, - ItemPointer tupleid, HeapTuple oldtuple, TupleTableSlot *planSlot, - EPQState *epqstate, EState *estate, bool *tupleDeleted, - bool processReturning, HeapUpdateFailureData *hufdp, - MergeActionState *actionState, bool canSetTag, - bool changingPart); -extern TupleTableSlot *ExecUpdate(ModifyTableState *mtstate, - ItemPointer tupleid, HeapTuple oldtuple, TupleTableSlot *slot, - TupleTableSlot *planSlot, EPQState *epqstate, EState *estate, - bool *tuple_updated, HeapUpdateFailureData *hufdp, - MergeActionState *actionState, bool canSetTag); -extern TupleTableSlot *ExecInsert(ModifyTableState *mtstate, - TupleTableSlot *slot, - TupleTableSlot *planSlot, - EState *estate, - MergeActionState *actionState, - bool canSetTag); -extern void ExecCheckPlanOutput(Relation resultRel, List *targetList); #endif /* NODEMODIFYTABLE_H */ diff --git a/src/include/executor/spi.h b/src/include/executor/spi.h index 78410b9f772..e5bdaecc4e3 100644 --- a/src/include/executor/spi.h +++ b/src/include/executor/spi.h @@ -64,7 +64,6 @@ typedef struct _SPI_plan *SPIPlanPtr; #define SPI_OK_REL_REGISTER 15 #define SPI_OK_REL_UNREGISTER 16 #define SPI_OK_TD_REGISTER 17 -#define SPI_OK_MERGE 18 #define SPI_OPT_NONATOMIC (1 << 0) |