]> granicus.if.org Git - postgresql/blobdiff - src/backend/nodes/readfuncs.c
Improve parse representation for MERGE
[postgresql] / src / backend / nodes / readfuncs.c
index b1f9e3e41ecf66fa77407ab8c47c5f16566746d7..37e35685956729c3bfb70e78c60c909e54d0c710 100644 (file)
@@ -3,7 +3,7 @@
  * readfuncs.c
  *       Reader functions for Postgres tree nodes.
  *
- * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  *
@@ -33,6 +33,7 @@
 #include "nodes/parsenodes.h"
 #include "nodes/plannodes.h"
 #include "nodes/readfuncs.h"
+#include "utils/builtins.h"
 
 
 /*
        token = pg_strtok(&length);             /* get field value */ \
        local_node->fldname = atoui(token)
 
-/* Read an long integer field (anything written as ":fldname %ld") */
+/* Read an unsigned integer field (anything written using UINT64_FORMAT) */
+#define READ_UINT64_FIELD(fldname) \
+       token = pg_strtok(&length);             /* skip :fldname */ \
+       token = pg_strtok(&length);             /* get field value */ \
+       local_node->fldname = pg_strtouint64(token, NULL, 10)
+
+/* Read a long integer field (anything written as ":fldname %ld") */
 #define READ_LONG_FIELD(fldname) \
        token = pg_strtok(&length);             /* skip :fldname */ \
        token = pg_strtok(&length);             /* get field value */ \
@@ -86,7 +93,8 @@
 #define READ_CHAR_FIELD(fldname) \
        token = pg_strtok(&length);             /* skip :fldname */ \
        token = pg_strtok(&length);             /* get field value */ \
-       local_node->fldname = token[0]
+       /* avoid overhead of calling debackslash() for one char */ \
+       local_node->fldname = (length == 0) ? '\0' : (token[0] == '\\' ? token[1] : token[0])
 
 /* Read an enumerated-type field that was written as an integer code */
 #define READ_ENUM_FIELD(fldname, enumtype) \
  */
 #define atoui(x)  ((unsigned int) strtoul((x), NULL, 10))
 
-#define atooid(x)  ((Oid) strtoul((x), NULL, 10))
-
 #define strtobool(x)  ((*(x) == 't') ? true : false)
 
 #define nullable_string(token,length)  \
@@ -232,12 +238,13 @@ _readQuery(void)
 
        READ_ENUM_FIELD(commandType, CmdType);
        READ_ENUM_FIELD(querySource, QuerySource);
-       local_node->queryId = 0;        /* not saved in output format */
+       local_node->queryId = UINT64CONST(0);   /* not saved in output format */
        READ_BOOL_FIELD(canSetTag);
        READ_NODE_FIELD(utilityStmt);
        READ_INT_FIELD(resultRelation);
        READ_BOOL_FIELD(hasAggs);
        READ_BOOL_FIELD(hasWindowFuncs);
+       READ_BOOL_FIELD(hasTargetSRFs);
        READ_BOOL_FIELD(hasSubLinks);
        READ_BOOL_FIELD(hasDistinctOn);
        READ_BOOL_FIELD(hasRecursive);
@@ -248,6 +255,7 @@ _readQuery(void)
        READ_NODE_FIELD(rtable);
        READ_NODE_FIELD(jointree);
        READ_NODE_FIELD(targetList);
+       READ_ENUM_FIELD(override, OverridingKind);
        READ_NODE_FIELD(onConflict);
        READ_NODE_FIELD(returningList);
        READ_NODE_FIELD(groupClause);
@@ -261,6 +269,12 @@ _readQuery(void)
        READ_NODE_FIELD(rowMarks);
        READ_NODE_FIELD(setOperations);
        READ_NODE_FIELD(constraintDeps);
+       /* withCheckOptions intentionally omitted, see comment in parsenodes.h */
+       READ_INT_FIELD(mergeTarget_relation);
+       READ_NODE_FIELD(mergeSourceTargetList);
+       READ_NODE_FIELD(mergeActionList);
+       READ_LOCATION_FIELD(stmt_location);
+       READ_LOCATION_FIELD(stmt_len);
 
        READ_DONE();
 }
@@ -358,6 +372,11 @@ _readWindowClause(void)
        READ_INT_FIELD(frameOptions);
        READ_NODE_FIELD(startOffset);
        READ_NODE_FIELD(endOffset);
+       READ_OID_FIELD(startInRangeFunc);
+       READ_OID_FIELD(endInRangeFunc);
+       READ_OID_FIELD(inRangeColl);
+       READ_BOOL_FIELD(inRangeAsc);
+       READ_BOOL_FIELD(inRangeNullsFirst);
        READ_UINT_FIELD(winref);
        READ_BOOL_FIELD(copiedOrder);
 
@@ -443,12 +462,11 @@ _readRangeVar(void)
 {
        READ_LOCALS(RangeVar);
 
-       local_node->catalogname = NULL;         /* not currently saved in output
-                                                                                * format */
+       local_node->catalogname = NULL; /* not currently saved in output format */
 
        READ_STRING_FIELD(schemaname);
        READ_STRING_FIELD(relname);
-       READ_ENUM_FIELD(inhOpt, InhOption);
+       READ_BOOL_FIELD(inh);
        READ_CHAR_FIELD(relpersistence);
        READ_NODE_FIELD(alias);
        READ_LOCATION_FIELD(location);
@@ -456,6 +474,31 @@ _readRangeVar(void)
        READ_DONE();
 }
 
+/*
+ * _readTableFunc
+ */
+static TableFunc *
+_readTableFunc(void)
+{
+       READ_LOCALS(TableFunc);
+
+       READ_NODE_FIELD(ns_uris);
+       READ_NODE_FIELD(ns_names);
+       READ_NODE_FIELD(docexpr);
+       READ_NODE_FIELD(rowexpr);
+       READ_NODE_FIELD(colnames);
+       READ_NODE_FIELD(coltypes);
+       READ_NODE_FIELD(coltypmods);
+       READ_NODE_FIELD(colcollations);
+       READ_NODE_FIELD(colexprs);
+       READ_NODE_FIELD(coldefexprs);
+       READ_BITMAPSET_FIELD(notnulls);
+       READ_INT_FIELD(ordinalitycol);
+       READ_LOCATION_FIELD(location);
+
+       READ_DONE();
+}
+
 static IntoClause *
 _readIntoClause(void)
 {
@@ -511,7 +554,7 @@ _readConst(void)
 
        token = pg_strtok(&length); /* skip :constvalue */
        if (local_node->constisnull)
-               token = pg_strtok(&length);             /* skip "<>" */
+               token = pg_strtok(&length); /* skip "<>" */
        else
                local_node->constvalue = readDatum(local_node->constbyval);
 
@@ -546,7 +589,6 @@ _readAggref(void)
 
        READ_OID_FIELD(aggfnoid);
        READ_OID_FIELD(aggtype);
-       READ_OID_FIELD(aggoutputtype);
        READ_OID_FIELD(aggcollid);
        READ_OID_FIELD(inputcollid);
        READ_OID_FIELD(aggtranstype);
@@ -558,10 +600,9 @@ _readAggref(void)
        READ_NODE_FIELD(aggfilter);
        READ_BOOL_FIELD(aggstar);
        READ_BOOL_FIELD(aggvariadic);
-       READ_BOOL_FIELD(aggcombine);
-       READ_BOOL_FIELD(aggpartial);
        READ_CHAR_FIELD(aggkind);
        READ_UINT_FIELD(agglevelsup);
+       READ_ENUM_FIELD(aggsplit, AggSplit);
        READ_LOCATION_FIELD(location);
 
        READ_DONE();
@@ -866,11 +907,10 @@ _readArrayCoerceExpr(void)
        READ_LOCALS(ArrayCoerceExpr);
 
        READ_NODE_FIELD(arg);
-       READ_OID_FIELD(elemfuncid);
+       READ_NODE_FIELD(elemexpr);
        READ_OID_FIELD(resulttype);
        READ_INT_FIELD(resulttypmod);
        READ_OID_FIELD(resultcollid);
-       READ_BOOL_FIELD(isExplicit);
        READ_ENUM_FIELD(coerceformat, CoercionForm);
        READ_LOCATION_FIELD(location);
 
@@ -1043,6 +1083,22 @@ _readMinMaxExpr(void)
        READ_DONE();
 }
 
+/*
+ * _readSQLValueFunction
+ */
+static SQLValueFunction *
+_readSQLValueFunction(void)
+{
+       READ_LOCALS(SQLValueFunction);
+
+       READ_ENUM_FIELD(op, SQLValueFunctionOp);
+       READ_OID_FIELD(type);
+       READ_INT_FIELD(typmod);
+       READ_LOCATION_FIELD(location);
+
+       READ_DONE();
+}
+
 /*
  * _readXmlExpr
  */
@@ -1160,6 +1216,20 @@ _readCurrentOfExpr(void)
        READ_DONE();
 }
 
+/*
+ * _readNextValueExpr
+ */
+static NextValueExpr *
+_readNextValueExpr(void)
+{
+       READ_LOCALS(NextValueExpr);
+
+       READ_OID_FIELD(seqid);
+       READ_OID_FIELD(typeId);
+
+       READ_DONE();
+}
+
 /*
  * _readInferenceElem
  */
@@ -1261,6 +1331,22 @@ _readOnConflictExpr(void)
        READ_DONE();
 }
 
+/*
+ * _readMergeAction
+ */
+static MergeAction *
+_readMergeAction(void)
+{
+       READ_LOCALS(MergeAction);
+
+       READ_BOOL_FIELD(matched);
+       READ_ENUM_FIELD(commandType, CmdType);
+       READ_NODE_FIELD(qual);
+       READ_NODE_FIELD(targetList);
+
+       READ_DONE();
+}
+
 /*
  *     Stuff from parsenodes.h.
  */
@@ -1297,17 +1383,30 @@ _readRangeTblEntry(void)
                        READ_NODE_FIELD(functions);
                        READ_BOOL_FIELD(funcordinality);
                        break;
+               case RTE_TABLEFUNC:
+                       READ_NODE_FIELD(tablefunc);
+                       break;
                case RTE_VALUES:
                        READ_NODE_FIELD(values_lists);
-                       READ_NODE_FIELD(values_collations);
+                       READ_NODE_FIELD(coltypes);
+                       READ_NODE_FIELD(coltypmods);
+                       READ_NODE_FIELD(colcollations);
                        break;
                case RTE_CTE:
                        READ_STRING_FIELD(ctename);
                        READ_UINT_FIELD(ctelevelsup);
                        READ_BOOL_FIELD(self_reference);
-                       READ_NODE_FIELD(ctecoltypes);
-                       READ_NODE_FIELD(ctecoltypmods);
-                       READ_NODE_FIELD(ctecolcollations);
+                       READ_NODE_FIELD(coltypes);
+                       READ_NODE_FIELD(coltypmods);
+                       READ_NODE_FIELD(colcollations);
+                       break;
+               case RTE_NAMEDTUPLESTORE:
+                       READ_STRING_FIELD(enrname);
+                       READ_FLOAT_FIELD(enrtuples);
+                       READ_OID_FIELD(relid);
+                       READ_NODE_FIELD(coltypes);
+                       READ_NODE_FIELD(coltypmods);
+                       READ_NODE_FIELD(colcollations);
                        break;
                default:
                        elog(ERROR, "unrecognized RTE kind: %d",
@@ -1374,6 +1473,7 @@ _readDefElem(void)
        READ_STRING_FIELD(defname);
        READ_NODE_FIELD(arg);
        READ_ENUM_FIELD(defaction, DefElemAction);
+       READ_LOCATION_FIELD(location);
 
        READ_DONE();
 }
@@ -1387,24 +1487,28 @@ _readPlannedStmt(void)
        READ_LOCALS(PlannedStmt);
 
        READ_ENUM_FIELD(commandType, CmdType);
-       READ_UINT_FIELD(queryId);
+       READ_UINT64_FIELD(queryId);
        READ_BOOL_FIELD(hasReturning);
        READ_BOOL_FIELD(hasModifyingCTE);
        READ_BOOL_FIELD(canSetTag);
        READ_BOOL_FIELD(transientPlan);
+       READ_BOOL_FIELD(dependsOnRole);
+       READ_BOOL_FIELD(parallelModeNeeded);
+       READ_BOOL_FIELD(jitFlags);
        READ_NODE_FIELD(planTree);
        READ_NODE_FIELD(rtable);
        READ_NODE_FIELD(resultRelations);
-       READ_NODE_FIELD(utilityStmt);
+       READ_NODE_FIELD(nonleafResultRelations);
+       READ_NODE_FIELD(rootResultRelations);
        READ_NODE_FIELD(subplans);
        READ_BITMAPSET_FIELD(rewindPlanIDs);
        READ_NODE_FIELD(rowMarks);
        READ_NODE_FIELD(relationOids);
        READ_NODE_FIELD(invalItems);
-       READ_INT_FIELD(nParamExec);
-       READ_BOOL_FIELD(hasRowSecurity);
-       READ_BOOL_FIELD(parallelModeNeeded);
-       READ_BOOL_FIELD(hasForeignJoin);
+       READ_NODE_FIELD(paramExecTypes);
+       READ_NODE_FIELD(utilityStmt);
+       READ_LOCATION_FIELD(stmt_location);
+       READ_LOCATION_FIELD(stmt_len);
 
        READ_DONE();
 }
@@ -1423,6 +1527,7 @@ ReadCommonPlan(Plan *local_node)
        READ_FLOAT_FIELD(plan_rows);
        READ_INT_FIELD(plan_width);
        READ_BOOL_FIELD(parallel_aware);
+       READ_BOOL_FIELD(parallel_safe);
        READ_INT_FIELD(plan_node_id);
        READ_NODE_FIELD(targetlist);
        READ_NODE_FIELD(qual);
@@ -1461,6 +1566,19 @@ _readResult(void)
        READ_DONE();
 }
 
+/*
+ * _readProjectSet
+ */
+static ProjectSet *
+_readProjectSet(void)
+{
+       READ_LOCALS_NO_FIELDS(ProjectSet);
+
+       ReadCommonPlan(&local_node->plan);
+
+       READ_DONE();
+}
+
 /*
  * _readModifyTable
  */
@@ -1474,8 +1592,12 @@ _readModifyTable(void)
        READ_ENUM_FIELD(operation, CmdType);
        READ_BOOL_FIELD(canSetTag);
        READ_UINT_FIELD(nominalRelation);
+       READ_NODE_FIELD(partitioned_rels);
+       READ_BOOL_FIELD(partColsUpdated);
        READ_NODE_FIELD(resultRelations);
+       READ_INT_FIELD(mergeTargetRelation);
        READ_INT_FIELD(resultRelIndex);
+       READ_INT_FIELD(rootResultRelIndex);
        READ_NODE_FIELD(plans);
        READ_NODE_FIELD(withCheckOptionLists);
        READ_NODE_FIELD(returningLists);
@@ -1489,6 +1611,27 @@ _readModifyTable(void)
        READ_NODE_FIELD(onConflictWhere);
        READ_UINT_FIELD(exclRelRTI);
        READ_NODE_FIELD(exclRelTlist);
+       READ_NODE_FIELD(mergeSourceTargetList);
+       READ_NODE_FIELD(mergeActionList);
+
+       READ_DONE();
+}
+
+/*
+ * _readMergeWhenClause
+ */
+static MergeWhenClause *
+_readMergeWhenClause(void)
+{
+       READ_LOCALS(MergeWhenClause);
+
+       READ_BOOL_FIELD(matched);
+       READ_ENUM_FIELD(commandType, CmdType);
+       READ_NODE_FIELD(condition);
+       READ_NODE_FIELD(targetList);
+       READ_NODE_FIELD(cols);
+       READ_NODE_FIELD(values);
+       READ_ENUM_FIELD(override, OverridingKind);
 
        READ_DONE();
 }
@@ -1503,7 +1646,9 @@ _readAppend(void)
 
        ReadCommonPlan(&local_node->plan);
 
+       READ_NODE_FIELD(partitioned_rels);
        READ_NODE_FIELD(appendplans);
+       READ_INT_FIELD(first_partial_plan);
 
        READ_DONE();
 }
@@ -1518,6 +1663,7 @@ _readMergeAppend(void)
 
        ReadCommonPlan(&local_node->plan);
 
+       READ_NODE_FIELD(partitioned_rels);
        READ_NODE_FIELD(mergeplans);
        READ_INT_FIELD(numCols);
        READ_ATTRNUMBER_ARRAY(sortColIdx, local_node->numCols);
@@ -1572,6 +1718,7 @@ _readBitmapOr(void)
 
        ReadCommonPlan(&local_node->plan);
 
+       READ_BOOL_FIELD(isshared);
        READ_NODE_FIELD(bitmapplans);
 
        READ_DONE();
@@ -1683,6 +1830,7 @@ _readBitmapIndexScan(void)
        ReadCommonScan(&local_node->scan);
 
        READ_OID_FIELD(indexid);
+       READ_BOOL_FIELD(isshared);
        READ_NODE_FIELD(indexqual);
        READ_NODE_FIELD(indexqualorig);
 
@@ -1765,6 +1913,21 @@ _readValuesScan(void)
        READ_DONE();
 }
 
+/*
+ * _readTableFuncScan
+ */
+static TableFuncScan *
+_readTableFuncScan(void)
+{
+       READ_LOCALS(TableFuncScan);
+
+       ReadCommonScan(&local_node->scan);
+
+       READ_NODE_FIELD(tablefunc);
+
+       READ_DONE();
+}
+
 /*
  * _readCteScan
  */
@@ -1859,6 +2022,7 @@ ReadCommonJoin(Join *local_node)
        ReadCommonPlan(&local_node->plan);
 
        READ_ENUM_FIELD(jointype, JoinType);
+       READ_BOOL_FIELD(inner_unique);
        READ_NODE_FIELD(joinqual);
 }
 
@@ -1902,6 +2066,7 @@ _readMergeJoin(void)
 
        ReadCommonJoin(&local_node->join);
 
+       READ_BOOL_FIELD(skip_mark_restore);
        READ_NODE_FIELD(mergeclauses);
 
        numCols = list_length(local_node->mergeclauses);
@@ -1989,13 +2154,12 @@ _readAgg(void)
        ReadCommonPlan(&local_node->plan);
 
        READ_ENUM_FIELD(aggstrategy, AggStrategy);
-       READ_BOOL_FIELD(combineStates);
-       READ_BOOL_FIELD(finalizeAggs);
-       READ_BOOL_FIELD(serialStates);
+       READ_ENUM_FIELD(aggsplit, AggSplit);
        READ_INT_FIELD(numCols);
        READ_ATTRNUMBER_ARRAY(grpColIdx, local_node->numCols);
        READ_OID_ARRAY(grpOperators, local_node->numCols);
        READ_LONG_FIELD(numGroups);
+       READ_BITMAPSET_FIELD(aggParams);
        READ_NODE_FIELD(groupingSets);
        READ_NODE_FIELD(chain);
 
@@ -2022,6 +2186,11 @@ _readWindowAgg(void)
        READ_INT_FIELD(frameOptions);
        READ_NODE_FIELD(startOffset);
        READ_NODE_FIELD(endOffset);
+       READ_OID_FIELD(startInRangeFunc);
+       READ_OID_FIELD(endInRangeFunc);
+       READ_OID_FIELD(inRangeColl);
+       READ_BOOL_FIELD(inRangeAsc);
+       READ_BOOL_FIELD(inRangeNullsFirst);
 
        READ_DONE();
 }
@@ -2054,8 +2223,32 @@ _readGather(void)
        ReadCommonPlan(&local_node->plan);
 
        READ_INT_FIELD(num_workers);
+       READ_INT_FIELD(rescan_param);
        READ_BOOL_FIELD(single_copy);
        READ_BOOL_FIELD(invisible);
+       READ_BITMAPSET_FIELD(initParam);
+
+       READ_DONE();
+}
+
+/*
+ * _readGatherMerge
+ */
+static GatherMerge *
+_readGatherMerge(void)
+{
+       READ_LOCALS(GatherMerge);
+
+       ReadCommonPlan(&local_node->plan);
+
+       READ_INT_FIELD(num_workers);
+       READ_INT_FIELD(rescan_param);
+       READ_INT_FIELD(numCols);
+       READ_ATTRNUMBER_ARRAY(sortColIdx, local_node->numCols);
+       READ_OID_ARRAY(sortOperators, local_node->numCols);
+       READ_OID_ARRAY(collations, local_node->numCols);
+       READ_BOOL_ARRAY(nullsFirst, local_node->numCols);
+       READ_BITMAPSET_FIELD(initParam);
 
        READ_DONE();
 }
@@ -2073,8 +2266,7 @@ _readHash(void)
        READ_OID_FIELD(skewTable);
        READ_INT_FIELD(skewColumn);
        READ_BOOL_FIELD(skewInherit);
-       READ_OID_FIELD(skewColType);
-       READ_INT_FIELD(skewColTypmod);
+       READ_FLOAT_FIELD(rows_total);
 
        READ_DONE();
 }
@@ -2199,6 +2391,7 @@ _readSubPlan(void)
        READ_OID_FIELD(firstColCollation);
        READ_BOOL_FIELD(useHashTable);
        READ_BOOL_FIELD(unknownEqFalse);
+       READ_BOOL_FIELD(parallel_safe);
        READ_NODE_FIELD(setParam);
        READ_NODE_FIELD(parParam);
        READ_NODE_FIELD(args);
@@ -2233,7 +2426,7 @@ _readExtensibleNode(void)
 
        READ_TEMP_LOCALS();
 
-       token = pg_strtok(&length); /* skipextnodename */
+       token = pg_strtok(&length); /* skip :extnodename */
        token = pg_strtok(&length); /* get extnodename */
 
        extnodename = nullable_string(token, length);
@@ -2251,6 +2444,41 @@ _readExtensibleNode(void)
        READ_DONE();
 }
 
+/*
+ * _readPartitionBoundSpec
+ */
+static PartitionBoundSpec *
+_readPartitionBoundSpec(void)
+{
+       READ_LOCALS(PartitionBoundSpec);
+
+       READ_CHAR_FIELD(strategy);
+       READ_BOOL_FIELD(is_default);
+       READ_INT_FIELD(modulus);
+       READ_INT_FIELD(remainder);
+       READ_NODE_FIELD(listdatums);
+       READ_NODE_FIELD(lowerdatums);
+       READ_NODE_FIELD(upperdatums);
+       READ_LOCATION_FIELD(location);
+
+       READ_DONE();
+}
+
+/*
+ * _readPartitionRangeDatum
+ */
+static PartitionRangeDatum *
+_readPartitionRangeDatum(void)
+{
+       READ_LOCALS(PartitionRangeDatum);
+
+       READ_ENUM_FIELD(kind, PartitionRangeDatumKind);
+       READ_NODE_FIELD(value);
+       READ_LOCATION_FIELD(location);
+
+       READ_DONE();
+}
+
 /*
  * parseNodeString
  *
@@ -2293,6 +2521,8 @@ parseNodeString(void)
                return_value = _readRangeVar();
        else if (MATCH("INTOCLAUSE", 10))
                return_value = _readIntoClause();
+       else if (MATCH("TABLEFUNC", 9))
+               return_value = _readTableFunc();
        else if (MATCH("VAR", 3))
                return_value = _readVar();
        else if (MATCH("CONST", 5))
@@ -2353,6 +2583,8 @@ parseNodeString(void)
                return_value = _readCoalesceExpr();
        else if (MATCH("MINMAX", 6))
                return_value = _readMinMaxExpr();
+       else if (MATCH("SQLVALUEFUNCTION", 16))
+               return_value = _readSQLValueFunction();
        else if (MATCH("XMLEXPR", 7))
                return_value = _readXmlExpr();
        else if (MATCH("NULLTEST", 8))
@@ -2367,6 +2599,8 @@ parseNodeString(void)
                return_value = _readSetToDefault();
        else if (MATCH("CURRENTOFEXPR", 13))
                return_value = _readCurrentOfExpr();
+       else if (MATCH("NEXTVALUEEXPR", 13))
+               return_value = _readNextValueExpr();
        else if (MATCH("INFERENCEELEM", 13))
                return_value = _readInferenceElem();
        else if (MATCH("TARGETENTRY", 11))
@@ -2379,6 +2613,8 @@ parseNodeString(void)
                return_value = _readFromExpr();
        else if (MATCH("ONCONFLICTEXPR", 14))
                return_value = _readOnConflictExpr();
+       else if (MATCH("MERGEACTION", 11))
+               return_value = _readMergeAction();
        else if (MATCH("RTE", 3))
                return_value = _readRangeTblEntry();
        else if (MATCH("RANGETBLFUNCTION", 16))
@@ -2397,8 +2633,12 @@ parseNodeString(void)
                return_value = _readPlan();
        else if (MATCH("RESULT", 6))
                return_value = _readResult();
+       else if (MATCH("PROJECTSET", 10))
+               return_value = _readProjectSet();
        else if (MATCH("MODIFYTABLE", 11))
                return_value = _readModifyTable();
+       else if (MATCH("MERGEWHENCLAUSE", 15))
+               return_value = _readMergeWhenClause();
        else if (MATCH("APPEND", 6))
                return_value = _readAppend();
        else if (MATCH("MERGEAPPEND", 11))
@@ -2431,6 +2671,8 @@ parseNodeString(void)
                return_value = _readFunctionScan();
        else if (MATCH("VALUESSCAN", 10))
                return_value = _readValuesScan();
+       else if (MATCH("TABLEFUNCSCAN", 13))
+               return_value = _readTableFuncScan();
        else if (MATCH("CTESCAN", 7))
                return_value = _readCteScan();
        else if (MATCH("WORKTABLESCAN", 13))
@@ -2461,6 +2703,8 @@ parseNodeString(void)
                return_value = _readUnique();
        else if (MATCH("GATHER", 6))
                return_value = _readGather();
+       else if (MATCH("GATHERMERGE", 11))
+               return_value = _readGatherMerge();
        else if (MATCH("HASH", 4))
                return_value = _readHash();
        else if (MATCH("SETOP", 5))
@@ -2481,6 +2725,10 @@ parseNodeString(void)
                return_value = _readAlternativeSubPlan();
        else if (MATCH("EXTENSIBLENODE", 14))
                return_value = _readExtensibleNode();
+       else if (MATCH("PARTITIONBOUNDSPEC", 18))
+               return_value = _readPartitionBoundSpec();
+       else if (MATCH("PARTITIONRANGEDATUM", 19))
+               return_value = _readPartitionRangeDatum();
        else
        {
                elog(ERROR, "badly formatted node string \"%.32s\"...", token);