]> granicus.if.org Git - postgresql/blobdiff - src/backend/nodes/copyfuncs.c
Support GROUPING SETS, CUBE and ROLLUP.
[postgresql] / src / backend / nodes / copyfuncs.c
index 868fb7130a8b28cf3e074d7d3903e58366c0c914..fa7d2865c1ec42438b74cfe4bf4125ffd224f441 100644 (file)
@@ -4,14 +4,14 @@
  *       Copy functions for Postgres tree nodes.
  *
  * NOTE: we currently support copying all node types found in parse and
- * plan trees. We do not support copying executor state trees; there
+ * plan trees.  We do not support copying executor state trees; there
  * is no need for that, and no point in maintaining all the code that
  * would be needed.  We also do not support copying Path trees, mainly
  * because the circular linkages between RelOptInfo and Path nodes can't
  * be handled easily in a simple depth-first traversal.
  *
  *
- * Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
@@ -30,7 +30,7 @@
 
 /*
  * Macros to simplify copying of different kinds of fields.  Use these
- * wherever possible to reduce the chance for silly typos.     Note that these
+ * wherever possible to reduce the chance for silly typos.  Note that these
  * hard-wire the convention that the local variables in a Copy routine are
  * named 'newnode' and 'from'.
  */
@@ -78,21 +78,23 @@ _copyPlannedStmt(const PlannedStmt *from)
        PlannedStmt *newnode = makeNode(PlannedStmt);
 
        COPY_SCALAR_FIELD(commandType);
+       COPY_SCALAR_FIELD(queryId);
        COPY_SCALAR_FIELD(hasReturning);
        COPY_SCALAR_FIELD(hasModifyingCTE);
+       COPY_SCALAR_FIELD(isUpsert);
        COPY_SCALAR_FIELD(canSetTag);
        COPY_SCALAR_FIELD(transientPlan);
        COPY_NODE_FIELD(planTree);
        COPY_NODE_FIELD(rtable);
        COPY_NODE_FIELD(resultRelations);
        COPY_NODE_FIELD(utilityStmt);
-       COPY_NODE_FIELD(intoClause);
        COPY_NODE_FIELD(subplans);
        COPY_BITMAPSET_FIELD(rewindPlanIDs);
        COPY_NODE_FIELD(rowMarks);
        COPY_NODE_FIELD(relationOids);
        COPY_NODE_FIELD(invalItems);
        COPY_SCALAR_FIELD(nParamExec);
+       COPY_SCALAR_FIELD(hasRowSecurity);
 
        return newnode;
 }
@@ -175,12 +177,21 @@ _copyModifyTable(const ModifyTable *from)
         */
        COPY_SCALAR_FIELD(operation);
        COPY_SCALAR_FIELD(canSetTag);
+       COPY_SCALAR_FIELD(nominalRelation);
        COPY_NODE_FIELD(resultRelations);
        COPY_SCALAR_FIELD(resultRelIndex);
        COPY_NODE_FIELD(plans);
+       COPY_NODE_FIELD(withCheckOptionLists);
        COPY_NODE_FIELD(returningLists);
+       COPY_NODE_FIELD(fdwPrivLists);
        COPY_NODE_FIELD(rowMarks);
        COPY_SCALAR_FIELD(epqParam);
+       COPY_SCALAR_FIELD(onConflictAction);
+       COPY_NODE_FIELD(arbiterIndexes);
+       COPY_NODE_FIELD(onConflictSet);
+       COPY_NODE_FIELD(onConflictWhere);
+       COPY_SCALAR_FIELD(exclRelRTI);
+       COPY_NODE_FIELD(exclRelTlist);
 
        return newnode;
 }
@@ -381,7 +392,7 @@ _copyIndexScan(const IndexScan *from)
 static IndexOnlyScan *
 _copyIndexOnlyScan(const IndexOnlyScan *from)
 {
-       IndexOnlyScan  *newnode = makeNode(IndexOnlyScan);
+       IndexOnlyScan *newnode = makeNode(IndexOnlyScan);
 
        /*
         * copy node superclass fields
@@ -502,11 +513,8 @@ _copyFunctionScan(const FunctionScan *from)
        /*
         * copy remainder of node
         */
-       COPY_NODE_FIELD(funcexpr);
-       COPY_NODE_FIELD(funccolnames);
-       COPY_NODE_FIELD(funccoltypes);
-       COPY_NODE_FIELD(funccoltypmods);
-       COPY_NODE_FIELD(funccolcollations);
+       COPY_NODE_FIELD(functions);
+       COPY_SCALAR_FIELD(funcordinality);
 
        return newnode;
 }
@@ -591,8 +599,60 @@ _copyForeignScan(const ForeignScan *from)
        /*
         * copy remainder of node
         */
-       COPY_SCALAR_FIELD(fsSystemCol);
+       COPY_SCALAR_FIELD(fs_server);
+       COPY_NODE_FIELD(fdw_exprs);
        COPY_NODE_FIELD(fdw_private);
+       COPY_NODE_FIELD(fdw_scan_tlist);
+       COPY_BITMAPSET_FIELD(fs_relids);
+       COPY_SCALAR_FIELD(fsSystemCol);
+
+       return newnode;
+}
+
+/*
+ * _copyCustomScan
+ */
+static CustomScan *
+_copyCustomScan(const CustomScan *from)
+{
+       CustomScan *newnode = makeNode(CustomScan);
+
+       /*
+        * copy node superclass fields
+        */
+       CopyScanFields((const Scan *) from, (Scan *) newnode);
+
+       /*
+        * copy remainder of node
+        */
+       COPY_SCALAR_FIELD(flags);
+       COPY_NODE_FIELD(custom_exprs);
+       COPY_NODE_FIELD(custom_private);
+       COPY_NODE_FIELD(custom_scan_tlist);
+       COPY_BITMAPSET_FIELD(custom_relids);
+
+       /*
+        * NOTE: The method field of CustomScan is required to be a pointer to a
+        * static table of callback functions.  So we don't copy the table itself,
+        * just reference the original one.
+        */
+       COPY_SCALAR_FIELD(methods);
+
+       return newnode;
+}
+
+/*
+ * _copySampleScan
+ */
+static SampleScan *
+_copySampleScan(const SampleScan *from)
+{
+       SampleScan *newnode = makeNode(SampleScan);
+
+       /*
+        * copy node superclass fields
+        */
+       CopyScanFields((const Scan *) from, (Scan *) newnode);
 
        return newnode;
 }
@@ -671,10 +731,13 @@ _copyMergeJoin(const MergeJoin *from)
         */
        COPY_NODE_FIELD(mergeclauses);
        numCols = list_length(from->mergeclauses);
-       COPY_POINTER_FIELD(mergeFamilies, numCols * sizeof(Oid));
-       COPY_POINTER_FIELD(mergeCollations, numCols * sizeof(Oid));
-       COPY_POINTER_FIELD(mergeStrategies, numCols * sizeof(int));
-       COPY_POINTER_FIELD(mergeNullsFirst, numCols * sizeof(bool));
+       if (numCols > 0)
+       {
+               COPY_POINTER_FIELD(mergeFamilies, numCols * sizeof(Oid));
+               COPY_POINTER_FIELD(mergeCollations, numCols * sizeof(Oid));
+               COPY_POINTER_FIELD(mergeStrategies, numCols * sizeof(int));
+               COPY_POINTER_FIELD(mergeNullsFirst, numCols * sizeof(bool));
+       }
 
        return newnode;
 }
@@ -776,6 +839,8 @@ _copyAgg(const Agg *from)
                COPY_POINTER_FIELD(grpOperators, from->numCols * sizeof(Oid));
        }
        COPY_SCALAR_FIELD(numGroups);
+       COPY_NODE_FIELD(groupingSets);
+       COPY_NODE_FIELD(chain);
 
        return newnode;
 }
@@ -956,7 +1021,9 @@ _copyPlanRowMark(const PlanRowMark *from)
        COPY_SCALAR_FIELD(prti);
        COPY_SCALAR_FIELD(rowmarkId);
        COPY_SCALAR_FIELD(markType);
-       COPY_SCALAR_FIELD(noWait);
+       COPY_SCALAR_FIELD(allMarkTypes);
+       COPY_SCALAR_FIELD(strength);
+       COPY_SCALAR_FIELD(waitPolicy);
        COPY_SCALAR_FIELD(isParent);
 
        return newnode;
@@ -1027,6 +1094,7 @@ _copyIntoClause(const IntoClause *from)
        COPY_NODE_FIELD(options);
        COPY_SCALAR_FIELD(onCommit);
        COPY_STRING_FIELD(tableSpaceName);
+       COPY_NODE_FIELD(viewQuery);
        COPY_SCALAR_FIELD(skipData);
 
        return newnode;
@@ -1034,7 +1102,7 @@ _copyIntoClause(const IntoClause *from)
 
 /*
  * We don't need a _copyExpr because Expr is an abstract supertype which
- * should never actually get instantiated.     Also, since it has no common
+ * should never actually get instantiated.  Also, since it has no common
  * fields except NodeTag, there's no need for a helper routine to factor
  * out copying the common fields...
  */
@@ -1128,10 +1196,31 @@ _copyAggref(const Aggref *from)
        COPY_SCALAR_FIELD(aggtype);
        COPY_SCALAR_FIELD(aggcollid);
        COPY_SCALAR_FIELD(inputcollid);
+       COPY_NODE_FIELD(aggdirectargs);
        COPY_NODE_FIELD(args);
        COPY_NODE_FIELD(aggorder);
        COPY_NODE_FIELD(aggdistinct);
+       COPY_NODE_FIELD(aggfilter);
        COPY_SCALAR_FIELD(aggstar);
+       COPY_SCALAR_FIELD(aggvariadic);
+       COPY_SCALAR_FIELD(aggkind);
+       COPY_SCALAR_FIELD(agglevelsup);
+       COPY_LOCATION_FIELD(location);
+
+       return newnode;
+}
+
+/*
+ * _copyGroupingFunc
+ */
+static GroupingFunc *
+_copyGroupingFunc(const GroupingFunc *from)
+{
+       GroupingFunc       *newnode = makeNode(GroupingFunc);
+
+       COPY_NODE_FIELD(args);
+       COPY_NODE_FIELD(refs);
+       COPY_NODE_FIELD(cols);
        COPY_SCALAR_FIELD(agglevelsup);
        COPY_LOCATION_FIELD(location);
 
@@ -1151,6 +1240,7 @@ _copyWindowFunc(const WindowFunc *from)
        COPY_SCALAR_FIELD(wincollid);
        COPY_SCALAR_FIELD(inputcollid);
        COPY_NODE_FIELD(args);
+       COPY_NODE_FIELD(aggfilter);
        COPY_SCALAR_FIELD(winref);
        COPY_SCALAR_FIELD(winstar);
        COPY_SCALAR_FIELD(winagg);
@@ -1190,6 +1280,7 @@ _copyFuncExpr(const FuncExpr *from)
        COPY_SCALAR_FIELD(funcid);
        COPY_SCALAR_FIELD(funcresulttype);
        COPY_SCALAR_FIELD(funcretset);
+       COPY_SCALAR_FIELD(funcvariadic);
        COPY_SCALAR_FIELD(funcformat);
        COPY_SCALAR_FIELD(funccollid);
        COPY_SCALAR_FIELD(inputcollid);
@@ -1317,6 +1408,7 @@ _copySubLink(const SubLink *from)
        SubLink    *newnode = makeNode(SubLink);
 
        COPY_SCALAR_FIELD(subLinkType);
+       COPY_SCALAR_FIELD(subLinkId);
        COPY_NODE_FIELD(testexpr);
        COPY_NODE_FIELD(operName);
        COPY_NODE_FIELD(subselect);
@@ -1651,6 +1743,7 @@ _copyNullTest(const NullTest *from)
        COPY_NODE_FIELD(arg);
        COPY_SCALAR_FIELD(nulltesttype);
        COPY_SCALAR_FIELD(argisrow);
+       COPY_LOCATION_FIELD(location);
 
        return newnode;
 }
@@ -1665,6 +1758,7 @@ _copyBooleanTest(const BooleanTest *from)
 
        COPY_NODE_FIELD(arg);
        COPY_SCALAR_FIELD(booltesttype);
+       COPY_LOCATION_FIELD(location);
 
        return newnode;
 }
@@ -1734,6 +1828,22 @@ _copyCurrentOfExpr(const CurrentOfExpr *from)
        return newnode;
 }
 
+/*
+ * _copyInferenceElem
+ */
+static InferenceElem *
+_copyInferenceElem(const InferenceElem *from)
+{
+       InferenceElem *newnode = makeNode(InferenceElem);
+
+       COPY_NODE_FIELD(expr);
+       COPY_SCALAR_FIELD(infercollid);
+       COPY_SCALAR_FIELD(inferopfamily);
+       COPY_SCALAR_FIELD(inferopcinputtype);
+
+       return newnode;
+}
+
 /*
  * _copyTargetEntry
  */
@@ -1800,6 +1910,26 @@ _copyFromExpr(const FromExpr *from)
        return newnode;
 }
 
+/*
+ * _copyOnConflictExpr
+ */
+static OnConflictExpr *
+_copyOnConflictExpr(const OnConflictExpr *from)
+{
+       OnConflictExpr   *newnode = makeNode(OnConflictExpr);
+
+       COPY_SCALAR_FIELD(action);
+       COPY_NODE_FIELD(arbiterElems);
+       COPY_NODE_FIELD(arbiterWhere);
+       COPY_NODE_FIELD(onConflictSet);
+       COPY_NODE_FIELD(onConflictWhere);
+       COPY_SCALAR_FIELD(constraint);
+       COPY_SCALAR_FIELD(exclRelIndex);
+       COPY_NODE_FIELD(exclRelTlist);
+
+       return newnode;
+}
+
 /* ****************************************************************
  *                                             relation.h copy functions
  *
@@ -1840,6 +1970,7 @@ _copyRestrictInfo(const RestrictInfo *from)
        COPY_SCALAR_FIELD(pseudoconstant);
        COPY_BITMAPSET_FIELD(clause_relids);
        COPY_BITMAPSET_FIELD(required_relids);
+       COPY_BITMAPSET_FIELD(outer_relids);
        COPY_BITMAPSET_FIELD(nullable_relids);
        COPY_BITMAPSET_FIELD(left_relids);
        COPY_BITMAPSET_FIELD(right_relids);
@@ -1896,7 +2027,24 @@ _copySpecialJoinInfo(const SpecialJoinInfo *from)
        COPY_SCALAR_FIELD(jointype);
        COPY_SCALAR_FIELD(lhs_strict);
        COPY_SCALAR_FIELD(delay_upper_joins);
-       COPY_NODE_FIELD(join_quals);
+       COPY_SCALAR_FIELD(semi_can_btree);
+       COPY_SCALAR_FIELD(semi_can_hash);
+       COPY_NODE_FIELD(semi_operators);
+       COPY_NODE_FIELD(semi_rhs_exprs);
+
+       return newnode;
+}
+
+/*
+ * _copyLateralJoinInfo
+ */
+static LateralJoinInfo *
+_copyLateralJoinInfo(const LateralJoinInfo *from)
+{
+       LateralJoinInfo *newnode = makeNode(LateralJoinInfo);
+
+       COPY_BITMAPSET_FIELD(lateral_lhs);
+       COPY_BITMAPSET_FIELD(lateral_rhs);
 
        return newnode;
 }
@@ -1930,8 +2078,8 @@ _copyPlaceHolderInfo(const PlaceHolderInfo *from)
        COPY_SCALAR_FIELD(phid);
        COPY_NODE_FIELD(ph_var);
        COPY_BITMAPSET_FIELD(ph_eval_at);
+       COPY_BITMAPSET_FIELD(ph_lateral);
        COPY_BITMAPSET_FIELD(ph_needed);
-       COPY_BITMAPSET_FIELD(ph_may_need);
        COPY_SCALAR_FIELD(ph_width);
 
        return newnode;
@@ -1950,14 +2098,13 @@ _copyRangeTblEntry(const RangeTblEntry *from)
        COPY_SCALAR_FIELD(rtekind);
        COPY_SCALAR_FIELD(relid);
        COPY_SCALAR_FIELD(relkind);
+       COPY_NODE_FIELD(tablesample);
        COPY_NODE_FIELD(subquery);
        COPY_SCALAR_FIELD(security_barrier);
        COPY_SCALAR_FIELD(jointype);
        COPY_NODE_FIELD(joinaliasvars);
-       COPY_NODE_FIELD(funcexpr);
-       COPY_NODE_FIELD(funccoltypes);
-       COPY_NODE_FIELD(funccoltypmods);
-       COPY_NODE_FIELD(funccolcollations);
+       COPY_NODE_FIELD(functions);
+       COPY_SCALAR_FIELD(funcordinality);
        COPY_NODE_FIELD(values_lists);
        COPY_NODE_FIELD(values_collations);
        COPY_STRING_FIELD(ctename);
@@ -1968,12 +2115,44 @@ _copyRangeTblEntry(const RangeTblEntry *from)
        COPY_NODE_FIELD(ctecolcollations);
        COPY_NODE_FIELD(alias);
        COPY_NODE_FIELD(eref);
+       COPY_SCALAR_FIELD(lateral);
        COPY_SCALAR_FIELD(inh);
        COPY_SCALAR_FIELD(inFromCl);
        COPY_SCALAR_FIELD(requiredPerms);
        COPY_SCALAR_FIELD(checkAsUser);
        COPY_BITMAPSET_FIELD(selectedCols);
-       COPY_BITMAPSET_FIELD(modifiedCols);
+       COPY_BITMAPSET_FIELD(insertedCols);
+       COPY_BITMAPSET_FIELD(updatedCols);
+       COPY_NODE_FIELD(securityQuals);
+
+       return newnode;
+}
+
+static RangeTblFunction *
+_copyRangeTblFunction(const RangeTblFunction *from)
+{
+       RangeTblFunction *newnode = makeNode(RangeTblFunction);
+
+       COPY_NODE_FIELD(funcexpr);
+       COPY_SCALAR_FIELD(funccolcount);
+       COPY_NODE_FIELD(funccolnames);
+       COPY_NODE_FIELD(funccoltypes);
+       COPY_NODE_FIELD(funccoltypmods);
+       COPY_NODE_FIELD(funccolcollations);
+       COPY_BITMAPSET_FIELD(funcparams);
+
+       return newnode;
+}
+
+static WithCheckOption *
+_copyWithCheckOption(const WithCheckOption *from)
+{
+       WithCheckOption *newnode = makeNode(WithCheckOption);
+
+       COPY_SCALAR_FIELD(kind);
+       COPY_STRING_FIELD(relname);
+       COPY_NODE_FIELD(qual);
+       COPY_SCALAR_FIELD(cascaded);
 
        return newnode;
 }
@@ -1992,6 +2171,18 @@ _copySortGroupClause(const SortGroupClause *from)
        return newnode;
 }
 
+static GroupingSet *
+_copyGroupingSet(const GroupingSet *from)
+{
+       GroupingSet                *newnode = makeNode(GroupingSet);
+
+       COPY_SCALAR_FIELD(kind);
+       COPY_NODE_FIELD(content);
+       COPY_LOCATION_FIELD(location);
+
+       return newnode;
+}
+
 static WindowClause *
 _copyWindowClause(const WindowClause *from)
 {
@@ -2016,8 +2207,8 @@ _copyRowMarkClause(const RowMarkClause *from)
        RowMarkClause *newnode = makeNode(RowMarkClause);
 
        COPY_SCALAR_FIELD(rti);
-       COPY_SCALAR_FIELD(forUpdate);
-       COPY_SCALAR_FIELD(noWait);
+       COPY_SCALAR_FIELD(strength);
+       COPY_SCALAR_FIELD(waitPolicy);
        COPY_SCALAR_FIELD(pushedDown);
 
        return newnode;
@@ -2035,6 +2226,33 @@ _copyWithClause(const WithClause *from)
        return newnode;
 }
 
+static InferClause *
+_copyInferClause(const InferClause *from)
+{
+       InferClause *newnode = makeNode(InferClause);
+
+       COPY_NODE_FIELD(indexElems);
+       COPY_NODE_FIELD(whereClause);
+       COPY_STRING_FIELD(conname);
+       COPY_LOCATION_FIELD(location);
+
+       return newnode;
+}
+
+static OnConflictClause *
+_copyOnConflictClause(const OnConflictClause *from)
+{
+       OnConflictClause *newnode = makeNode(OnConflictClause);
+
+       COPY_SCALAR_FIELD(action);
+       COPY_NODE_FIELD(infer);
+       COPY_NODE_FIELD(targetList);
+       COPY_NODE_FIELD(whereClause);
+       COPY_LOCATION_FIELD(location);
+
+       return newnode;
+}
+
 static CommonTableExpr *
 _copyCommonTableExpr(const CommonTableExpr *from)
 {
@@ -2054,6 +2272,40 @@ _copyCommonTableExpr(const CommonTableExpr *from)
        return newnode;
 }
 
+static RangeTableSample *
+_copyRangeTableSample(const RangeTableSample *from)
+{
+       RangeTableSample *newnode = makeNode(RangeTableSample);
+
+       COPY_NODE_FIELD(relation);
+       COPY_STRING_FIELD(method);
+       COPY_NODE_FIELD(repeatable);
+       COPY_NODE_FIELD(args);
+
+       return newnode;
+}
+
+static TableSampleClause *
+_copyTableSampleClause(const TableSampleClause *from)
+{
+       TableSampleClause *newnode = makeNode(TableSampleClause);
+
+       COPY_SCALAR_FIELD(tsmid);
+       COPY_SCALAR_FIELD(tsmseqscan);
+       COPY_SCALAR_FIELD(tsmpagemode);
+       COPY_SCALAR_FIELD(tsminit);
+       COPY_SCALAR_FIELD(tsmnextblock);
+       COPY_SCALAR_FIELD(tsmnexttuple);
+       COPY_SCALAR_FIELD(tsmexaminetuple);
+       COPY_SCALAR_FIELD(tsmend);
+       COPY_SCALAR_FIELD(tsmreset);
+       COPY_SCALAR_FIELD(tsmcost);
+       COPY_NODE_FIELD(repeatable);
+       COPY_NODE_FIELD(args);
+
+       return newnode;
+}
+
 static A_Expr *
 _copyAExpr(const A_Expr *from)
 {
@@ -2129,6 +2381,8 @@ _copyFuncCall(const FuncCall *from)
        COPY_NODE_FIELD(funcname);
        COPY_NODE_FIELD(args);
        COPY_NODE_FIELD(agg_order);
+       COPY_NODE_FIELD(agg_filter);
+       COPY_SCALAR_FIELD(agg_within_group);
        COPY_SCALAR_FIELD(agg_star);
        COPY_SCALAR_FIELD(agg_distinct);
        COPY_SCALAR_FIELD(func_variadic);
@@ -2192,6 +2446,18 @@ _copyResTarget(const ResTarget *from)
        return newnode;
 }
 
+static MultiAssignRef *
+_copyMultiAssignRef(const MultiAssignRef *from)
+{
+       MultiAssignRef *newnode = makeNode(MultiAssignRef);
+
+       COPY_NODE_FIELD(source);
+       COPY_SCALAR_FIELD(colno);
+       COPY_SCALAR_FIELD(ncolumns);
+
+       return newnode;
+}
+
 static TypeName *
 _copyTypeName(const TypeName *from)
 {
@@ -2245,6 +2511,7 @@ _copyRangeSubselect(const RangeSubselect *from)
 {
        RangeSubselect *newnode = makeNode(RangeSubselect);
 
+       COPY_SCALAR_FIELD(lateral);
        COPY_NODE_FIELD(subquery);
        COPY_NODE_FIELD(alias);
 
@@ -2256,7 +2523,10 @@ _copyRangeFunction(const RangeFunction *from)
 {
        RangeFunction *newnode = makeNode(RangeFunction);
 
-       COPY_NODE_FIELD(funccallnode);
+       COPY_SCALAR_FIELD(lateral);
+       COPY_SCALAR_FIELD(ordinality);
+       COPY_SCALAR_FIELD(is_rowsfrom);
+       COPY_NODE_FIELD(functions);
        COPY_NODE_FIELD(alias);
        COPY_NODE_FIELD(coldeflist);
 
@@ -2321,6 +2591,7 @@ _copyColumnDef(const ColumnDef *from)
        COPY_SCALAR_FIELD(collOid);
        COPY_NODE_FIELD(constraints);
        COPY_NODE_FIELD(fdwoptions);
+       COPY_LOCATION_FIELD(location);
 
        return newnode;
 }
@@ -2335,6 +2606,7 @@ _copyConstraint(const Constraint *from)
        COPY_SCALAR_FIELD(deferrable);
        COPY_SCALAR_FIELD(initdeferred);
        COPY_LOCATION_FIELD(location);
+       COPY_SCALAR_FIELD(is_no_inherit);
        COPY_NODE_FIELD(raw_expr);
        COPY_STRING_FIELD(cooked_expr);
        COPY_NODE_FIELD(keys);
@@ -2351,6 +2623,7 @@ _copyConstraint(const Constraint *from)
        COPY_SCALAR_FIELD(fk_upd_action);
        COPY_SCALAR_FIELD(fk_del_action);
        COPY_NODE_FIELD(old_conpfeqop);
+       COPY_SCALAR_FIELD(old_pktable_oid);
        COPY_SCALAR_FIELD(skip_validation);
        COPY_SCALAR_FIELD(initially_valid);
 
@@ -2376,8 +2649,8 @@ _copyLockingClause(const LockingClause *from)
        LockingClause *newnode = makeNode(LockingClause);
 
        COPY_NODE_FIELD(lockedRels);
-       COPY_SCALAR_FIELD(forUpdate);
-       COPY_SCALAR_FIELD(noWait);
+       COPY_SCALAR_FIELD(strength);
+       COPY_SCALAR_FIELD(waitPolicy);
 
        return newnode;
 }
@@ -2395,6 +2668,18 @@ _copyXmlSerialize(const XmlSerialize *from)
        return newnode;
 }
 
+static RoleSpec *
+_copyRoleSpec(const RoleSpec *from)
+{
+       RoleSpec   *newnode = makeNode(RoleSpec);
+
+       COPY_SCALAR_FIELD(roletype);
+       COPY_STRING_FIELD(rolename);
+       COPY_LOCATION_FIELD(location);
+
+       return newnode;
+}
+
 static Query *
 _copyQuery(const Query *from)
 {
@@ -2402,10 +2687,10 @@ _copyQuery(const Query *from)
 
        COPY_SCALAR_FIELD(commandType);
        COPY_SCALAR_FIELD(querySource);
+       COPY_SCALAR_FIELD(queryId);
        COPY_SCALAR_FIELD(canSetTag);
        COPY_NODE_FIELD(utilityStmt);
        COPY_SCALAR_FIELD(resultRelation);
-       COPY_NODE_FIELD(intoClause);
        COPY_SCALAR_FIELD(hasAggs);
        COPY_SCALAR_FIELD(hasWindowFuncs);
        COPY_SCALAR_FIELD(hasSubLinks);
@@ -2413,12 +2698,16 @@ _copyQuery(const Query *from)
        COPY_SCALAR_FIELD(hasRecursive);
        COPY_SCALAR_FIELD(hasModifyingCTE);
        COPY_SCALAR_FIELD(hasForUpdate);
+       COPY_SCALAR_FIELD(hasRowSecurity);
        COPY_NODE_FIELD(cteList);
        COPY_NODE_FIELD(rtable);
        COPY_NODE_FIELD(jointree);
        COPY_NODE_FIELD(targetList);
+       COPY_NODE_FIELD(withCheckOptions);
+       COPY_NODE_FIELD(onConflict);
        COPY_NODE_FIELD(returningList);
        COPY_NODE_FIELD(groupClause);
+       COPY_NODE_FIELD(groupingSets);
        COPY_NODE_FIELD(havingQual);
        COPY_NODE_FIELD(windowClause);
        COPY_NODE_FIELD(distinctClause);
@@ -2440,6 +2729,7 @@ _copyInsertStmt(const InsertStmt *from)
        COPY_NODE_FIELD(relation);
        COPY_NODE_FIELD(cols);
        COPY_NODE_FIELD(selectStmt);
+       COPY_NODE_FIELD(onConflictClause);
        COPY_NODE_FIELD(returningList);
        COPY_NODE_FIELD(withClause);
 
@@ -2488,12 +2778,12 @@ _copySelectStmt(const SelectStmt *from)
        COPY_NODE_FIELD(groupClause);
        COPY_NODE_FIELD(havingClause);
        COPY_NODE_FIELD(windowClause);
-       COPY_NODE_FIELD(withClause);
        COPY_NODE_FIELD(valuesLists);
        COPY_NODE_FIELD(sortClause);
        COPY_NODE_FIELD(limitOffset);
        COPY_NODE_FIELD(limitCount);
        COPY_NODE_FIELD(lockingClause);
+       COPY_NODE_FIELD(withClause);
        COPY_SCALAR_FIELD(op);
        COPY_SCALAR_FIELD(all);
        COPY_NODE_FIELD(larg);
@@ -2539,6 +2829,7 @@ _copyAlterTableCmd(const AlterTableCmd *from)
 
        COPY_SCALAR_FIELD(subtype);
        COPY_STRING_FIELD(name);
+       COPY_NODE_FIELD(newowner);
        COPY_NODE_FIELD(def);
        COPY_SCALAR_FIELD(behavior);
        COPY_SCALAR_FIELD(missing_ok);
@@ -2578,16 +2869,6 @@ _copyGrantStmt(const GrantStmt *from)
        return newnode;
 }
 
-static PrivGrantee *
-_copyPrivGrantee(const PrivGrantee *from)
-{
-       PrivGrantee *newnode = makeNode(PrivGrantee);
-
-       COPY_STRING_FIELD(rolname);
-
-       return newnode;
-}
-
 static FuncWithArgs *
 _copyFuncWithArgs(const FuncWithArgs *from)
 {
@@ -2619,7 +2900,7 @@ _copyGrantRoleStmt(const GrantRoleStmt *from)
        COPY_NODE_FIELD(grantee_roles);
        COPY_SCALAR_FIELD(is_grant);
        COPY_SCALAR_FIELD(admin_opt);
-       COPY_STRING_FIELD(grantor);
+       COPY_NODE_FIELD(grantor);
        COPY_SCALAR_FIELD(behavior);
 
        return newnode;
@@ -2679,6 +2960,7 @@ _copyCopyStmt(const CopyStmt *from)
        COPY_NODE_FIELD(query);
        COPY_NODE_FIELD(attlist);
        COPY_SCALAR_FIELD(is_from);
+       COPY_SCALAR_FIELD(is_program);
        COPY_STRING_FIELD(filename);
        COPY_NODE_FIELD(options);
 
@@ -2750,6 +3032,7 @@ _copyDropStmt(const DropStmt *from)
        COPY_SCALAR_FIELD(removeType);
        COPY_SCALAR_FIELD(behavior);
        COPY_SCALAR_FIELD(missing_ok);
+       COPY_SCALAR_FIELD(concurrent);
 
        return newnode;
 }
@@ -2819,6 +3102,7 @@ _copyIndexStmt(const IndexStmt *from)
        COPY_NODE_FIELD(options);
        COPY_NODE_FIELD(whereClause);
        COPY_NODE_FIELD(excludeOpNames);
+       COPY_STRING_FIELD(idxcomment);
        COPY_SCALAR_FIELD(indexOid);
        COPY_SCALAR_FIELD(oldNode);
        COPY_SCALAR_FIELD(unique);
@@ -2826,7 +3110,9 @@ _copyIndexStmt(const IndexStmt *from)
        COPY_SCALAR_FIELD(isconstraint);
        COPY_SCALAR_FIELD(deferrable);
        COPY_SCALAR_FIELD(initdeferred);
+       COPY_SCALAR_FIELD(transformed);
        COPY_SCALAR_FIELD(concurrent);
+       COPY_SCALAR_FIELD(if_not_exists);
 
        return newnode;
 }
@@ -2886,6 +3172,7 @@ _copyRenameStmt(const RenameStmt *from)
        RenameStmt *newnode = makeNode(RenameStmt);
 
        COPY_SCALAR_FIELD(renameType);
+       COPY_SCALAR_FIELD(relationType);
        COPY_NODE_FIELD(relation);
        COPY_NODE_FIELD(object);
        COPY_NODE_FIELD(objarg);
@@ -2906,7 +3193,6 @@ _copyAlterObjectSchemaStmt(const AlterObjectSchemaStmt *from)
        COPY_NODE_FIELD(relation);
        COPY_NODE_FIELD(object);
        COPY_NODE_FIELD(objarg);
-       COPY_STRING_FIELD(addname);
        COPY_STRING_FIELD(newschema);
        COPY_SCALAR_FIELD(missing_ok);
 
@@ -2922,8 +3208,7 @@ _copyAlterOwnerStmt(const AlterOwnerStmt *from)
        COPY_NODE_FIELD(relation);
        COPY_NODE_FIELD(object);
        COPY_NODE_FIELD(objarg);
-       COPY_STRING_FIELD(addname);
-       COPY_STRING_FIELD(newowner);
+       COPY_NODE_FIELD(newowner);
 
        return newnode;
 }
@@ -3029,6 +3314,7 @@ _copyAlterEnumStmt(const AlterEnumStmt *from)
        COPY_STRING_FIELD(newVal);
        COPY_STRING_FIELD(newValNeighbor);
        COPY_SCALAR_FIELD(newValIsAfter);
+       COPY_SCALAR_FIELD(skipIfExists);
 
        return newnode;
 }
@@ -3042,6 +3328,8 @@ _copyViewStmt(const ViewStmt *from)
        COPY_NODE_FIELD(aliases);
        COPY_NODE_FIELD(query);
        COPY_SCALAR_FIELD(replace);
+       COPY_NODE_FIELD(options);
+       COPY_SCALAR_FIELD(withCheckOption);
 
        return newnode;
 }
@@ -3174,8 +3462,6 @@ _copyVacuumStmt(const VacuumStmt *from)
        VacuumStmt *newnode = makeNode(VacuumStmt);
 
        COPY_SCALAR_FIELD(options);
-       COPY_SCALAR_FIELD(freeze_min_age);
-       COPY_SCALAR_FIELD(freeze_table_age);
        COPY_NODE_FIELD(relation);
        COPY_NODE_FIELD(va_cols);
 
@@ -3193,6 +3479,53 @@ _copyExplainStmt(const ExplainStmt *from)
        return newnode;
 }
 
+static CreateTableAsStmt *
+_copyCreateTableAsStmt(const CreateTableAsStmt *from)
+{
+       CreateTableAsStmt *newnode = makeNode(CreateTableAsStmt);
+
+       COPY_NODE_FIELD(query);
+       COPY_NODE_FIELD(into);
+       COPY_SCALAR_FIELD(relkind);
+       COPY_SCALAR_FIELD(is_select_into);
+       COPY_SCALAR_FIELD(if_not_exists);
+
+       return newnode;
+}
+
+static RefreshMatViewStmt *
+_copyRefreshMatViewStmt(const RefreshMatViewStmt *from)
+{
+       RefreshMatViewStmt *newnode = makeNode(RefreshMatViewStmt);
+
+       COPY_SCALAR_FIELD(concurrent);
+       COPY_SCALAR_FIELD(skipData);
+       COPY_NODE_FIELD(relation);
+
+       return newnode;
+}
+
+static ReplicaIdentityStmt *
+_copyReplicaIdentityStmt(const ReplicaIdentityStmt *from)
+{
+       ReplicaIdentityStmt *newnode = makeNode(ReplicaIdentityStmt);
+
+       COPY_SCALAR_FIELD(identity_type);
+       COPY_STRING_FIELD(name);
+
+       return newnode;
+}
+
+static AlterSystemStmt *
+_copyAlterSystemStmt(const AlterSystemStmt *from)
+{
+       AlterSystemStmt *newnode = makeNode(AlterSystemStmt);
+
+       COPY_NODE_FIELD(setstmt);
+
+       return newnode;
+}
+
 static CreateSeqStmt *
 _copyCreateSeqStmt(const CreateSeqStmt *from)
 {
@@ -3201,6 +3534,7 @@ _copyCreateSeqStmt(const CreateSeqStmt *from)
        COPY_NODE_FIELD(sequence);
        COPY_NODE_FIELD(options);
        COPY_SCALAR_FIELD(ownerId);
+       COPY_SCALAR_FIELD(if_not_exists);
 
        return newnode;
 }
@@ -3256,8 +3590,9 @@ _copyCreateTableSpaceStmt(const CreateTableSpaceStmt *from)
        CreateTableSpaceStmt *newnode = makeNode(CreateTableSpaceStmt);
 
        COPY_STRING_FIELD(tablespacename);
-       COPY_STRING_FIELD(owner);
+       COPY_NODE_FIELD(owner);
        COPY_STRING_FIELD(location);
+       COPY_NODE_FIELD(options);
 
        return newnode;
 }
@@ -3285,6 +3620,20 @@ _copyAlterTableSpaceOptionsStmt(const AlterTableSpaceOptionsStmt *from)
        return newnode;
 }
 
+static AlterTableMoveAllStmt *
+_copyAlterTableMoveAllStmt(const AlterTableMoveAllStmt *from)
+{
+       AlterTableMoveAllStmt *newnode = makeNode(AlterTableMoveAllStmt);
+
+       COPY_STRING_FIELD(orig_tablespacename);
+       COPY_SCALAR_FIELD(objtype);
+       COPY_NODE_FIELD(roles);
+       COPY_STRING_FIELD(new_tablespacename);
+       COPY_SCALAR_FIELD(nowait);
+
+       return newnode;
+}
+
 static CreateExtensionStmt *
 _copyCreateExtensionStmt(const CreateExtensionStmt *from)
 {
@@ -3378,7 +3727,7 @@ _copyCreateUserMappingStmt(const CreateUserMappingStmt *from)
 {
        CreateUserMappingStmt *newnode = makeNode(CreateUserMappingStmt);
 
-       COPY_STRING_FIELD(username);
+       COPY_NODE_FIELD(user);
        COPY_STRING_FIELD(servername);
        COPY_NODE_FIELD(options);
 
@@ -3390,7 +3739,7 @@ _copyAlterUserMappingStmt(const AlterUserMappingStmt *from)
 {
        AlterUserMappingStmt *newnode = makeNode(AlterUserMappingStmt);
 
-       COPY_STRING_FIELD(username);
+       COPY_NODE_FIELD(user);
        COPY_STRING_FIELD(servername);
        COPY_NODE_FIELD(options);
 
@@ -3402,7 +3751,7 @@ _copyDropUserMappingStmt(const DropUserMappingStmt *from)
 {
        DropUserMappingStmt *newnode = makeNode(DropUserMappingStmt);
 
-       COPY_STRING_FIELD(username);
+       COPY_NODE_FIELD(user);
        COPY_STRING_FIELD(servername);
        COPY_SCALAR_FIELD(missing_ok);
 
@@ -3422,6 +3771,35 @@ _copyCreateForeignTableStmt(const CreateForeignTableStmt *from)
        return newnode;
 }
 
+static ImportForeignSchemaStmt *
+_copyImportForeignSchemaStmt(const ImportForeignSchemaStmt *from)
+{
+       ImportForeignSchemaStmt *newnode = makeNode(ImportForeignSchemaStmt);
+
+       COPY_STRING_FIELD(server_name);
+       COPY_STRING_FIELD(remote_schema);
+       COPY_STRING_FIELD(local_schema);
+       COPY_SCALAR_FIELD(list_type);
+       COPY_NODE_FIELD(table_list);
+       COPY_NODE_FIELD(options);
+
+       return newnode;
+}
+
+static CreateTransformStmt *
+_copyCreateTransformStmt(const CreateTransformStmt *from)
+{
+       CreateTransformStmt *newnode = makeNode(CreateTransformStmt);
+
+       COPY_SCALAR_FIELD(replace);
+       COPY_NODE_FIELD(type_name);
+       COPY_STRING_FIELD(lang);
+       COPY_NODE_FIELD(fromsql);
+       COPY_NODE_FIELD(tosql);
+
+       return newnode;
+}
+
 static CreateTrigStmt *
 _copyCreateTrigStmt(const CreateTrigStmt *from)
 {
@@ -3444,6 +3822,30 @@ _copyCreateTrigStmt(const CreateTrigStmt *from)
        return newnode;
 }
 
+static CreateEventTrigStmt *
+_copyCreateEventTrigStmt(const CreateEventTrigStmt *from)
+{
+       CreateEventTrigStmt *newnode = makeNode(CreateEventTrigStmt);
+
+       COPY_STRING_FIELD(trigname);
+       COPY_STRING_FIELD(eventname);
+       COPY_NODE_FIELD(whenclause);
+       COPY_NODE_FIELD(funcname);
+
+       return newnode;
+}
+
+static AlterEventTrigStmt *
+_copyAlterEventTrigStmt(const AlterEventTrigStmt *from)
+{
+       AlterEventTrigStmt *newnode = makeNode(AlterEventTrigStmt);
+
+       COPY_STRING_FIELD(trigname);
+       COPY_SCALAR_FIELD(tgenabled);
+
+       return newnode;
+}
+
 static CreatePLangStmt *
 _copyCreatePLangStmt(const CreatePLangStmt *from)
 {
@@ -3476,7 +3878,7 @@ _copyAlterRoleStmt(const AlterRoleStmt *from)
 {
        AlterRoleStmt *newnode = makeNode(AlterRoleStmt);
 
-       COPY_STRING_FIELD(role);
+       COPY_NODE_FIELD(role);
        COPY_NODE_FIELD(options);
        COPY_SCALAR_FIELD(action);
 
@@ -3488,7 +3890,7 @@ _copyAlterRoleSetStmt(const AlterRoleSetStmt *from)
 {
        AlterRoleSetStmt *newnode = makeNode(AlterRoleSetStmt);
 
-       COPY_STRING_FIELD(role);
+       COPY_NODE_FIELD(role);
        COPY_STRING_FIELD(database);
        COPY_NODE_FIELD(setstmt);
 
@@ -3537,8 +3939,7 @@ _copyReindexStmt(const ReindexStmt *from)
        COPY_SCALAR_FIELD(kind);
        COPY_NODE_FIELD(relation);
        COPY_STRING_FIELD(name);
-       COPY_SCALAR_FIELD(do_system);
-       COPY_SCALAR_FIELD(do_user);
+       COPY_SCALAR_FIELD(options);
 
        return newnode;
 }
@@ -3549,8 +3950,9 @@ _copyCreateSchemaStmt(const CreateSchemaStmt *from)
        CreateSchemaStmt *newnode = makeNode(CreateSchemaStmt);
 
        COPY_STRING_FIELD(schemaname);
-       COPY_STRING_FIELD(authid);
+       COPY_NODE_FIELD(authrole);
        COPY_NODE_FIELD(schemaElts);
+       COPY_SCALAR_FIELD(if_not_exists);
 
        return newnode;
 }
@@ -3601,7 +4003,6 @@ _copyExecuteStmt(const ExecuteStmt *from)
        ExecuteStmt *newnode = makeNode(ExecuteStmt);
 
        COPY_STRING_FIELD(name);
-       COPY_NODE_FIELD(into);
        COPY_NODE_FIELD(params);
 
        return newnode;
@@ -3634,7 +4035,7 @@ _copyReassignOwnedStmt(const ReassignOwnedStmt *from)
        ReassignOwnedStmt *newnode = makeNode(ReassignOwnedStmt);
 
        COPY_NODE_FIELD(roles);
-       COPY_SCALAR_FIELD(newrole);
+       COPY_NODE_FIELD(newrole);
 
        return newnode;
 }
@@ -3655,6 +4056,7 @@ _copyAlterTSConfigurationStmt(const AlterTSConfigurationStmt *from)
 {
        AlterTSConfigurationStmt *newnode = makeNode(AlterTSConfigurationStmt);
 
+       COPY_SCALAR_FIELD(kind);
        COPY_NODE_FIELD(cfgname);
        COPY_NODE_FIELD(tokentype);
        COPY_NODE_FIELD(dicts);
@@ -3665,6 +4067,35 @@ _copyAlterTSConfigurationStmt(const AlterTSConfigurationStmt *from)
        return newnode;
 }
 
+static CreatePolicyStmt *
+_copyCreatePolicyStmt(const CreatePolicyStmt *from)
+{
+       CreatePolicyStmt *newnode = makeNode(CreatePolicyStmt);
+
+       COPY_STRING_FIELD(policy_name);
+       COPY_NODE_FIELD(table);
+       COPY_SCALAR_FIELD(cmd);
+       COPY_NODE_FIELD(roles);
+       COPY_NODE_FIELD(qual);
+       COPY_NODE_FIELD(with_check);
+
+       return newnode;
+}
+
+static AlterPolicyStmt *
+_copyAlterPolicyStmt(const AlterPolicyStmt *from)
+{
+       AlterPolicyStmt *newnode = makeNode(AlterPolicyStmt);
+
+       COPY_STRING_FIELD(policy_name);
+       COPY_NODE_FIELD(table);
+       COPY_NODE_FIELD(roles);
+       COPY_NODE_FIELD(qual);
+       COPY_NODE_FIELD(with_check);
+
+       return newnode;
+}
+
 /* ****************************************************************
  *                                     pg_list.h copy functions
  * ****************************************************************
@@ -3828,6 +4259,12 @@ copyObject(const void *from)
                case T_ForeignScan:
                        retval = _copyForeignScan(from);
                        break;
+               case T_CustomScan:
+                       retval = _copyCustomScan(from);
+                       break;
+               case T_SampleScan:
+                       retval = _copySampleScan(from);
+                       break;
                case T_Join:
                        retval = _copyJoin(from);
                        break;
@@ -3904,6 +4341,9 @@ copyObject(const void *from)
                case T_Aggref:
                        retval = _copyAggref(from);
                        break;
+               case T_GroupingFunc:
+                       retval = _copyGroupingFunc(from);
+                       break;
                case T_WindowFunc:
                        retval = _copyWindowFunc(from);
                        break;
@@ -4006,6 +4446,9 @@ copyObject(const void *from)
                case T_CurrentOfExpr:
                        retval = _copyCurrentOfExpr(from);
                        break;
+               case T_InferenceElem:
+                       retval = _copyInferenceElem(from);
+                       break;
                case T_TargetEntry:
                        retval = _copyTargetEntry(from);
                        break;
@@ -4018,6 +4461,9 @@ copyObject(const void *from)
                case T_FromExpr:
                        retval = _copyFromExpr(from);
                        break;
+               case T_OnConflictExpr:
+                       retval = _copyOnConflictExpr(from);
+                       break;
 
                        /*
                         * RELATION NODES
@@ -4034,6 +4480,9 @@ copyObject(const void *from)
                case T_SpecialJoinInfo:
                        retval = _copySpecialJoinInfo(from);
                        break;
+               case T_LateralJoinInfo:
+                       retval = _copyLateralJoinInfo(from);
+                       break;
                case T_AppendRelInfo:
                        retval = _copyAppendRelInfo(from);
                        break;
@@ -4233,6 +4682,18 @@ copyObject(const void *from)
                case T_ExplainStmt:
                        retval = _copyExplainStmt(from);
                        break;
+               case T_CreateTableAsStmt:
+                       retval = _copyCreateTableAsStmt(from);
+                       break;
+               case T_RefreshMatViewStmt:
+                       retval = _copyRefreshMatViewStmt(from);
+                       break;
+               case T_ReplicaIdentityStmt:
+                       retval = _copyReplicaIdentityStmt(from);
+                       break;
+               case T_AlterSystemStmt:
+                       retval = _copyAlterSystemStmt(from);
+                       break;
                case T_CreateSeqStmt:
                        retval = _copyCreateSeqStmt(from);
                        break;
@@ -4257,6 +4718,9 @@ copyObject(const void *from)
                case T_AlterTableSpaceOptionsStmt:
                        retval = _copyAlterTableSpaceOptionsStmt(from);
                        break;
+               case T_AlterTableMoveAllStmt:
+                       retval = _copyAlterTableMoveAllStmt(from);
+                       break;
                case T_CreateExtensionStmt:
                        retval = _copyCreateExtensionStmt(from);
                        break;
@@ -4290,9 +4754,21 @@ copyObject(const void *from)
                case T_CreateForeignTableStmt:
                        retval = _copyCreateForeignTableStmt(from);
                        break;
+               case T_ImportForeignSchemaStmt:
+                       retval = _copyImportForeignSchemaStmt(from);
+                       break;
+               case T_CreateTransformStmt:
+                       retval = _copyCreateTransformStmt(from);
+                       break;
                case T_CreateTrigStmt:
                        retval = _copyCreateTrigStmt(from);
                        break;
+               case T_CreateEventTrigStmt:
+                       retval = _copyCreateEventTrigStmt(from);
+                       break;
+               case T_AlterEventTrigStmt:
+                       retval = _copyAlterEventTrigStmt(from);
+                       break;
                case T_CreatePLangStmt:
                        retval = _copyCreatePLangStmt(from);
                        break;
@@ -4350,7 +4826,12 @@ copyObject(const void *from)
                case T_AlterTSConfigurationStmt:
                        retval = _copyAlterTSConfigurationStmt(from);
                        break;
-
+               case T_CreatePolicyStmt:
+                       retval = _copyCreatePolicyStmt(from);
+                       break;
+               case T_AlterPolicyStmt:
+                       retval = _copyAlterPolicyStmt(from);
+                       break;
                case T_A_Expr:
                        retval = _copyAExpr(from);
                        break;
@@ -4381,6 +4862,9 @@ copyObject(const void *from)
                case T_ResTarget:
                        retval = _copyResTarget(from);
                        break;
+               case T_MultiAssignRef:
+                       retval = _copyMultiAssignRef(from);
+                       break;
                case T_TypeCast:
                        retval = _copyTypeCast(from);
                        break;
@@ -4420,9 +4904,18 @@ copyObject(const void *from)
                case T_RangeTblEntry:
                        retval = _copyRangeTblEntry(from);
                        break;
+               case T_RangeTblFunction:
+                       retval = _copyRangeTblFunction(from);
+                       break;
+               case T_WithCheckOption:
+                       retval = _copyWithCheckOption(from);
+                       break;
                case T_SortGroupClause:
                        retval = _copySortGroupClause(from);
                        break;
+               case T_GroupingSet:
+                       retval = _copyGroupingSet(from);
+                       break;
                case T_WindowClause:
                        retval = _copyWindowClause(from);
                        break;
@@ -4432,11 +4925,20 @@ copyObject(const void *from)
                case T_WithClause:
                        retval = _copyWithClause(from);
                        break;
+               case T_InferClause:
+                       retval = _copyInferClause(from);
+                       break;
+               case T_OnConflictClause:
+                       retval = _copyOnConflictClause(from);
+                       break;
                case T_CommonTableExpr:
                        retval = _copyCommonTableExpr(from);
                        break;
-               case T_PrivGrantee:
-                       retval = _copyPrivGrantee(from);
+               case T_RangeTableSample:
+                       retval = _copyRangeTableSample(from);
+                       break;
+               case T_TableSampleClause:
+                       retval = _copyTableSampleClause(from);
                        break;
                case T_FuncWithArgs:
                        retval = _copyFuncWithArgs(from);
@@ -4447,10 +4949,13 @@ copyObject(const void *from)
                case T_XmlSerialize:
                        retval = _copyXmlSerialize(from);
                        break;
+               case T_RoleSpec:
+                       retval = _copyRoleSpec(from);
+                       break;
 
                default:
                        elog(ERROR, "unrecognized node type: %d", (int) nodeTag(from));
-                       retval = 0;             /* keep compiler quiet */
+                       retval = 0;                     /* keep compiler quiet */
                        break;
        }