LCOV - code coverage report
Current view: top level - src/backend/nodes - copyfuncs.funcs.c (source / functions) Hit Total Coverage
Test: PostgreSQL 19devel Lines: 3306 3430 96.4 %
Date: 2025-10-10 11:17:28 Functions: 316 326 96.9 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*-------------------------------------------------------------------------
       2             :  *
       3             :  * copyfuncs.funcs.c
       4             :  *    Generated node infrastructure code
       5             :  *
       6             :  * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
       7             :  * Portions Copyright (c) 1994, Regents of the University of California
       8             :  *
       9             :  * NOTES
      10             :  *  ******************************
      11             :  *  *** DO NOT EDIT THIS FILE! ***
      12             :  *  ******************************
      13             :  *
      14             :  *  It has been GENERATED by src/backend/nodes/gen_node_support.pl
      15             :  *
      16             :  *-------------------------------------------------------------------------
      17             :  */
      18             : #include "access/amapi.h"
      19             : #include "access/cmptype.h"
      20             : #include "access/sdir.h"
      21             : #include "access/tableam.h"
      22             : #include "access/tsmapi.h"
      23             : #include "commands/event_trigger.h"
      24             : #include "commands/trigger.h"
      25             : #include "executor/tuptable.h"
      26             : #include "foreign/fdwapi.h"
      27             : #include "nodes/bitmapset.h"
      28             : #include "nodes/execnodes.h"
      29             : #include "nodes/extensible.h"
      30             : #include "nodes/lockoptions.h"
      31             : #include "nodes/miscnodes.h"
      32             : #include "nodes/nodes.h"
      33             : #include "nodes/parsenodes.h"
      34             : #include "nodes/pathnodes.h"
      35             : #include "nodes/plannodes.h"
      36             : #include "nodes/primnodes.h"
      37             : #include "nodes/replnodes.h"
      38             : #include "nodes/supportnodes.h"
      39             : #include "nodes/value.h"
      40             : #include "utils/rel.h"
      41             : 
      42             : static Alias *
      43     3387080 : _copyAlias(const Alias *from)
      44             : {
      45     3387080 :     Alias *newnode = makeNode(Alias);
      46             : 
      47     3387080 :     COPY_STRING_FIELD(aliasname);
      48     3387080 :     COPY_NODE_FIELD(colnames);
      49             : 
      50     3387080 :     return newnode;
      51             : }
      52             : 
      53             : static RangeVar *
      54      944550 : _copyRangeVar(const RangeVar *from)
      55             : {
      56      944550 :     RangeVar *newnode = makeNode(RangeVar);
      57             : 
      58      944550 :     COPY_STRING_FIELD(catalogname);
      59      944550 :     COPY_STRING_FIELD(schemaname);
      60      944550 :     COPY_STRING_FIELD(relname);
      61      944550 :     COPY_SCALAR_FIELD(inh);
      62      944550 :     COPY_SCALAR_FIELD(relpersistence);
      63      944550 :     COPY_NODE_FIELD(alias);
      64      944550 :     COPY_LOCATION_FIELD(location);
      65             : 
      66      944550 :     return newnode;
      67             : }
      68             : 
      69             : static TableFunc *
      70        1360 : _copyTableFunc(const TableFunc *from)
      71             : {
      72        1360 :     TableFunc *newnode = makeNode(TableFunc);
      73             : 
      74        1360 :     COPY_SCALAR_FIELD(functype);
      75        1360 :     COPY_NODE_FIELD(ns_uris);
      76        1360 :     COPY_NODE_FIELD(ns_names);
      77        1360 :     COPY_NODE_FIELD(docexpr);
      78        1360 :     COPY_NODE_FIELD(rowexpr);
      79        1360 :     COPY_NODE_FIELD(colnames);
      80        1360 :     COPY_NODE_FIELD(coltypes);
      81        1360 :     COPY_NODE_FIELD(coltypmods);
      82        1360 :     COPY_NODE_FIELD(colcollations);
      83        1360 :     COPY_NODE_FIELD(colexprs);
      84        1360 :     COPY_NODE_FIELD(coldefexprs);
      85        1360 :     COPY_NODE_FIELD(colvalexprs);
      86        1360 :     COPY_NODE_FIELD(passingvalexprs);
      87        1360 :     COPY_BITMAPSET_FIELD(notnulls);
      88        1360 :     COPY_NODE_FIELD(plan);
      89        1360 :     COPY_SCALAR_FIELD(ordinalitycol);
      90        1360 :     COPY_LOCATION_FIELD(location);
      91             : 
      92        1360 :     return newnode;
      93             : }
      94             : 
      95             : static IntoClause *
      96        4308 : _copyIntoClause(const IntoClause *from)
      97             : {
      98        4308 :     IntoClause *newnode = makeNode(IntoClause);
      99             : 
     100        4308 :     COPY_NODE_FIELD(rel);
     101        4308 :     COPY_NODE_FIELD(colNames);
     102        4308 :     COPY_STRING_FIELD(accessMethod);
     103        4308 :     COPY_NODE_FIELD(options);
     104        4308 :     COPY_SCALAR_FIELD(onCommit);
     105        4308 :     COPY_STRING_FIELD(tableSpaceName);
     106        4308 :     COPY_NODE_FIELD(viewQuery);
     107        4308 :     COPY_SCALAR_FIELD(skipData);
     108             : 
     109        4308 :     return newnode;
     110             : }
     111             : 
     112             : static Var *
     113    19656766 : _copyVar(const Var *from)
     114             : {
     115    19656766 :     Var *newnode = makeNode(Var);
     116             : 
     117    19656766 :     COPY_SCALAR_FIELD(varno);
     118    19656766 :     COPY_SCALAR_FIELD(varattno);
     119    19656766 :     COPY_SCALAR_FIELD(vartype);
     120    19656766 :     COPY_SCALAR_FIELD(vartypmod);
     121    19656766 :     COPY_SCALAR_FIELD(varcollid);
     122    19656766 :     COPY_BITMAPSET_FIELD(varnullingrels);
     123    19656766 :     COPY_SCALAR_FIELD(varlevelsup);
     124    19656766 :     COPY_SCALAR_FIELD(varreturningtype);
     125    19656766 :     COPY_SCALAR_FIELD(varnosyn);
     126    19656766 :     COPY_SCALAR_FIELD(varattnosyn);
     127    19656766 :     COPY_LOCATION_FIELD(location);
     128             : 
     129    19656766 :     return newnode;
     130             : }
     131             : 
     132             : static Param *
     133      728916 : _copyParam(const Param *from)
     134             : {
     135      728916 :     Param *newnode = makeNode(Param);
     136             : 
     137      728916 :     COPY_SCALAR_FIELD(paramkind);
     138      728916 :     COPY_SCALAR_FIELD(paramid);
     139      728916 :     COPY_SCALAR_FIELD(paramtype);
     140      728916 :     COPY_SCALAR_FIELD(paramtypmod);
     141      728916 :     COPY_SCALAR_FIELD(paramcollid);
     142      728916 :     COPY_LOCATION_FIELD(location);
     143             : 
     144      728916 :     return newnode;
     145             : }
     146             : 
     147             : static Aggref *
     148      203890 : _copyAggref(const Aggref *from)
     149             : {
     150      203890 :     Aggref *newnode = makeNode(Aggref);
     151             : 
     152      203890 :     COPY_SCALAR_FIELD(aggfnoid);
     153      203890 :     COPY_SCALAR_FIELD(aggtype);
     154      203890 :     COPY_SCALAR_FIELD(aggcollid);
     155      203890 :     COPY_SCALAR_FIELD(inputcollid);
     156      203890 :     COPY_SCALAR_FIELD(aggtranstype);
     157      203890 :     COPY_NODE_FIELD(aggargtypes);
     158      203890 :     COPY_NODE_FIELD(aggdirectargs);
     159      203890 :     COPY_NODE_FIELD(args);
     160      203890 :     COPY_NODE_FIELD(aggorder);
     161      203890 :     COPY_NODE_FIELD(aggdistinct);
     162      203890 :     COPY_NODE_FIELD(aggfilter);
     163      203890 :     COPY_SCALAR_FIELD(aggstar);
     164      203890 :     COPY_SCALAR_FIELD(aggvariadic);
     165      203890 :     COPY_SCALAR_FIELD(aggkind);
     166      203890 :     COPY_SCALAR_FIELD(aggpresorted);
     167      203890 :     COPY_SCALAR_FIELD(agglevelsup);
     168      203890 :     COPY_SCALAR_FIELD(aggsplit);
     169      203890 :     COPY_SCALAR_FIELD(aggno);
     170      203890 :     COPY_SCALAR_FIELD(aggtransno);
     171      203890 :     COPY_LOCATION_FIELD(location);
     172             : 
     173      203890 :     return newnode;
     174             : }
     175             : 
     176             : static GroupingFunc *
     177        1356 : _copyGroupingFunc(const GroupingFunc *from)
     178             : {
     179        1356 :     GroupingFunc *newnode = makeNode(GroupingFunc);
     180             : 
     181        1356 :     COPY_NODE_FIELD(args);
     182        1356 :     COPY_NODE_FIELD(refs);
     183        1356 :     COPY_NODE_FIELD(cols);
     184        1356 :     COPY_SCALAR_FIELD(agglevelsup);
     185        1356 :     COPY_LOCATION_FIELD(location);
     186             : 
     187        1356 :     return newnode;
     188             : }
     189             : 
     190             : static WindowFunc *
     191        8840 : _copyWindowFunc(const WindowFunc *from)
     192             : {
     193        8840 :     WindowFunc *newnode = makeNode(WindowFunc);
     194             : 
     195        8840 :     COPY_SCALAR_FIELD(winfnoid);
     196        8840 :     COPY_SCALAR_FIELD(wintype);
     197        8840 :     COPY_SCALAR_FIELD(wincollid);
     198        8840 :     COPY_SCALAR_FIELD(inputcollid);
     199        8840 :     COPY_NODE_FIELD(args);
     200        8840 :     COPY_NODE_FIELD(aggfilter);
     201        8840 :     COPY_NODE_FIELD(runCondition);
     202        8840 :     COPY_SCALAR_FIELD(winref);
     203        8840 :     COPY_SCALAR_FIELD(winstar);
     204        8840 :     COPY_SCALAR_FIELD(winagg);
     205        8840 :     COPY_SCALAR_FIELD(ignore_nulls);
     206        8840 :     COPY_LOCATION_FIELD(location);
     207             : 
     208        8840 :     return newnode;
     209             : }
     210             : 
     211             : static WindowFuncRunCondition *
     212         540 : _copyWindowFuncRunCondition(const WindowFuncRunCondition *from)
     213             : {
     214         540 :     WindowFuncRunCondition *newnode = makeNode(WindowFuncRunCondition);
     215             : 
     216         540 :     COPY_SCALAR_FIELD(opno);
     217         540 :     COPY_SCALAR_FIELD(inputcollid);
     218         540 :     COPY_SCALAR_FIELD(wfunc_left);
     219         540 :     COPY_NODE_FIELD(arg);
     220             : 
     221         540 :     return newnode;
     222             : }
     223             : 
     224             : static MergeSupportFunc *
     225        2298 : _copyMergeSupportFunc(const MergeSupportFunc *from)
     226             : {
     227        2298 :     MergeSupportFunc *newnode = makeNode(MergeSupportFunc);
     228             : 
     229        2298 :     COPY_SCALAR_FIELD(msftype);
     230        2298 :     COPY_SCALAR_FIELD(msfcollid);
     231        2298 :     COPY_LOCATION_FIELD(location);
     232             : 
     233        2298 :     return newnode;
     234             : }
     235             : 
     236             : static SubscriptingRef *
     237       57276 : _copySubscriptingRef(const SubscriptingRef *from)
     238             : {
     239       57276 :     SubscriptingRef *newnode = makeNode(SubscriptingRef);
     240             : 
     241       57276 :     COPY_SCALAR_FIELD(refcontainertype);
     242       57276 :     COPY_SCALAR_FIELD(refelemtype);
     243       57276 :     COPY_SCALAR_FIELD(refrestype);
     244       57276 :     COPY_SCALAR_FIELD(reftypmod);
     245       57276 :     COPY_SCALAR_FIELD(refcollid);
     246       57276 :     COPY_NODE_FIELD(refupperindexpr);
     247       57276 :     COPY_NODE_FIELD(reflowerindexpr);
     248       57276 :     COPY_NODE_FIELD(refexpr);
     249       57276 :     COPY_NODE_FIELD(refassgnexpr);
     250             : 
     251       57276 :     return newnode;
     252             : }
     253             : 
     254             : static FuncExpr *
     255     1004766 : _copyFuncExpr(const FuncExpr *from)
     256             : {
     257     1004766 :     FuncExpr *newnode = makeNode(FuncExpr);
     258             : 
     259     1004766 :     COPY_SCALAR_FIELD(funcid);
     260     1004766 :     COPY_SCALAR_FIELD(funcresulttype);
     261     1004766 :     COPY_SCALAR_FIELD(funcretset);
     262     1004766 :     COPY_SCALAR_FIELD(funcvariadic);
     263     1004766 :     COPY_SCALAR_FIELD(funcformat);
     264     1004766 :     COPY_SCALAR_FIELD(funccollid);
     265     1004766 :     COPY_SCALAR_FIELD(inputcollid);
     266     1004766 :     COPY_NODE_FIELD(args);
     267     1004766 :     COPY_LOCATION_FIELD(location);
     268             : 
     269     1004766 :     return newnode;
     270             : }
     271             : 
     272             : static NamedArgExpr *
     273       94686 : _copyNamedArgExpr(const NamedArgExpr *from)
     274             : {
     275       94686 :     NamedArgExpr *newnode = makeNode(NamedArgExpr);
     276             : 
     277       94686 :     COPY_NODE_FIELD(arg);
     278       94686 :     COPY_STRING_FIELD(name);
     279       94686 :     COPY_SCALAR_FIELD(argnumber);
     280       94686 :     COPY_LOCATION_FIELD(location);
     281             : 
     282       94686 :     return newnode;
     283             : }
     284             : 
     285             : static OpExpr *
     286     2020246 : _copyOpExpr(const OpExpr *from)
     287             : {
     288     2020246 :     OpExpr *newnode = makeNode(OpExpr);
     289             : 
     290     2020246 :     COPY_SCALAR_FIELD(opno);
     291     2020246 :     COPY_SCALAR_FIELD(opfuncid);
     292     2020246 :     COPY_SCALAR_FIELD(opresulttype);
     293     2020246 :     COPY_SCALAR_FIELD(opretset);
     294     2020246 :     COPY_SCALAR_FIELD(opcollid);
     295     2020246 :     COPY_SCALAR_FIELD(inputcollid);
     296     2020246 :     COPY_NODE_FIELD(args);
     297     2020246 :     COPY_LOCATION_FIELD(location);
     298             : 
     299     2020246 :     return newnode;
     300             : }
     301             : 
     302             : static DistinctExpr *
     303        2442 : _copyDistinctExpr(const DistinctExpr *from)
     304             : {
     305        2442 :     DistinctExpr *newnode = makeNode(DistinctExpr);
     306             : 
     307        2442 :     COPY_SCALAR_FIELD(opno);
     308        2442 :     COPY_SCALAR_FIELD(opfuncid);
     309        2442 :     COPY_SCALAR_FIELD(opresulttype);
     310        2442 :     COPY_SCALAR_FIELD(opretset);
     311        2442 :     COPY_SCALAR_FIELD(opcollid);
     312        2442 :     COPY_SCALAR_FIELD(inputcollid);
     313        2442 :     COPY_NODE_FIELD(args);
     314        2442 :     COPY_LOCATION_FIELD(location);
     315             : 
     316        2442 :     return newnode;
     317             : }
     318             : 
     319             : static NullIfExpr *
     320         384 : _copyNullIfExpr(const NullIfExpr *from)
     321             : {
     322         384 :     NullIfExpr *newnode = makeNode(NullIfExpr);
     323             : 
     324         384 :     COPY_SCALAR_FIELD(opno);
     325         384 :     COPY_SCALAR_FIELD(opfuncid);
     326         384 :     COPY_SCALAR_FIELD(opresulttype);
     327         384 :     COPY_SCALAR_FIELD(opretset);
     328         384 :     COPY_SCALAR_FIELD(opcollid);
     329         384 :     COPY_SCALAR_FIELD(inputcollid);
     330         384 :     COPY_NODE_FIELD(args);
     331         384 :     COPY_LOCATION_FIELD(location);
     332             : 
     333         384 :     return newnode;
     334             : }
     335             : 
     336             : static ScalarArrayOpExpr *
     337       95114 : _copyScalarArrayOpExpr(const ScalarArrayOpExpr *from)
     338             : {
     339       95114 :     ScalarArrayOpExpr *newnode = makeNode(ScalarArrayOpExpr);
     340             : 
     341       95114 :     COPY_SCALAR_FIELD(opno);
     342       95114 :     COPY_SCALAR_FIELD(opfuncid);
     343       95114 :     COPY_SCALAR_FIELD(hashfuncid);
     344       95114 :     COPY_SCALAR_FIELD(negfuncid);
     345       95114 :     COPY_SCALAR_FIELD(useOr);
     346       95114 :     COPY_SCALAR_FIELD(inputcollid);
     347       95114 :     COPY_NODE_FIELD(args);
     348       95114 :     COPY_LOCATION_FIELD(location);
     349             : 
     350       95114 :     return newnode;
     351             : }
     352             : 
     353             : static BoolExpr *
     354      491592 : _copyBoolExpr(const BoolExpr *from)
     355             : {
     356      491592 :     BoolExpr *newnode = makeNode(BoolExpr);
     357             : 
     358      491592 :     COPY_SCALAR_FIELD(boolop);
     359      491592 :     COPY_NODE_FIELD(args);
     360      491592 :     COPY_LOCATION_FIELD(location);
     361             : 
     362      491592 :     return newnode;
     363             : }
     364             : 
     365             : static SubLink *
     366      117134 : _copySubLink(const SubLink *from)
     367             : {
     368      117134 :     SubLink *newnode = makeNode(SubLink);
     369             : 
     370      117134 :     COPY_SCALAR_FIELD(subLinkType);
     371      117134 :     COPY_SCALAR_FIELD(subLinkId);
     372      117134 :     COPY_NODE_FIELD(testexpr);
     373      117134 :     COPY_NODE_FIELD(operName);
     374      117134 :     COPY_NODE_FIELD(subselect);
     375      117134 :     COPY_LOCATION_FIELD(location);
     376             : 
     377      117134 :     return newnode;
     378             : }
     379             : 
     380             : static SubPlan *
     381       48686 : _copySubPlan(const SubPlan *from)
     382             : {
     383       48686 :     SubPlan *newnode = makeNode(SubPlan);
     384             : 
     385       48686 :     COPY_SCALAR_FIELD(subLinkType);
     386       48686 :     COPY_NODE_FIELD(testexpr);
     387       48686 :     COPY_NODE_FIELD(paramIds);
     388       48686 :     COPY_SCALAR_FIELD(plan_id);
     389       48686 :     COPY_STRING_FIELD(plan_name);
     390       48686 :     COPY_SCALAR_FIELD(firstColType);
     391       48686 :     COPY_SCALAR_FIELD(firstColTypmod);
     392       48686 :     COPY_SCALAR_FIELD(firstColCollation);
     393       48686 :     COPY_SCALAR_FIELD(isInitPlan);
     394       48686 :     COPY_SCALAR_FIELD(useHashTable);
     395       48686 :     COPY_SCALAR_FIELD(unknownEqFalse);
     396       48686 :     COPY_SCALAR_FIELD(parallel_safe);
     397       48686 :     COPY_NODE_FIELD(setParam);
     398       48686 :     COPY_NODE_FIELD(parParam);
     399       48686 :     COPY_NODE_FIELD(args);
     400       48686 :     COPY_SCALAR_FIELD(startup_cost);
     401       48686 :     COPY_SCALAR_FIELD(per_call_cost);
     402             : 
     403       48686 :     return newnode;
     404             : }
     405             : 
     406             : static AlternativeSubPlan *
     407           0 : _copyAlternativeSubPlan(const AlternativeSubPlan *from)
     408             : {
     409           0 :     AlternativeSubPlan *newnode = makeNode(AlternativeSubPlan);
     410             : 
     411           0 :     COPY_NODE_FIELD(subplans);
     412             : 
     413           0 :     return newnode;
     414             : }
     415             : 
     416             : static FieldSelect *
     417       16888 : _copyFieldSelect(const FieldSelect *from)
     418             : {
     419       16888 :     FieldSelect *newnode = makeNode(FieldSelect);
     420             : 
     421       16888 :     COPY_NODE_FIELD(arg);
     422       16888 :     COPY_SCALAR_FIELD(fieldnum);
     423       16888 :     COPY_SCALAR_FIELD(resulttype);
     424       16888 :     COPY_SCALAR_FIELD(resulttypmod);
     425       16888 :     COPY_SCALAR_FIELD(resultcollid);
     426             : 
     427       16888 :     return newnode;
     428             : }
     429             : 
     430             : static FieldStore *
     431         800 : _copyFieldStore(const FieldStore *from)
     432             : {
     433         800 :     FieldStore *newnode = makeNode(FieldStore);
     434             : 
     435         800 :     COPY_NODE_FIELD(arg);
     436         800 :     COPY_NODE_FIELD(newvals);
     437         800 :     COPY_NODE_FIELD(fieldnums);
     438         800 :     COPY_SCALAR_FIELD(resulttype);
     439             : 
     440         800 :     return newnode;
     441             : }
     442             : 
     443             : static RelabelType *
     444      357544 : _copyRelabelType(const RelabelType *from)
     445             : {
     446      357544 :     RelabelType *newnode = makeNode(RelabelType);
     447             : 
     448      357544 :     COPY_NODE_FIELD(arg);
     449      357544 :     COPY_SCALAR_FIELD(resulttype);
     450      357544 :     COPY_SCALAR_FIELD(resulttypmod);
     451      357544 :     COPY_SCALAR_FIELD(resultcollid);
     452      357544 :     COPY_SCALAR_FIELD(relabelformat);
     453      357544 :     COPY_LOCATION_FIELD(location);
     454             : 
     455      357544 :     return newnode;
     456             : }
     457             : 
     458             : static CoerceViaIO *
     459       74374 : _copyCoerceViaIO(const CoerceViaIO *from)
     460             : {
     461       74374 :     CoerceViaIO *newnode = makeNode(CoerceViaIO);
     462             : 
     463       74374 :     COPY_NODE_FIELD(arg);
     464       74374 :     COPY_SCALAR_FIELD(resulttype);
     465       74374 :     COPY_SCALAR_FIELD(resultcollid);
     466       74374 :     COPY_SCALAR_FIELD(coerceformat);
     467       74374 :     COPY_LOCATION_FIELD(location);
     468             : 
     469       74374 :     return newnode;
     470             : }
     471             : 
     472             : static ArrayCoerceExpr *
     473       14486 : _copyArrayCoerceExpr(const ArrayCoerceExpr *from)
     474             : {
     475       14486 :     ArrayCoerceExpr *newnode = makeNode(ArrayCoerceExpr);
     476             : 
     477       14486 :     COPY_NODE_FIELD(arg);
     478       14486 :     COPY_NODE_FIELD(elemexpr);
     479       14486 :     COPY_SCALAR_FIELD(resulttype);
     480       14486 :     COPY_SCALAR_FIELD(resulttypmod);
     481       14486 :     COPY_SCALAR_FIELD(resultcollid);
     482       14486 :     COPY_SCALAR_FIELD(coerceformat);
     483       14486 :     COPY_LOCATION_FIELD(location);
     484             : 
     485       14486 :     return newnode;
     486             : }
     487             : 
     488             : static ConvertRowtypeExpr *
     489        1016 : _copyConvertRowtypeExpr(const ConvertRowtypeExpr *from)
     490             : {
     491        1016 :     ConvertRowtypeExpr *newnode = makeNode(ConvertRowtypeExpr);
     492             : 
     493        1016 :     COPY_NODE_FIELD(arg);
     494        1016 :     COPY_SCALAR_FIELD(resulttype);
     495        1016 :     COPY_SCALAR_FIELD(convertformat);
     496        1016 :     COPY_LOCATION_FIELD(location);
     497             : 
     498        1016 :     return newnode;
     499             : }
     500             : 
     501             : static CollateExpr *
     502        9502 : _copyCollateExpr(const CollateExpr *from)
     503             : {
     504        9502 :     CollateExpr *newnode = makeNode(CollateExpr);
     505             : 
     506        9502 :     COPY_NODE_FIELD(arg);
     507        9502 :     COPY_SCALAR_FIELD(collOid);
     508        9502 :     COPY_LOCATION_FIELD(location);
     509             : 
     510        9502 :     return newnode;
     511             : }
     512             : 
     513             : static CaseExpr *
     514      165422 : _copyCaseExpr(const CaseExpr *from)
     515             : {
     516      165422 :     CaseExpr *newnode = makeNode(CaseExpr);
     517             : 
     518      165422 :     COPY_SCALAR_FIELD(casetype);
     519      165422 :     COPY_SCALAR_FIELD(casecollid);
     520      165422 :     COPY_NODE_FIELD(arg);
     521      165422 :     COPY_NODE_FIELD(args);
     522      165422 :     COPY_NODE_FIELD(defresult);
     523      165422 :     COPY_LOCATION_FIELD(location);
     524             : 
     525      165422 :     return newnode;
     526             : }
     527             : 
     528             : static CaseWhen *
     529      335458 : _copyCaseWhen(const CaseWhen *from)
     530             : {
     531      335458 :     CaseWhen *newnode = makeNode(CaseWhen);
     532             : 
     533      335458 :     COPY_NODE_FIELD(expr);
     534      335458 :     COPY_NODE_FIELD(result);
     535      335458 :     COPY_LOCATION_FIELD(location);
     536             : 
     537      335458 :     return newnode;
     538             : }
     539             : 
     540             : static CaseTestExpr *
     541      129578 : _copyCaseTestExpr(const CaseTestExpr *from)
     542             : {
     543      129578 :     CaseTestExpr *newnode = makeNode(CaseTestExpr);
     544             : 
     545      129578 :     COPY_SCALAR_FIELD(typeId);
     546      129578 :     COPY_SCALAR_FIELD(typeMod);
     547      129578 :     COPY_SCALAR_FIELD(collation);
     548             : 
     549      129578 :     return newnode;
     550             : }
     551             : 
     552             : static ArrayExpr *
     553       51496 : _copyArrayExpr(const ArrayExpr *from)
     554             : {
     555       51496 :     ArrayExpr *newnode = makeNode(ArrayExpr);
     556             : 
     557       51496 :     COPY_SCALAR_FIELD(array_typeid);
     558       51496 :     COPY_SCALAR_FIELD(array_collid);
     559       51496 :     COPY_SCALAR_FIELD(element_typeid);
     560       51496 :     COPY_NODE_FIELD(elements);
     561       51496 :     COPY_SCALAR_FIELD(multidims);
     562       51496 :     COPY_LOCATION_FIELD(list_start);
     563       51496 :     COPY_LOCATION_FIELD(list_end);
     564       51496 :     COPY_LOCATION_FIELD(location);
     565             : 
     566       51496 :     return newnode;
     567             : }
     568             : 
     569             : static RowExpr *
     570       17392 : _copyRowExpr(const RowExpr *from)
     571             : {
     572       17392 :     RowExpr *newnode = makeNode(RowExpr);
     573             : 
     574       17392 :     COPY_NODE_FIELD(args);
     575       17392 :     COPY_SCALAR_FIELD(row_typeid);
     576       17392 :     COPY_SCALAR_FIELD(row_format);
     577       17392 :     COPY_NODE_FIELD(colnames);
     578       17392 :     COPY_LOCATION_FIELD(location);
     579             : 
     580       17392 :     return newnode;
     581             : }
     582             : 
     583             : static RowCompareExpr *
     584         708 : _copyRowCompareExpr(const RowCompareExpr *from)
     585             : {
     586         708 :     RowCompareExpr *newnode = makeNode(RowCompareExpr);
     587             : 
     588         708 :     COPY_SCALAR_FIELD(cmptype);
     589         708 :     COPY_NODE_FIELD(opnos);
     590         708 :     COPY_NODE_FIELD(opfamilies);
     591         708 :     COPY_NODE_FIELD(inputcollids);
     592         708 :     COPY_NODE_FIELD(largs);
     593         708 :     COPY_NODE_FIELD(rargs);
     594             : 
     595         708 :     return newnode;
     596             : }
     597             : 
     598             : static CoalesceExpr *
     599       22308 : _copyCoalesceExpr(const CoalesceExpr *from)
     600             : {
     601       22308 :     CoalesceExpr *newnode = makeNode(CoalesceExpr);
     602             : 
     603       22308 :     COPY_SCALAR_FIELD(coalescetype);
     604       22308 :     COPY_SCALAR_FIELD(coalescecollid);
     605       22308 :     COPY_NODE_FIELD(args);
     606       22308 :     COPY_LOCATION_FIELD(location);
     607             : 
     608       22308 :     return newnode;
     609             : }
     610             : 
     611             : static MinMaxExpr *
     612        1818 : _copyMinMaxExpr(const MinMaxExpr *from)
     613             : {
     614        1818 :     MinMaxExpr *newnode = makeNode(MinMaxExpr);
     615             : 
     616        1818 :     COPY_SCALAR_FIELD(minmaxtype);
     617        1818 :     COPY_SCALAR_FIELD(minmaxcollid);
     618        1818 :     COPY_SCALAR_FIELD(inputcollid);
     619        1818 :     COPY_SCALAR_FIELD(op);
     620        1818 :     COPY_NODE_FIELD(args);
     621        1818 :     COPY_LOCATION_FIELD(location);
     622             : 
     623        1818 :     return newnode;
     624             : }
     625             : 
     626             : static SQLValueFunction *
     627       30202 : _copySQLValueFunction(const SQLValueFunction *from)
     628             : {
     629       30202 :     SQLValueFunction *newnode = makeNode(SQLValueFunction);
     630             : 
     631       30202 :     COPY_SCALAR_FIELD(op);
     632       30202 :     COPY_SCALAR_FIELD(type);
     633       30202 :     COPY_SCALAR_FIELD(typmod);
     634       30202 :     COPY_LOCATION_FIELD(location);
     635             : 
     636       30202 :     return newnode;
     637             : }
     638             : 
     639             : static XmlExpr *
     640        2278 : _copyXmlExpr(const XmlExpr *from)
     641             : {
     642        2278 :     XmlExpr *newnode = makeNode(XmlExpr);
     643             : 
     644        2278 :     COPY_SCALAR_FIELD(op);
     645        2278 :     COPY_STRING_FIELD(name);
     646        2278 :     COPY_NODE_FIELD(named_args);
     647        2278 :     COPY_NODE_FIELD(arg_names);
     648        2278 :     COPY_NODE_FIELD(args);
     649        2278 :     COPY_SCALAR_FIELD(xmloption);
     650        2278 :     COPY_SCALAR_FIELD(indent);
     651        2278 :     COPY_SCALAR_FIELD(type);
     652        2278 :     COPY_SCALAR_FIELD(typmod);
     653        2278 :     COPY_LOCATION_FIELD(location);
     654             : 
     655        2278 :     return newnode;
     656             : }
     657             : 
     658             : static JsonFormat *
     659       29076 : _copyJsonFormat(const JsonFormat *from)
     660             : {
     661       29076 :     JsonFormat *newnode = makeNode(JsonFormat);
     662             : 
     663       29076 :     COPY_SCALAR_FIELD(format_type);
     664       29076 :     COPY_SCALAR_FIELD(encoding);
     665       29076 :     COPY_LOCATION_FIELD(location);
     666             : 
     667       29076 :     return newnode;
     668             : }
     669             : 
     670             : static JsonReturning *
     671       12212 : _copyJsonReturning(const JsonReturning *from)
     672             : {
     673       12212 :     JsonReturning *newnode = makeNode(JsonReturning);
     674             : 
     675       12212 :     COPY_NODE_FIELD(format);
     676       12212 :     COPY_SCALAR_FIELD(typid);
     677       12212 :     COPY_SCALAR_FIELD(typmod);
     678             : 
     679       12212 :     return newnode;
     680             : }
     681             : 
     682             : static JsonValueExpr *
     683        6888 : _copyJsonValueExpr(const JsonValueExpr *from)
     684             : {
     685        6888 :     JsonValueExpr *newnode = makeNode(JsonValueExpr);
     686             : 
     687        6888 :     COPY_NODE_FIELD(raw_expr);
     688        6888 :     COPY_NODE_FIELD(formatted_expr);
     689        6888 :     COPY_NODE_FIELD(format);
     690             : 
     691        6888 :     return newnode;
     692             : }
     693             : 
     694             : static JsonConstructorExpr *
     695        2864 : _copyJsonConstructorExpr(const JsonConstructorExpr *from)
     696             : {
     697        2864 :     JsonConstructorExpr *newnode = makeNode(JsonConstructorExpr);
     698             : 
     699        2864 :     COPY_SCALAR_FIELD(type);
     700        2864 :     COPY_NODE_FIELD(args);
     701        2864 :     COPY_NODE_FIELD(func);
     702        2864 :     COPY_NODE_FIELD(coercion);
     703        2864 :     COPY_NODE_FIELD(returning);
     704        2864 :     COPY_SCALAR_FIELD(absent_on_null);
     705        2864 :     COPY_SCALAR_FIELD(unique);
     706        2864 :     COPY_LOCATION_FIELD(location);
     707             : 
     708        2864 :     return newnode;
     709             : }
     710             : 
     711             : static JsonIsPredicate *
     712        1026 : _copyJsonIsPredicate(const JsonIsPredicate *from)
     713             : {
     714        1026 :     JsonIsPredicate *newnode = makeNode(JsonIsPredicate);
     715             : 
     716        1026 :     COPY_NODE_FIELD(expr);
     717        1026 :     COPY_NODE_FIELD(format);
     718        1026 :     COPY_SCALAR_FIELD(item_type);
     719        1026 :     COPY_SCALAR_FIELD(unique_keys);
     720        1026 :     COPY_LOCATION_FIELD(location);
     721             : 
     722        1026 :     return newnode;
     723             : }
     724             : 
     725             : static JsonBehavior *
     726       10566 : _copyJsonBehavior(const JsonBehavior *from)
     727             : {
     728       10566 :     JsonBehavior *newnode = makeNode(JsonBehavior);
     729             : 
     730       10566 :     COPY_SCALAR_FIELD(btype);
     731       10566 :     COPY_NODE_FIELD(expr);
     732       10566 :     COPY_SCALAR_FIELD(coerce);
     733       10566 :     COPY_LOCATION_FIELD(location);
     734             : 
     735       10566 :     return newnode;
     736             : }
     737             : 
     738             : static JsonExpr *
     739        5402 : _copyJsonExpr(const JsonExpr *from)
     740             : {
     741        5402 :     JsonExpr *newnode = makeNode(JsonExpr);
     742             : 
     743        5402 :     COPY_SCALAR_FIELD(op);
     744        5402 :     COPY_STRING_FIELD(column_name);
     745        5402 :     COPY_NODE_FIELD(formatted_expr);
     746        5402 :     COPY_NODE_FIELD(format);
     747        5402 :     COPY_NODE_FIELD(path_spec);
     748        5402 :     COPY_NODE_FIELD(returning);
     749        5402 :     COPY_NODE_FIELD(passing_names);
     750        5402 :     COPY_NODE_FIELD(passing_values);
     751        5402 :     COPY_NODE_FIELD(on_empty);
     752        5402 :     COPY_NODE_FIELD(on_error);
     753        5402 :     COPY_SCALAR_FIELD(use_io_coercion);
     754        5402 :     COPY_SCALAR_FIELD(use_json_coercion);
     755        5402 :     COPY_SCALAR_FIELD(wrapper);
     756        5402 :     COPY_SCALAR_FIELD(omit_quotes);
     757        5402 :     COPY_SCALAR_FIELD(collation);
     758        5402 :     COPY_LOCATION_FIELD(location);
     759             : 
     760        5402 :     return newnode;
     761             : }
     762             : 
     763             : static JsonTablePath *
     764        1214 : _copyJsonTablePath(const JsonTablePath *from)
     765             : {
     766        1214 :     JsonTablePath *newnode = makeNode(JsonTablePath);
     767             : 
     768        1214 :     COPY_NODE_FIELD(value);
     769        1214 :     COPY_STRING_FIELD(name);
     770             : 
     771        1214 :     return newnode;
     772             : }
     773             : 
     774             : static JsonTablePathScan *
     775        1214 : _copyJsonTablePathScan(const JsonTablePathScan *from)
     776             : {
     777        1214 :     JsonTablePathScan *newnode = makeNode(JsonTablePathScan);
     778             : 
     779        1214 :     COPY_NODE_FIELD(path);
     780        1214 :     COPY_SCALAR_FIELD(errorOnError);
     781        1214 :     COPY_NODE_FIELD(child);
     782        1214 :     COPY_SCALAR_FIELD(colMin);
     783        1214 :     COPY_SCALAR_FIELD(colMax);
     784             : 
     785        1214 :     return newnode;
     786             : }
     787             : 
     788             : static JsonTableSiblingJoin *
     789         120 : _copyJsonTableSiblingJoin(const JsonTableSiblingJoin *from)
     790             : {
     791         120 :     JsonTableSiblingJoin *newnode = makeNode(JsonTableSiblingJoin);
     792             : 
     793         120 :     COPY_NODE_FIELD(lplan);
     794         120 :     COPY_NODE_FIELD(rplan);
     795             : 
     796         120 :     return newnode;
     797             : }
     798             : 
     799             : static NullTest *
     800       88286 : _copyNullTest(const NullTest *from)
     801             : {
     802       88286 :     NullTest *newnode = makeNode(NullTest);
     803             : 
     804       88286 :     COPY_NODE_FIELD(arg);
     805       88286 :     COPY_SCALAR_FIELD(nulltesttype);
     806       88286 :     COPY_SCALAR_FIELD(argisrow);
     807       88286 :     COPY_LOCATION_FIELD(location);
     808             : 
     809       88286 :     return newnode;
     810             : }
     811             : 
     812             : static BooleanTest *
     813        4288 : _copyBooleanTest(const BooleanTest *from)
     814             : {
     815        4288 :     BooleanTest *newnode = makeNode(BooleanTest);
     816             : 
     817        4288 :     COPY_NODE_FIELD(arg);
     818        4288 :     COPY_SCALAR_FIELD(booltesttype);
     819        4288 :     COPY_LOCATION_FIELD(location);
     820             : 
     821        4288 :     return newnode;
     822             : }
     823             : 
     824             : static MergeAction *
     825        8922 : _copyMergeAction(const MergeAction *from)
     826             : {
     827        8922 :     MergeAction *newnode = makeNode(MergeAction);
     828             : 
     829        8922 :     COPY_SCALAR_FIELD(matchKind);
     830        8922 :     COPY_SCALAR_FIELD(commandType);
     831        8922 :     COPY_SCALAR_FIELD(override);
     832        8922 :     COPY_NODE_FIELD(qual);
     833        8922 :     COPY_NODE_FIELD(targetList);
     834        8922 :     COPY_NODE_FIELD(updateColnos);
     835             : 
     836        8922 :     return newnode;
     837             : }
     838             : 
     839             : static CoerceToDomain *
     840       81432 : _copyCoerceToDomain(const CoerceToDomain *from)
     841             : {
     842       81432 :     CoerceToDomain *newnode = makeNode(CoerceToDomain);
     843             : 
     844       81432 :     COPY_NODE_FIELD(arg);
     845       81432 :     COPY_SCALAR_FIELD(resulttype);
     846       81432 :     COPY_SCALAR_FIELD(resulttypmod);
     847       81432 :     COPY_SCALAR_FIELD(resultcollid);
     848       81432 :     COPY_SCALAR_FIELD(coercionformat);
     849       81432 :     COPY_LOCATION_FIELD(location);
     850             : 
     851       81432 :     return newnode;
     852             : }
     853             : 
     854             : static CoerceToDomainValue *
     855        3686 : _copyCoerceToDomainValue(const CoerceToDomainValue *from)
     856             : {
     857        3686 :     CoerceToDomainValue *newnode = makeNode(CoerceToDomainValue);
     858             : 
     859        3686 :     COPY_SCALAR_FIELD(typeId);
     860        3686 :     COPY_SCALAR_FIELD(typeMod);
     861        3686 :     COPY_SCALAR_FIELD(collation);
     862        3686 :     COPY_LOCATION_FIELD(location);
     863             : 
     864        3686 :     return newnode;
     865             : }
     866             : 
     867             : static SetToDefault *
     868        1980 : _copySetToDefault(const SetToDefault *from)
     869             : {
     870        1980 :     SetToDefault *newnode = makeNode(SetToDefault);
     871             : 
     872        1980 :     COPY_SCALAR_FIELD(typeId);
     873        1980 :     COPY_SCALAR_FIELD(typeMod);
     874        1980 :     COPY_SCALAR_FIELD(collation);
     875        1980 :     COPY_LOCATION_FIELD(location);
     876             : 
     877        1980 :     return newnode;
     878             : }
     879             : 
     880             : static CurrentOfExpr *
     881        1752 : _copyCurrentOfExpr(const CurrentOfExpr *from)
     882             : {
     883        1752 :     CurrentOfExpr *newnode = makeNode(CurrentOfExpr);
     884             : 
     885        1752 :     COPY_SCALAR_FIELD(cvarno);
     886        1752 :     COPY_STRING_FIELD(cursor_name);
     887        1752 :     COPY_SCALAR_FIELD(cursor_param);
     888             : 
     889        1752 :     return newnode;
     890             : }
     891             : 
     892             : static NextValueExpr *
     893        1354 : _copyNextValueExpr(const NextValueExpr *from)
     894             : {
     895        1354 :     NextValueExpr *newnode = makeNode(NextValueExpr);
     896             : 
     897        1354 :     COPY_SCALAR_FIELD(seqid);
     898        1354 :     COPY_SCALAR_FIELD(typeId);
     899             : 
     900        1354 :     return newnode;
     901             : }
     902             : 
     903             : static InferenceElem *
     904        1926 : _copyInferenceElem(const InferenceElem *from)
     905             : {
     906        1926 :     InferenceElem *newnode = makeNode(InferenceElem);
     907             : 
     908        1926 :     COPY_NODE_FIELD(expr);
     909        1926 :     COPY_SCALAR_FIELD(infercollid);
     910        1926 :     COPY_SCALAR_FIELD(inferopclass);
     911             : 
     912        1926 :     return newnode;
     913             : }
     914             : 
     915             : static ReturningExpr *
     916        1824 : _copyReturningExpr(const ReturningExpr *from)
     917             : {
     918        1824 :     ReturningExpr *newnode = makeNode(ReturningExpr);
     919             : 
     920        1824 :     COPY_SCALAR_FIELD(retlevelsup);
     921        1824 :     COPY_SCALAR_FIELD(retold);
     922        1824 :     COPY_NODE_FIELD(retexpr);
     923             : 
     924        1824 :     return newnode;
     925             : }
     926             : 
     927             : static TargetEntry *
     928     8759536 : _copyTargetEntry(const TargetEntry *from)
     929             : {
     930     8759536 :     TargetEntry *newnode = makeNode(TargetEntry);
     931             : 
     932     8759536 :     COPY_NODE_FIELD(expr);
     933     8759536 :     COPY_SCALAR_FIELD(resno);
     934     8759536 :     COPY_STRING_FIELD(resname);
     935     8759536 :     COPY_SCALAR_FIELD(ressortgroupref);
     936     8759536 :     COPY_SCALAR_FIELD(resorigtbl);
     937     8759536 :     COPY_SCALAR_FIELD(resorigcol);
     938     8759536 :     COPY_SCALAR_FIELD(resjunk);
     939             : 
     940     8759536 :     return newnode;
     941             : }
     942             : 
     943             : static RangeTblRef *
     944      902568 : _copyRangeTblRef(const RangeTblRef *from)
     945             : {
     946      902568 :     RangeTblRef *newnode = makeNode(RangeTblRef);
     947             : 
     948      902568 :     COPY_SCALAR_FIELD(rtindex);
     949             : 
     950      902568 :     return newnode;
     951             : }
     952             : 
     953             : static JoinExpr *
     954      258848 : _copyJoinExpr(const JoinExpr *from)
     955             : {
     956      258848 :     JoinExpr *newnode = makeNode(JoinExpr);
     957             : 
     958      258848 :     COPY_SCALAR_FIELD(jointype);
     959      258848 :     COPY_SCALAR_FIELD(isNatural);
     960      258848 :     COPY_NODE_FIELD(larg);
     961      258848 :     COPY_NODE_FIELD(rarg);
     962      258848 :     COPY_NODE_FIELD(usingClause);
     963      258848 :     COPY_NODE_FIELD(join_using_alias);
     964      258848 :     COPY_NODE_FIELD(quals);
     965      258848 :     COPY_NODE_FIELD(alias);
     966      258848 :     COPY_SCALAR_FIELD(rtindex);
     967             : 
     968      258848 :     return newnode;
     969             : }
     970             : 
     971             : static FromExpr *
     972      904292 : _copyFromExpr(const FromExpr *from)
     973             : {
     974      904292 :     FromExpr *newnode = makeNode(FromExpr);
     975             : 
     976      904292 :     COPY_NODE_FIELD(fromlist);
     977      904292 :     COPY_NODE_FIELD(quals);
     978             : 
     979      904292 :     return newnode;
     980             : }
     981             : 
     982             : static OnConflictExpr *
     983        1904 : _copyOnConflictExpr(const OnConflictExpr *from)
     984             : {
     985        1904 :     OnConflictExpr *newnode = makeNode(OnConflictExpr);
     986             : 
     987        1904 :     COPY_SCALAR_FIELD(action);
     988        1904 :     COPY_NODE_FIELD(arbiterElems);
     989        1904 :     COPY_NODE_FIELD(arbiterWhere);
     990        1904 :     COPY_SCALAR_FIELD(constraint);
     991        1904 :     COPY_NODE_FIELD(onConflictSet);
     992        1904 :     COPY_NODE_FIELD(onConflictWhere);
     993        1904 :     COPY_SCALAR_FIELD(exclRelIndex);
     994        1904 :     COPY_NODE_FIELD(exclRelTlist);
     995             : 
     996        1904 :     return newnode;
     997             : }
     998             : 
     999             : static Query *
    1000     1312886 : _copyQuery(const Query *from)
    1001             : {
    1002     1312886 :     Query *newnode = makeNode(Query);
    1003             : 
    1004     1312886 :     COPY_SCALAR_FIELD(commandType);
    1005     1312886 :     COPY_SCALAR_FIELD(querySource);
    1006     1312886 :     COPY_SCALAR_FIELD(queryId);
    1007     1312886 :     COPY_SCALAR_FIELD(canSetTag);
    1008     1312886 :     COPY_NODE_FIELD(utilityStmt);
    1009     1312886 :     COPY_SCALAR_FIELD(resultRelation);
    1010     1312886 :     COPY_SCALAR_FIELD(hasAggs);
    1011     1312886 :     COPY_SCALAR_FIELD(hasWindowFuncs);
    1012     1312886 :     COPY_SCALAR_FIELD(hasTargetSRFs);
    1013     1312886 :     COPY_SCALAR_FIELD(hasSubLinks);
    1014     1312886 :     COPY_SCALAR_FIELD(hasDistinctOn);
    1015     1312886 :     COPY_SCALAR_FIELD(hasRecursive);
    1016     1312886 :     COPY_SCALAR_FIELD(hasModifyingCTE);
    1017     1312886 :     COPY_SCALAR_FIELD(hasForUpdate);
    1018     1312886 :     COPY_SCALAR_FIELD(hasRowSecurity);
    1019     1312886 :     COPY_SCALAR_FIELD(hasGroupRTE);
    1020     1312886 :     COPY_SCALAR_FIELD(isReturn);
    1021     1312886 :     COPY_NODE_FIELD(cteList);
    1022     1312886 :     COPY_NODE_FIELD(rtable);
    1023     1312886 :     COPY_NODE_FIELD(rteperminfos);
    1024     1312886 :     COPY_NODE_FIELD(jointree);
    1025     1312886 :     COPY_NODE_FIELD(mergeActionList);
    1026     1312886 :     COPY_SCALAR_FIELD(mergeTargetRelation);
    1027     1312886 :     COPY_NODE_FIELD(mergeJoinCondition);
    1028     1312886 :     COPY_NODE_FIELD(targetList);
    1029     1312886 :     COPY_SCALAR_FIELD(override);
    1030     1312886 :     COPY_NODE_FIELD(onConflict);
    1031     1312886 :     COPY_STRING_FIELD(returningOldAlias);
    1032     1312886 :     COPY_STRING_FIELD(returningNewAlias);
    1033     1312886 :     COPY_NODE_FIELD(returningList);
    1034     1312886 :     COPY_NODE_FIELD(groupClause);
    1035     1312886 :     COPY_SCALAR_FIELD(groupDistinct);
    1036     1312886 :     COPY_SCALAR_FIELD(groupByAll);
    1037     1312886 :     COPY_NODE_FIELD(groupingSets);
    1038     1312886 :     COPY_NODE_FIELD(havingQual);
    1039     1312886 :     COPY_NODE_FIELD(windowClause);
    1040     1312886 :     COPY_NODE_FIELD(distinctClause);
    1041     1312886 :     COPY_NODE_FIELD(sortClause);
    1042     1312886 :     COPY_NODE_FIELD(limitOffset);
    1043     1312886 :     COPY_NODE_FIELD(limitCount);
    1044     1312886 :     COPY_SCALAR_FIELD(limitOption);
    1045     1312886 :     COPY_NODE_FIELD(rowMarks);
    1046     1312886 :     COPY_NODE_FIELD(setOperations);
    1047     1312886 :     COPY_NODE_FIELD(constraintDeps);
    1048     1312886 :     COPY_NODE_FIELD(withCheckOptions);
    1049     1312886 :     COPY_LOCATION_FIELD(stmt_location);
    1050     1312886 :     COPY_LOCATION_FIELD(stmt_len);
    1051             : 
    1052     1312886 :     return newnode;
    1053             : }
    1054             : 
    1055             : static TypeName *
    1056      875640 : _copyTypeName(const TypeName *from)
    1057             : {
    1058      875640 :     TypeName *newnode = makeNode(TypeName);
    1059             : 
    1060      875640 :     COPY_NODE_FIELD(names);
    1061      875640 :     COPY_SCALAR_FIELD(typeOid);
    1062      875640 :     COPY_SCALAR_FIELD(setof);
    1063      875640 :     COPY_SCALAR_FIELD(pct_type);
    1064      875640 :     COPY_NODE_FIELD(typmods);
    1065      875640 :     COPY_SCALAR_FIELD(typemod);
    1066      875640 :     COPY_NODE_FIELD(arrayBounds);
    1067      875640 :     COPY_LOCATION_FIELD(location);
    1068             : 
    1069      875640 :     return newnode;
    1070             : }
    1071             : 
    1072             : static ColumnRef *
    1073     2197584 : _copyColumnRef(const ColumnRef *from)
    1074             : {
    1075     2197584 :     ColumnRef *newnode = makeNode(ColumnRef);
    1076             : 
    1077     2197584 :     COPY_NODE_FIELD(fields);
    1078     2197584 :     COPY_LOCATION_FIELD(location);
    1079             : 
    1080     2197584 :     return newnode;
    1081             : }
    1082             : 
    1083             : static ParamRef *
    1084       81244 : _copyParamRef(const ParamRef *from)
    1085             : {
    1086       81244 :     ParamRef *newnode = makeNode(ParamRef);
    1087             : 
    1088       81244 :     COPY_SCALAR_FIELD(number);
    1089       81244 :     COPY_LOCATION_FIELD(location);
    1090             : 
    1091       81244 :     return newnode;
    1092             : }
    1093             : 
    1094             : static A_Expr *
    1095      703176 : _copyA_Expr(const A_Expr *from)
    1096             : {
    1097      703176 :     A_Expr *newnode = makeNode(A_Expr);
    1098             : 
    1099      703176 :     COPY_SCALAR_FIELD(kind);
    1100      703176 :     COPY_NODE_FIELD(name);
    1101      703176 :     COPY_NODE_FIELD(lexpr);
    1102      703176 :     COPY_NODE_FIELD(rexpr);
    1103      703176 :     COPY_LOCATION_FIELD(rexpr_list_start);
    1104      703176 :     COPY_LOCATION_FIELD(rexpr_list_end);
    1105      703176 :     COPY_LOCATION_FIELD(location);
    1106             : 
    1107      703176 :     return newnode;
    1108             : }
    1109             : 
    1110             : static TypeCast *
    1111      389252 : _copyTypeCast(const TypeCast *from)
    1112             : {
    1113      389252 :     TypeCast *newnode = makeNode(TypeCast);
    1114             : 
    1115      389252 :     COPY_NODE_FIELD(arg);
    1116      389252 :     COPY_NODE_FIELD(typeName);
    1117      389252 :     COPY_LOCATION_FIELD(location);
    1118             : 
    1119      389252 :     return newnode;
    1120             : }
    1121             : 
    1122             : static CollateClause *
    1123       10830 : _copyCollateClause(const CollateClause *from)
    1124             : {
    1125       10830 :     CollateClause *newnode = makeNode(CollateClause);
    1126             : 
    1127       10830 :     COPY_NODE_FIELD(arg);
    1128       10830 :     COPY_NODE_FIELD(collname);
    1129       10830 :     COPY_LOCATION_FIELD(location);
    1130             : 
    1131       10830 :     return newnode;
    1132             : }
    1133             : 
    1134             : static RoleSpec *
    1135       75602 : _copyRoleSpec(const RoleSpec *from)
    1136             : {
    1137       75602 :     RoleSpec *newnode = makeNode(RoleSpec);
    1138             : 
    1139       75602 :     COPY_SCALAR_FIELD(roletype);
    1140       75602 :     COPY_STRING_FIELD(rolename);
    1141       75602 :     COPY_LOCATION_FIELD(location);
    1142             : 
    1143       75602 :     return newnode;
    1144             : }
    1145             : 
    1146             : static FuncCall *
    1147      438430 : _copyFuncCall(const FuncCall *from)
    1148             : {
    1149      438430 :     FuncCall *newnode = makeNode(FuncCall);
    1150             : 
    1151      438430 :     COPY_NODE_FIELD(funcname);
    1152      438430 :     COPY_NODE_FIELD(args);
    1153      438430 :     COPY_NODE_FIELD(agg_order);
    1154      438430 :     COPY_NODE_FIELD(agg_filter);
    1155      438430 :     COPY_NODE_FIELD(over);
    1156      438430 :     COPY_SCALAR_FIELD(ignore_nulls);
    1157      438430 :     COPY_SCALAR_FIELD(agg_within_group);
    1158      438430 :     COPY_SCALAR_FIELD(agg_star);
    1159      438430 :     COPY_SCALAR_FIELD(agg_distinct);
    1160      438430 :     COPY_SCALAR_FIELD(func_variadic);
    1161      438430 :     COPY_SCALAR_FIELD(funcformat);
    1162      438430 :     COPY_LOCATION_FIELD(location);
    1163             : 
    1164      438430 :     return newnode;
    1165             : }
    1166             : 
    1167             : static A_Star *
    1168       71766 : _copyA_Star(const A_Star *from)
    1169             : {
    1170       71766 :     A_Star *newnode = makeNode(A_Star);
    1171             : 
    1172             : 
    1173       71766 :     return newnode;
    1174             : }
    1175             : 
    1176             : static A_Indices *
    1177       16362 : _copyA_Indices(const A_Indices *from)
    1178             : {
    1179       16362 :     A_Indices *newnode = makeNode(A_Indices);
    1180             : 
    1181       16362 :     COPY_SCALAR_FIELD(is_slice);
    1182       16362 :     COPY_NODE_FIELD(lidx);
    1183       16362 :     COPY_NODE_FIELD(uidx);
    1184             : 
    1185       16362 :     return newnode;
    1186             : }
    1187             : 
    1188             : static A_Indirection *
    1189       38488 : _copyA_Indirection(const A_Indirection *from)
    1190             : {
    1191       38488 :     A_Indirection *newnode = makeNode(A_Indirection);
    1192             : 
    1193       38488 :     COPY_NODE_FIELD(arg);
    1194       38488 :     COPY_NODE_FIELD(indirection);
    1195             : 
    1196       38488 :     return newnode;
    1197             : }
    1198             : 
    1199             : static A_ArrayExpr *
    1200        8462 : _copyA_ArrayExpr(const A_ArrayExpr *from)
    1201             : {
    1202        8462 :     A_ArrayExpr *newnode = makeNode(A_ArrayExpr);
    1203             : 
    1204        8462 :     COPY_NODE_FIELD(elements);
    1205        8462 :     COPY_LOCATION_FIELD(list_start);
    1206        8462 :     COPY_LOCATION_FIELD(list_end);
    1207        8462 :     COPY_LOCATION_FIELD(location);
    1208             : 
    1209        8462 :     return newnode;
    1210             : }
    1211             : 
    1212             : static ResTarget *
    1213     1402120 : _copyResTarget(const ResTarget *from)
    1214             : {
    1215     1402120 :     ResTarget *newnode = makeNode(ResTarget);
    1216             : 
    1217     1402120 :     COPY_STRING_FIELD(name);
    1218     1402120 :     COPY_NODE_FIELD(indirection);
    1219     1402120 :     COPY_NODE_FIELD(val);
    1220     1402120 :     COPY_LOCATION_FIELD(location);
    1221             : 
    1222     1402120 :     return newnode;
    1223             : }
    1224             : 
    1225             : static MultiAssignRef *
    1226         402 : _copyMultiAssignRef(const MultiAssignRef *from)
    1227             : {
    1228         402 :     MultiAssignRef *newnode = makeNode(MultiAssignRef);
    1229             : 
    1230         402 :     COPY_NODE_FIELD(source);
    1231         402 :     COPY_SCALAR_FIELD(colno);
    1232         402 :     COPY_SCALAR_FIELD(ncolumns);
    1233             : 
    1234         402 :     return newnode;
    1235             : }
    1236             : 
    1237             : static SortBy *
    1238      112430 : _copySortBy(const SortBy *from)
    1239             : {
    1240      112430 :     SortBy *newnode = makeNode(SortBy);
    1241             : 
    1242      112430 :     COPY_NODE_FIELD(node);
    1243      112430 :     COPY_SCALAR_FIELD(sortby_dir);
    1244      112430 :     COPY_SCALAR_FIELD(sortby_nulls);
    1245      112430 :     COPY_NODE_FIELD(useOp);
    1246      112430 :     COPY_LOCATION_FIELD(location);
    1247             : 
    1248      112430 :     return newnode;
    1249             : }
    1250             : 
    1251             : static WindowDef *
    1252        4788 : _copyWindowDef(const WindowDef *from)
    1253             : {
    1254        4788 :     WindowDef *newnode = makeNode(WindowDef);
    1255             : 
    1256        4788 :     COPY_STRING_FIELD(name);
    1257        4788 :     COPY_STRING_FIELD(refname);
    1258        4788 :     COPY_NODE_FIELD(partitionClause);
    1259        4788 :     COPY_NODE_FIELD(orderClause);
    1260        4788 :     COPY_SCALAR_FIELD(frameOptions);
    1261        4788 :     COPY_NODE_FIELD(startOffset);
    1262        4788 :     COPY_NODE_FIELD(endOffset);
    1263        4788 :     COPY_LOCATION_FIELD(location);
    1264             : 
    1265        4788 :     return newnode;
    1266             : }
    1267             : 
    1268             : static RangeSubselect *
    1269       19670 : _copyRangeSubselect(const RangeSubselect *from)
    1270             : {
    1271       19670 :     RangeSubselect *newnode = makeNode(RangeSubselect);
    1272             : 
    1273       19670 :     COPY_SCALAR_FIELD(lateral);
    1274       19670 :     COPY_NODE_FIELD(subquery);
    1275       19670 :     COPY_NODE_FIELD(alias);
    1276             : 
    1277       19670 :     return newnode;
    1278             : }
    1279             : 
    1280             : static RangeFunction *
    1281       54140 : _copyRangeFunction(const RangeFunction *from)
    1282             : {
    1283       54140 :     RangeFunction *newnode = makeNode(RangeFunction);
    1284             : 
    1285       54140 :     COPY_SCALAR_FIELD(lateral);
    1286       54140 :     COPY_SCALAR_FIELD(ordinality);
    1287       54140 :     COPY_SCALAR_FIELD(is_rowsfrom);
    1288       54140 :     COPY_NODE_FIELD(functions);
    1289       54140 :     COPY_NODE_FIELD(alias);
    1290       54140 :     COPY_NODE_FIELD(coldeflist);
    1291             : 
    1292       54140 :     return newnode;
    1293             : }
    1294             : 
    1295             : static RangeTableFunc *
    1296         260 : _copyRangeTableFunc(const RangeTableFunc *from)
    1297             : {
    1298         260 :     RangeTableFunc *newnode = makeNode(RangeTableFunc);
    1299             : 
    1300         260 :     COPY_SCALAR_FIELD(lateral);
    1301         260 :     COPY_NODE_FIELD(docexpr);
    1302         260 :     COPY_NODE_FIELD(rowexpr);
    1303         260 :     COPY_NODE_FIELD(namespaces);
    1304         260 :     COPY_NODE_FIELD(columns);
    1305         260 :     COPY_NODE_FIELD(alias);
    1306         260 :     COPY_LOCATION_FIELD(location);
    1307             : 
    1308         260 :     return newnode;
    1309             : }
    1310             : 
    1311             : static RangeTableFuncCol *
    1312         930 : _copyRangeTableFuncCol(const RangeTableFuncCol *from)
    1313             : {
    1314         930 :     RangeTableFuncCol *newnode = makeNode(RangeTableFuncCol);
    1315             : 
    1316         930 :     COPY_STRING_FIELD(colname);
    1317         930 :     COPY_NODE_FIELD(typeName);
    1318         930 :     COPY_SCALAR_FIELD(for_ordinality);
    1319         930 :     COPY_SCALAR_FIELD(is_not_null);
    1320         930 :     COPY_NODE_FIELD(colexpr);
    1321         930 :     COPY_NODE_FIELD(coldefexpr);
    1322         930 :     COPY_LOCATION_FIELD(location);
    1323             : 
    1324         930 :     return newnode;
    1325             : }
    1326             : 
    1327             : static RangeTableSample *
    1328         292 : _copyRangeTableSample(const RangeTableSample *from)
    1329             : {
    1330         292 :     RangeTableSample *newnode = makeNode(RangeTableSample);
    1331             : 
    1332         292 :     COPY_NODE_FIELD(relation);
    1333         292 :     COPY_NODE_FIELD(method);
    1334         292 :     COPY_NODE_FIELD(args);
    1335         292 :     COPY_NODE_FIELD(repeatable);
    1336         292 :     COPY_LOCATION_FIELD(location);
    1337             : 
    1338         292 :     return newnode;
    1339             : }
    1340             : 
    1341             : static ColumnDef *
    1342      152354 : _copyColumnDef(const ColumnDef *from)
    1343             : {
    1344      152354 :     ColumnDef *newnode = makeNode(ColumnDef);
    1345             : 
    1346      152354 :     COPY_STRING_FIELD(colname);
    1347      152354 :     COPY_NODE_FIELD(typeName);
    1348      152354 :     COPY_STRING_FIELD(compression);
    1349      152354 :     COPY_SCALAR_FIELD(inhcount);
    1350      152354 :     COPY_SCALAR_FIELD(is_local);
    1351      152354 :     COPY_SCALAR_FIELD(is_not_null);
    1352      152354 :     COPY_SCALAR_FIELD(is_from_type);
    1353      152354 :     COPY_SCALAR_FIELD(storage);
    1354      152354 :     COPY_STRING_FIELD(storage_name);
    1355      152354 :     COPY_NODE_FIELD(raw_default);
    1356      152354 :     COPY_NODE_FIELD(cooked_default);
    1357      152354 :     COPY_SCALAR_FIELD(identity);
    1358      152354 :     COPY_NODE_FIELD(identitySequence);
    1359      152354 :     COPY_SCALAR_FIELD(generated);
    1360      152354 :     COPY_NODE_FIELD(collClause);
    1361      152354 :     COPY_SCALAR_FIELD(collOid);
    1362      152354 :     COPY_NODE_FIELD(constraints);
    1363      152354 :     COPY_NODE_FIELD(fdwoptions);
    1364      152354 :     COPY_LOCATION_FIELD(location);
    1365             : 
    1366      152354 :     return newnode;
    1367             : }
    1368             : 
    1369             : static TableLikeClause *
    1370        1548 : _copyTableLikeClause(const TableLikeClause *from)
    1371             : {
    1372        1548 :     TableLikeClause *newnode = makeNode(TableLikeClause);
    1373             : 
    1374        1548 :     COPY_NODE_FIELD(relation);
    1375        1548 :     COPY_SCALAR_FIELD(options);
    1376        1548 :     COPY_SCALAR_FIELD(relationOid);
    1377             : 
    1378        1548 :     return newnode;
    1379             : }
    1380             : 
    1381             : static IndexElem *
    1382       20558 : _copyIndexElem(const IndexElem *from)
    1383             : {
    1384       20558 :     IndexElem *newnode = makeNode(IndexElem);
    1385             : 
    1386       20558 :     COPY_STRING_FIELD(name);
    1387       20558 :     COPY_NODE_FIELD(expr);
    1388       20558 :     COPY_STRING_FIELD(indexcolname);
    1389       20558 :     COPY_NODE_FIELD(collation);
    1390       20558 :     COPY_NODE_FIELD(opclass);
    1391       20558 :     COPY_NODE_FIELD(opclassopts);
    1392       20558 :     COPY_SCALAR_FIELD(ordering);
    1393       20558 :     COPY_SCALAR_FIELD(nulls_ordering);
    1394             : 
    1395       20558 :     return newnode;
    1396             : }
    1397             : 
    1398             : static DefElem *
    1399      389506 : _copyDefElem(const DefElem *from)
    1400             : {
    1401      389506 :     DefElem *newnode = makeNode(DefElem);
    1402             : 
    1403      389506 :     COPY_STRING_FIELD(defnamespace);
    1404      389506 :     COPY_STRING_FIELD(defname);
    1405      389506 :     COPY_NODE_FIELD(arg);
    1406      389506 :     COPY_SCALAR_FIELD(defaction);
    1407      389506 :     COPY_LOCATION_FIELD(location);
    1408             : 
    1409      389506 :     return newnode;
    1410             : }
    1411             : 
    1412             : static LockingClause *
    1413        5516 : _copyLockingClause(const LockingClause *from)
    1414             : {
    1415        5516 :     LockingClause *newnode = makeNode(LockingClause);
    1416             : 
    1417        5516 :     COPY_NODE_FIELD(lockedRels);
    1418        5516 :     COPY_SCALAR_FIELD(strength);
    1419        5516 :     COPY_SCALAR_FIELD(waitPolicy);
    1420             : 
    1421        5516 :     return newnode;
    1422             : }
    1423             : 
    1424             : static XmlSerialize *
    1425         250 : _copyXmlSerialize(const XmlSerialize *from)
    1426             : {
    1427         250 :     XmlSerialize *newnode = makeNode(XmlSerialize);
    1428             : 
    1429         250 :     COPY_SCALAR_FIELD(xmloption);
    1430         250 :     COPY_NODE_FIELD(expr);
    1431         250 :     COPY_NODE_FIELD(typeName);
    1432         250 :     COPY_SCALAR_FIELD(indent);
    1433         250 :     COPY_LOCATION_FIELD(location);
    1434             : 
    1435         250 :     return newnode;
    1436             : }
    1437             : 
    1438             : static PartitionElem *
    1439       11470 : _copyPartitionElem(const PartitionElem *from)
    1440             : {
    1441       11470 :     PartitionElem *newnode = makeNode(PartitionElem);
    1442             : 
    1443       11470 :     COPY_STRING_FIELD(name);
    1444       11470 :     COPY_NODE_FIELD(expr);
    1445       11470 :     COPY_NODE_FIELD(collation);
    1446       11470 :     COPY_NODE_FIELD(opclass);
    1447       11470 :     COPY_LOCATION_FIELD(location);
    1448             : 
    1449       11470 :     return newnode;
    1450             : }
    1451             : 
    1452             : static PartitionSpec *
    1453       10254 : _copyPartitionSpec(const PartitionSpec *from)
    1454             : {
    1455       10254 :     PartitionSpec *newnode = makeNode(PartitionSpec);
    1456             : 
    1457       10254 :     COPY_SCALAR_FIELD(strategy);
    1458       10254 :     COPY_NODE_FIELD(partParams);
    1459       10254 :     COPY_LOCATION_FIELD(location);
    1460             : 
    1461       10254 :     return newnode;
    1462             : }
    1463             : 
    1464             : static PartitionBoundSpec *
    1465       34236 : _copyPartitionBoundSpec(const PartitionBoundSpec *from)
    1466             : {
    1467       34236 :     PartitionBoundSpec *newnode = makeNode(PartitionBoundSpec);
    1468             : 
    1469       34236 :     COPY_SCALAR_FIELD(strategy);
    1470       34236 :     COPY_SCALAR_FIELD(is_default);
    1471       34236 :     COPY_SCALAR_FIELD(modulus);
    1472       34236 :     COPY_SCALAR_FIELD(remainder);
    1473       34236 :     COPY_NODE_FIELD(listdatums);
    1474       34236 :     COPY_NODE_FIELD(lowerdatums);
    1475       34236 :     COPY_NODE_FIELD(upperdatums);
    1476       34236 :     COPY_LOCATION_FIELD(location);
    1477             : 
    1478       34236 :     return newnode;
    1479             : }
    1480             : 
    1481             : static PartitionRangeDatum *
    1482           4 : _copyPartitionRangeDatum(const PartitionRangeDatum *from)
    1483             : {
    1484           4 :     PartitionRangeDatum *newnode = makeNode(PartitionRangeDatum);
    1485             : 
    1486           4 :     COPY_SCALAR_FIELD(kind);
    1487           4 :     COPY_NODE_FIELD(value);
    1488           4 :     COPY_LOCATION_FIELD(location);
    1489             : 
    1490           4 :     return newnode;
    1491             : }
    1492             : 
    1493             : static PartitionCmd *
    1494       10352 : _copyPartitionCmd(const PartitionCmd *from)
    1495             : {
    1496       10352 :     PartitionCmd *newnode = makeNode(PartitionCmd);
    1497             : 
    1498       10352 :     COPY_NODE_FIELD(name);
    1499       10352 :     COPY_NODE_FIELD(bound);
    1500       10352 :     COPY_SCALAR_FIELD(concurrent);
    1501             : 
    1502       10352 :     return newnode;
    1503             : }
    1504             : 
    1505             : static RangeTblEntry *
    1506     2198196 : _copyRangeTblEntry(const RangeTblEntry *from)
    1507             : {
    1508     2198196 :     RangeTblEntry *newnode = makeNode(RangeTblEntry);
    1509             : 
    1510     2198196 :     COPY_NODE_FIELD(alias);
    1511     2198196 :     COPY_NODE_FIELD(eref);
    1512     2198196 :     COPY_SCALAR_FIELD(rtekind);
    1513     2198196 :     COPY_SCALAR_FIELD(relid);
    1514     2198196 :     COPY_SCALAR_FIELD(inh);
    1515     2198196 :     COPY_SCALAR_FIELD(relkind);
    1516     2198196 :     COPY_SCALAR_FIELD(rellockmode);
    1517     2198196 :     COPY_SCALAR_FIELD(perminfoindex);
    1518     2198196 :     COPY_NODE_FIELD(tablesample);
    1519     2198196 :     COPY_NODE_FIELD(subquery);
    1520     2198196 :     COPY_SCALAR_FIELD(security_barrier);
    1521     2198196 :     COPY_SCALAR_FIELD(jointype);
    1522     2198196 :     COPY_SCALAR_FIELD(joinmergedcols);
    1523     2198196 :     COPY_NODE_FIELD(joinaliasvars);
    1524     2198196 :     COPY_NODE_FIELD(joinleftcols);
    1525     2198196 :     COPY_NODE_FIELD(joinrightcols);
    1526     2198196 :     COPY_NODE_FIELD(join_using_alias);
    1527     2198196 :     COPY_NODE_FIELD(functions);
    1528     2198196 :     COPY_SCALAR_FIELD(funcordinality);
    1529     2198196 :     COPY_NODE_FIELD(tablefunc);
    1530     2198196 :     COPY_NODE_FIELD(values_lists);
    1531     2198196 :     COPY_STRING_FIELD(ctename);
    1532     2198196 :     COPY_SCALAR_FIELD(ctelevelsup);
    1533     2198196 :     COPY_SCALAR_FIELD(self_reference);
    1534     2198196 :     COPY_NODE_FIELD(coltypes);
    1535     2198196 :     COPY_NODE_FIELD(coltypmods);
    1536     2198196 :     COPY_NODE_FIELD(colcollations);
    1537     2198196 :     COPY_STRING_FIELD(enrname);
    1538     2198196 :     COPY_SCALAR_FIELD(enrtuples);
    1539     2198196 :     COPY_NODE_FIELD(groupexprs);
    1540     2198196 :     COPY_SCALAR_FIELD(lateral);
    1541     2198196 :     COPY_SCALAR_FIELD(inFromCl);
    1542     2198196 :     COPY_NODE_FIELD(securityQuals);
    1543             : 
    1544     2198196 :     return newnode;
    1545             : }
    1546             : 
    1547             : static RTEPermissionInfo *
    1548     1288094 : _copyRTEPermissionInfo(const RTEPermissionInfo *from)
    1549             : {
    1550     1288094 :     RTEPermissionInfo *newnode = makeNode(RTEPermissionInfo);
    1551             : 
    1552     1288094 :     COPY_SCALAR_FIELD(relid);
    1553     1288094 :     COPY_SCALAR_FIELD(inh);
    1554     1288094 :     COPY_SCALAR_FIELD(requiredPerms);
    1555     1288094 :     COPY_SCALAR_FIELD(checkAsUser);
    1556     1288094 :     COPY_BITMAPSET_FIELD(selectedCols);
    1557     1288094 :     COPY_BITMAPSET_FIELD(insertedCols);
    1558     1288094 :     COPY_BITMAPSET_FIELD(updatedCols);
    1559             : 
    1560     1288094 :     return newnode;
    1561             : }
    1562             : 
    1563             : static RangeTblFunction *
    1564      139662 : _copyRangeTblFunction(const RangeTblFunction *from)
    1565             : {
    1566      139662 :     RangeTblFunction *newnode = makeNode(RangeTblFunction);
    1567             : 
    1568      139662 :     COPY_NODE_FIELD(funcexpr);
    1569      139662 :     COPY_SCALAR_FIELD(funccolcount);
    1570      139662 :     COPY_NODE_FIELD(funccolnames);
    1571      139662 :     COPY_NODE_FIELD(funccoltypes);
    1572      139662 :     COPY_NODE_FIELD(funccoltypmods);
    1573      139662 :     COPY_NODE_FIELD(funccolcollations);
    1574      139662 :     COPY_BITMAPSET_FIELD(funcparams);
    1575             : 
    1576      139662 :     return newnode;
    1577             : }
    1578             : 
    1579             : static TableSampleClause *
    1580         738 : _copyTableSampleClause(const TableSampleClause *from)
    1581             : {
    1582         738 :     TableSampleClause *newnode = makeNode(TableSampleClause);
    1583             : 
    1584         738 :     COPY_SCALAR_FIELD(tsmhandler);
    1585         738 :     COPY_NODE_FIELD(args);
    1586         738 :     COPY_NODE_FIELD(repeatable);
    1587             : 
    1588         738 :     return newnode;
    1589             : }
    1590             : 
    1591             : static WithCheckOption *
    1592        4932 : _copyWithCheckOption(const WithCheckOption *from)
    1593             : {
    1594        4932 :     WithCheckOption *newnode = makeNode(WithCheckOption);
    1595             : 
    1596        4932 :     COPY_SCALAR_FIELD(kind);
    1597        4932 :     COPY_STRING_FIELD(relname);
    1598        4932 :     COPY_STRING_FIELD(polname);
    1599        4932 :     COPY_NODE_FIELD(qual);
    1600        4932 :     COPY_SCALAR_FIELD(cascaded);
    1601             : 
    1602        4932 :     return newnode;
    1603             : }
    1604             : 
    1605             : static SortGroupClause *
    1606      250554 : _copySortGroupClause(const SortGroupClause *from)
    1607             : {
    1608      250554 :     SortGroupClause *newnode = makeNode(SortGroupClause);
    1609             : 
    1610      250554 :     COPY_SCALAR_FIELD(tleSortGroupRef);
    1611      250554 :     COPY_SCALAR_FIELD(eqop);
    1612      250554 :     COPY_SCALAR_FIELD(sortop);
    1613      250554 :     COPY_SCALAR_FIELD(reverse_sort);
    1614      250554 :     COPY_SCALAR_FIELD(nulls_first);
    1615      250554 :     COPY_SCALAR_FIELD(hashable);
    1616             : 
    1617      250554 :     return newnode;
    1618             : }
    1619             : 
    1620             : static GroupingSet *
    1621        4480 : _copyGroupingSet(const GroupingSet *from)
    1622             : {
    1623        4480 :     GroupingSet *newnode = makeNode(GroupingSet);
    1624             : 
    1625        4480 :     COPY_SCALAR_FIELD(kind);
    1626        4480 :     COPY_NODE_FIELD(content);
    1627        4480 :     COPY_LOCATION_FIELD(location);
    1628             : 
    1629        4480 :     return newnode;
    1630             : }
    1631             : 
    1632             : static WindowClause *
    1633        3884 : _copyWindowClause(const WindowClause *from)
    1634             : {
    1635        3884 :     WindowClause *newnode = makeNode(WindowClause);
    1636             : 
    1637        3884 :     COPY_STRING_FIELD(name);
    1638        3884 :     COPY_STRING_FIELD(refname);
    1639        3884 :     COPY_NODE_FIELD(partitionClause);
    1640        3884 :     COPY_NODE_FIELD(orderClause);
    1641        3884 :     COPY_SCALAR_FIELD(frameOptions);
    1642        3884 :     COPY_NODE_FIELD(startOffset);
    1643        3884 :     COPY_NODE_FIELD(endOffset);
    1644        3884 :     COPY_SCALAR_FIELD(startInRangeFunc);
    1645        3884 :     COPY_SCALAR_FIELD(endInRangeFunc);
    1646        3884 :     COPY_SCALAR_FIELD(inRangeColl);
    1647        3884 :     COPY_SCALAR_FIELD(inRangeAsc);
    1648        3884 :     COPY_SCALAR_FIELD(inRangeNullsFirst);
    1649        3884 :     COPY_SCALAR_FIELD(winref);
    1650        3884 :     COPY_SCALAR_FIELD(copiedOrder);
    1651             : 
    1652        3884 :     return newnode;
    1653             : }
    1654             : 
    1655             : static RowMarkClause *
    1656       15974 : _copyRowMarkClause(const RowMarkClause *from)
    1657             : {
    1658       15974 :     RowMarkClause *newnode = makeNode(RowMarkClause);
    1659             : 
    1660       15974 :     COPY_SCALAR_FIELD(rti);
    1661       15974 :     COPY_SCALAR_FIELD(strength);
    1662       15974 :     COPY_SCALAR_FIELD(waitPolicy);
    1663       15974 :     COPY_SCALAR_FIELD(pushedDown);
    1664             : 
    1665       15974 :     return newnode;
    1666             : }
    1667             : 
    1668             : static WithClause *
    1669        3462 : _copyWithClause(const WithClause *from)
    1670             : {
    1671        3462 :     WithClause *newnode = makeNode(WithClause);
    1672             : 
    1673        3462 :     COPY_NODE_FIELD(ctes);
    1674        3462 :     COPY_SCALAR_FIELD(recursive);
    1675        3462 :     COPY_LOCATION_FIELD(location);
    1676             : 
    1677        3462 :     return newnode;
    1678             : }
    1679             : 
    1680             : static InferClause *
    1681        1644 : _copyInferClause(const InferClause *from)
    1682             : {
    1683        1644 :     InferClause *newnode = makeNode(InferClause);
    1684             : 
    1685        1644 :     COPY_NODE_FIELD(indexElems);
    1686        1644 :     COPY_NODE_FIELD(whereClause);
    1687        1644 :     COPY_STRING_FIELD(conname);
    1688        1644 :     COPY_LOCATION_FIELD(location);
    1689             : 
    1690        1644 :     return newnode;
    1691             : }
    1692             : 
    1693             : static OnConflictClause *
    1694        1902 : _copyOnConflictClause(const OnConflictClause *from)
    1695             : {
    1696        1902 :     OnConflictClause *newnode = makeNode(OnConflictClause);
    1697             : 
    1698        1902 :     COPY_SCALAR_FIELD(action);
    1699        1902 :     COPY_NODE_FIELD(infer);
    1700        1902 :     COPY_NODE_FIELD(targetList);
    1701        1902 :     COPY_NODE_FIELD(whereClause);
    1702        1902 :     COPY_LOCATION_FIELD(location);
    1703             : 
    1704        1902 :     return newnode;
    1705             : }
    1706             : 
    1707             : static CTESearchClause *
    1708         306 : _copyCTESearchClause(const CTESearchClause *from)
    1709             : {
    1710         306 :     CTESearchClause *newnode = makeNode(CTESearchClause);
    1711             : 
    1712         306 :     COPY_NODE_FIELD(search_col_list);
    1713         306 :     COPY_SCALAR_FIELD(search_breadth_first);
    1714         306 :     COPY_STRING_FIELD(search_seq_column);
    1715         306 :     COPY_LOCATION_FIELD(location);
    1716             : 
    1717         306 :     return newnode;
    1718             : }
    1719             : 
    1720             : static CTECycleClause *
    1721         306 : _copyCTECycleClause(const CTECycleClause *from)
    1722             : {
    1723         306 :     CTECycleClause *newnode = makeNode(CTECycleClause);
    1724             : 
    1725         306 :     COPY_NODE_FIELD(cycle_col_list);
    1726         306 :     COPY_STRING_FIELD(cycle_mark_column);
    1727         306 :     COPY_NODE_FIELD(cycle_mark_value);
    1728         306 :     COPY_NODE_FIELD(cycle_mark_default);
    1729         306 :     COPY_STRING_FIELD(cycle_path_column);
    1730         306 :     COPY_LOCATION_FIELD(location);
    1731         306 :     COPY_SCALAR_FIELD(cycle_mark_type);
    1732         306 :     COPY_SCALAR_FIELD(cycle_mark_typmod);
    1733         306 :     COPY_SCALAR_FIELD(cycle_mark_collation);
    1734         306 :     COPY_SCALAR_FIELD(cycle_mark_neop);
    1735             : 
    1736         306 :     return newnode;
    1737             : }
    1738             : 
    1739             : static CommonTableExpr *
    1740       10502 : _copyCommonTableExpr(const CommonTableExpr *from)
    1741             : {
    1742       10502 :     CommonTableExpr *newnode = makeNode(CommonTableExpr);
    1743             : 
    1744       10502 :     COPY_STRING_FIELD(ctename);
    1745       10502 :     COPY_NODE_FIELD(aliascolnames);
    1746       10502 :     COPY_SCALAR_FIELD(ctematerialized);
    1747       10502 :     COPY_NODE_FIELD(ctequery);
    1748       10502 :     COPY_NODE_FIELD(search_clause);
    1749       10502 :     COPY_NODE_FIELD(cycle_clause);
    1750       10502 :     COPY_LOCATION_FIELD(location);
    1751       10502 :     COPY_SCALAR_FIELD(cterecursive);
    1752       10502 :     COPY_SCALAR_FIELD(cterefcount);
    1753       10502 :     COPY_NODE_FIELD(ctecolnames);
    1754       10502 :     COPY_NODE_FIELD(ctecoltypes);
    1755       10502 :     COPY_NODE_FIELD(ctecoltypmods);
    1756       10502 :     COPY_NODE_FIELD(ctecolcollations);
    1757             : 
    1758       10502 :     return newnode;
    1759             : }
    1760             : 
    1761             : static MergeWhenClause *
    1762        3416 : _copyMergeWhenClause(const MergeWhenClause *from)
    1763             : {
    1764        3416 :     MergeWhenClause *newnode = makeNode(MergeWhenClause);
    1765             : 
    1766        3416 :     COPY_SCALAR_FIELD(matchKind);
    1767        3416 :     COPY_SCALAR_FIELD(commandType);
    1768        3416 :     COPY_SCALAR_FIELD(override);
    1769        3416 :     COPY_NODE_FIELD(condition);
    1770        3416 :     COPY_NODE_FIELD(targetList);
    1771        3416 :     COPY_NODE_FIELD(values);
    1772             : 
    1773        3416 :     return newnode;
    1774             : }
    1775             : 
    1776             : static ReturningOption *
    1777         156 : _copyReturningOption(const ReturningOption *from)
    1778             : {
    1779         156 :     ReturningOption *newnode = makeNode(ReturningOption);
    1780             : 
    1781         156 :     COPY_SCALAR_FIELD(option);
    1782         156 :     COPY_STRING_FIELD(value);
    1783         156 :     COPY_LOCATION_FIELD(location);
    1784             : 
    1785         156 :     return newnode;
    1786             : }
    1787             : 
    1788             : static ReturningClause *
    1789        3726 : _copyReturningClause(const ReturningClause *from)
    1790             : {
    1791        3726 :     ReturningClause *newnode = makeNode(ReturningClause);
    1792             : 
    1793        3726 :     COPY_NODE_FIELD(options);
    1794        3726 :     COPY_NODE_FIELD(exprs);
    1795             : 
    1796        3726 :     return newnode;
    1797             : }
    1798             : 
    1799             : static TriggerTransition *
    1800        1212 : _copyTriggerTransition(const TriggerTransition *from)
    1801             : {
    1802        1212 :     TriggerTransition *newnode = makeNode(TriggerTransition);
    1803             : 
    1804        1212 :     COPY_STRING_FIELD(name);
    1805        1212 :     COPY_SCALAR_FIELD(isNew);
    1806        1212 :     COPY_SCALAR_FIELD(isTable);
    1807             : 
    1808        1212 :     return newnode;
    1809             : }
    1810             : 
    1811             : static JsonOutput *
    1812        1594 : _copyJsonOutput(const JsonOutput *from)
    1813             : {
    1814        1594 :     JsonOutput *newnode = makeNode(JsonOutput);
    1815             : 
    1816        1594 :     COPY_NODE_FIELD(typeName);
    1817        1594 :     COPY_NODE_FIELD(returning);
    1818             : 
    1819        1594 :     return newnode;
    1820             : }
    1821             : 
    1822             : static JsonArgument *
    1823         630 : _copyJsonArgument(const JsonArgument *from)
    1824             : {
    1825         630 :     JsonArgument *newnode = makeNode(JsonArgument);
    1826             : 
    1827         630 :     COPY_NODE_FIELD(val);
    1828         630 :     COPY_STRING_FIELD(name);
    1829             : 
    1830         630 :     return newnode;
    1831             : }
    1832             : 
    1833             : static JsonFuncExpr *
    1834        2040 : _copyJsonFuncExpr(const JsonFuncExpr *from)
    1835             : {
    1836        2040 :     JsonFuncExpr *newnode = makeNode(JsonFuncExpr);
    1837             : 
    1838        2040 :     COPY_SCALAR_FIELD(op);
    1839        2040 :     COPY_STRING_FIELD(column_name);
    1840        2040 :     COPY_NODE_FIELD(context_item);
    1841        2040 :     COPY_NODE_FIELD(pathspec);
    1842        2040 :     COPY_NODE_FIELD(passing);
    1843        2040 :     COPY_NODE_FIELD(output);
    1844        2040 :     COPY_NODE_FIELD(on_empty);
    1845        2040 :     COPY_NODE_FIELD(on_error);
    1846        2040 :     COPY_SCALAR_FIELD(wrapper);
    1847        2040 :     COPY_SCALAR_FIELD(quotes);
    1848        2040 :     COPY_LOCATION_FIELD(location);
    1849             : 
    1850        2040 :     return newnode;
    1851             : }
    1852             : 
    1853             : static JsonTablePathSpec *
    1854        1984 : _copyJsonTablePathSpec(const JsonTablePathSpec *from)
    1855             : {
    1856        1984 :     JsonTablePathSpec *newnode = makeNode(JsonTablePathSpec);
    1857             : 
    1858        1984 :     COPY_NODE_FIELD(string);
    1859        1984 :     COPY_STRING_FIELD(name);
    1860        1984 :     COPY_LOCATION_FIELD(name_location);
    1861        1984 :     COPY_LOCATION_FIELD(location);
    1862             : 
    1863        1984 :     return newnode;
    1864             : }
    1865             : 
    1866             : static JsonTable *
    1867         602 : _copyJsonTable(const JsonTable *from)
    1868             : {
    1869         602 :     JsonTable *newnode = makeNode(JsonTable);
    1870             : 
    1871         602 :     COPY_NODE_FIELD(context_item);
    1872         602 :     COPY_NODE_FIELD(pathspec);
    1873         602 :     COPY_NODE_FIELD(passing);
    1874         602 :     COPY_NODE_FIELD(columns);
    1875         602 :     COPY_NODE_FIELD(on_error);
    1876         602 :     COPY_NODE_FIELD(alias);
    1877         602 :     COPY_SCALAR_FIELD(lateral);
    1878         602 :     COPY_LOCATION_FIELD(location);
    1879             : 
    1880         602 :     return newnode;
    1881             : }
    1882             : 
    1883             : static JsonTableColumn *
    1884        1660 : _copyJsonTableColumn(const JsonTableColumn *from)
    1885             : {
    1886        1660 :     JsonTableColumn *newnode = makeNode(JsonTableColumn);
    1887             : 
    1888        1660 :     COPY_SCALAR_FIELD(coltype);
    1889        1660 :     COPY_STRING_FIELD(name);
    1890        1660 :     COPY_NODE_FIELD(typeName);
    1891        1660 :     COPY_NODE_FIELD(pathspec);
    1892        1660 :     COPY_NODE_FIELD(format);
    1893        1660 :     COPY_SCALAR_FIELD(wrapper);
    1894        1660 :     COPY_SCALAR_FIELD(quotes);
    1895        1660 :     COPY_NODE_FIELD(columns);
    1896        1660 :     COPY_NODE_FIELD(on_empty);
    1897        1660 :     COPY_NODE_FIELD(on_error);
    1898        1660 :     COPY_LOCATION_FIELD(location);
    1899             : 
    1900        1660 :     return newnode;
    1901             : }
    1902             : 
    1903             : static JsonKeyValue *
    1904         874 : _copyJsonKeyValue(const JsonKeyValue *from)
    1905             : {
    1906         874 :     JsonKeyValue *newnode = makeNode(JsonKeyValue);
    1907             : 
    1908         874 :     COPY_NODE_FIELD(key);
    1909         874 :     COPY_NODE_FIELD(value);
    1910             : 
    1911         874 :     return newnode;
    1912             : }
    1913             : 
    1914             : static JsonParseExpr *
    1915         164 : _copyJsonParseExpr(const JsonParseExpr *from)
    1916             : {
    1917         164 :     JsonParseExpr *newnode = makeNode(JsonParseExpr);
    1918             : 
    1919         164 :     COPY_NODE_FIELD(expr);
    1920         164 :     COPY_NODE_FIELD(output);
    1921         164 :     COPY_SCALAR_FIELD(unique_keys);
    1922         164 :     COPY_LOCATION_FIELD(location);
    1923             : 
    1924         164 :     return newnode;
    1925             : }
    1926             : 
    1927             : static JsonScalarExpr *
    1928         112 : _copyJsonScalarExpr(const JsonScalarExpr *from)
    1929             : {
    1930         112 :     JsonScalarExpr *newnode = makeNode(JsonScalarExpr);
    1931             : 
    1932         112 :     COPY_NODE_FIELD(expr);
    1933         112 :     COPY_NODE_FIELD(output);
    1934         112 :     COPY_LOCATION_FIELD(location);
    1935             : 
    1936         112 :     return newnode;
    1937             : }
    1938             : 
    1939             : static JsonSerializeExpr *
    1940         108 : _copyJsonSerializeExpr(const JsonSerializeExpr *from)
    1941             : {
    1942         108 :     JsonSerializeExpr *newnode = makeNode(JsonSerializeExpr);
    1943             : 
    1944         108 :     COPY_NODE_FIELD(expr);
    1945         108 :     COPY_NODE_FIELD(output);
    1946         108 :     COPY_LOCATION_FIELD(location);
    1947             : 
    1948         108 :     return newnode;
    1949             : }
    1950             : 
    1951             : static JsonObjectConstructor *
    1952         458 : _copyJsonObjectConstructor(const JsonObjectConstructor *from)
    1953             : {
    1954         458 :     JsonObjectConstructor *newnode = makeNode(JsonObjectConstructor);
    1955             : 
    1956         458 :     COPY_NODE_FIELD(exprs);
    1957         458 :     COPY_NODE_FIELD(output);
    1958         458 :     COPY_SCALAR_FIELD(absent_on_null);
    1959         458 :     COPY_SCALAR_FIELD(unique);
    1960         458 :     COPY_LOCATION_FIELD(location);
    1961             : 
    1962         458 :     return newnode;
    1963             : }
    1964             : 
    1965             : static JsonArrayConstructor *
    1966         224 : _copyJsonArrayConstructor(const JsonArrayConstructor *from)
    1967             : {
    1968         224 :     JsonArrayConstructor *newnode = makeNode(JsonArrayConstructor);
    1969             : 
    1970         224 :     COPY_NODE_FIELD(exprs);
    1971         224 :     COPY_NODE_FIELD(output);
    1972         224 :     COPY_SCALAR_FIELD(absent_on_null);
    1973         224 :     COPY_LOCATION_FIELD(location);
    1974             : 
    1975         224 :     return newnode;
    1976             : }
    1977             : 
    1978             : static JsonArrayQueryConstructor *
    1979          66 : _copyJsonArrayQueryConstructor(const JsonArrayQueryConstructor *from)
    1980             : {
    1981          66 :     JsonArrayQueryConstructor *newnode = makeNode(JsonArrayQueryConstructor);
    1982             : 
    1983          66 :     COPY_NODE_FIELD(query);
    1984          66 :     COPY_NODE_FIELD(output);
    1985          66 :     COPY_NODE_FIELD(format);
    1986          66 :     COPY_SCALAR_FIELD(absent_on_null);
    1987          66 :     COPY_LOCATION_FIELD(location);
    1988             : 
    1989          66 :     return newnode;
    1990             : }
    1991             : 
    1992             : static JsonAggConstructor *
    1993         408 : _copyJsonAggConstructor(const JsonAggConstructor *from)
    1994             : {
    1995         408 :     JsonAggConstructor *newnode = makeNode(JsonAggConstructor);
    1996             : 
    1997         408 :     COPY_NODE_FIELD(output);
    1998         408 :     COPY_NODE_FIELD(agg_filter);
    1999         408 :     COPY_NODE_FIELD(agg_order);
    2000         408 :     COPY_NODE_FIELD(over);
    2001         408 :     COPY_LOCATION_FIELD(location);
    2002             : 
    2003         408 :     return newnode;
    2004             : }
    2005             : 
    2006             : static JsonObjectAgg *
    2007         246 : _copyJsonObjectAgg(const JsonObjectAgg *from)
    2008             : {
    2009         246 :     JsonObjectAgg *newnode = makeNode(JsonObjectAgg);
    2010             : 
    2011         246 :     COPY_NODE_FIELD(constructor);
    2012         246 :     COPY_NODE_FIELD(arg);
    2013         246 :     COPY_SCALAR_FIELD(absent_on_null);
    2014         246 :     COPY_SCALAR_FIELD(unique);
    2015             : 
    2016         246 :     return newnode;
    2017             : }
    2018             : 
    2019             : static JsonArrayAgg *
    2020         162 : _copyJsonArrayAgg(const JsonArrayAgg *from)
    2021             : {
    2022         162 :     JsonArrayAgg *newnode = makeNode(JsonArrayAgg);
    2023             : 
    2024         162 :     COPY_NODE_FIELD(constructor);
    2025         162 :     COPY_NODE_FIELD(arg);
    2026         162 :     COPY_SCALAR_FIELD(absent_on_null);
    2027             : 
    2028         162 :     return newnode;
    2029             : }
    2030             : 
    2031             : static RawStmt *
    2032      797120 : _copyRawStmt(const RawStmt *from)
    2033             : {
    2034      797120 :     RawStmt *newnode = makeNode(RawStmt);
    2035             : 
    2036      797120 :     COPY_NODE_FIELD(stmt);
    2037      797120 :     COPY_LOCATION_FIELD(stmt_location);
    2038      797120 :     COPY_LOCATION_FIELD(stmt_len);
    2039             : 
    2040      797120 :     return newnode;
    2041             : }
    2042             : 
    2043             : static InsertStmt *
    2044       74540 : _copyInsertStmt(const InsertStmt *from)
    2045             : {
    2046       74540 :     InsertStmt *newnode = makeNode(InsertStmt);
    2047             : 
    2048       74540 :     COPY_NODE_FIELD(relation);
    2049       74540 :     COPY_NODE_FIELD(cols);
    2050       74540 :     COPY_NODE_FIELD(selectStmt);
    2051       74540 :     COPY_NODE_FIELD(onConflictClause);
    2052       74540 :     COPY_NODE_FIELD(returningClause);
    2053       74540 :     COPY_NODE_FIELD(withClause);
    2054       74540 :     COPY_SCALAR_FIELD(override);
    2055             : 
    2056       74540 :     return newnode;
    2057             : }
    2058             : 
    2059             : static DeleteStmt *
    2060        4804 : _copyDeleteStmt(const DeleteStmt *from)
    2061             : {
    2062        4804 :     DeleteStmt *newnode = makeNode(DeleteStmt);
    2063             : 
    2064        4804 :     COPY_NODE_FIELD(relation);
    2065        4804 :     COPY_NODE_FIELD(usingClause);
    2066        4804 :     COPY_NODE_FIELD(whereClause);
    2067        4804 :     COPY_NODE_FIELD(returningClause);
    2068        4804 :     COPY_NODE_FIELD(withClause);
    2069             : 
    2070        4804 :     return newnode;
    2071             : }
    2072             : 
    2073             : static UpdateStmt *
    2074       14736 : _copyUpdateStmt(const UpdateStmt *from)
    2075             : {
    2076       14736 :     UpdateStmt *newnode = makeNode(UpdateStmt);
    2077             : 
    2078       14736 :     COPY_NODE_FIELD(relation);
    2079       14736 :     COPY_NODE_FIELD(targetList);
    2080       14736 :     COPY_NODE_FIELD(whereClause);
    2081       14736 :     COPY_NODE_FIELD(fromClause);
    2082       14736 :     COPY_NODE_FIELD(returningClause);
    2083       14736 :     COPY_NODE_FIELD(withClause);
    2084             : 
    2085       14736 :     return newnode;
    2086             : }
    2087             : 
    2088             : static MergeStmt *
    2089        2146 : _copyMergeStmt(const MergeStmt *from)
    2090             : {
    2091        2146 :     MergeStmt *newnode = makeNode(MergeStmt);
    2092             : 
    2093        2146 :     COPY_NODE_FIELD(relation);
    2094        2146 :     COPY_NODE_FIELD(sourceRelation);
    2095        2146 :     COPY_NODE_FIELD(joinCondition);
    2096        2146 :     COPY_NODE_FIELD(mergeWhenClauses);
    2097        2146 :     COPY_NODE_FIELD(returningClause);
    2098        2146 :     COPY_NODE_FIELD(withClause);
    2099             : 
    2100        2146 :     return newnode;
    2101             : }
    2102             : 
    2103             : static SelectStmt *
    2104      580548 : _copySelectStmt(const SelectStmt *from)
    2105             : {
    2106      580548 :     SelectStmt *newnode = makeNode(SelectStmt);
    2107             : 
    2108      580548 :     COPY_NODE_FIELD(distinctClause);
    2109      580548 :     COPY_NODE_FIELD(intoClause);
    2110      580548 :     COPY_NODE_FIELD(targetList);
    2111      580548 :     COPY_NODE_FIELD(fromClause);
    2112      580548 :     COPY_NODE_FIELD(whereClause);
    2113      580548 :     COPY_NODE_FIELD(groupClause);
    2114      580548 :     COPY_SCALAR_FIELD(groupDistinct);
    2115      580548 :     COPY_SCALAR_FIELD(groupByAll);
    2116      580548 :     COPY_NODE_FIELD(havingClause);
    2117      580548 :     COPY_NODE_FIELD(windowClause);
    2118      580548 :     COPY_NODE_FIELD(valuesLists);
    2119      580548 :     COPY_NODE_FIELD(sortClause);
    2120      580548 :     COPY_NODE_FIELD(limitOffset);
    2121      580548 :     COPY_NODE_FIELD(limitCount);
    2122      580548 :     COPY_SCALAR_FIELD(limitOption);
    2123      580548 :     COPY_NODE_FIELD(lockingClause);
    2124      580548 :     COPY_NODE_FIELD(withClause);
    2125      580548 :     COPY_SCALAR_FIELD(op);
    2126      580548 :     COPY_SCALAR_FIELD(all);
    2127      580548 :     COPY_NODE_FIELD(larg);
    2128      580548 :     COPY_NODE_FIELD(rarg);
    2129             : 
    2130      580548 :     return newnode;
    2131             : }
    2132             : 
    2133             : static SetOperationStmt *
    2134       30542 : _copySetOperationStmt(const SetOperationStmt *from)
    2135             : {
    2136       30542 :     SetOperationStmt *newnode = makeNode(SetOperationStmt);
    2137             : 
    2138       30542 :     COPY_SCALAR_FIELD(op);
    2139       30542 :     COPY_SCALAR_FIELD(all);
    2140       30542 :     COPY_NODE_FIELD(larg);
    2141       30542 :     COPY_NODE_FIELD(rarg);
    2142       30542 :     COPY_NODE_FIELD(colTypes);
    2143       30542 :     COPY_NODE_FIELD(colTypmods);
    2144       30542 :     COPY_NODE_FIELD(colCollations);
    2145       30542 :     COPY_NODE_FIELD(groupClauses);
    2146             : 
    2147       30542 :     return newnode;
    2148             : }
    2149             : 
    2150             : static ReturnStmt *
    2151        9756 : _copyReturnStmt(const ReturnStmt *from)
    2152             : {
    2153        9756 :     ReturnStmt *newnode = makeNode(ReturnStmt);
    2154             : 
    2155        9756 :     COPY_NODE_FIELD(returnval);
    2156             : 
    2157        9756 :     return newnode;
    2158             : }
    2159             : 
    2160             : static PLAssignStmt *
    2161        5358 : _copyPLAssignStmt(const PLAssignStmt *from)
    2162             : {
    2163        5358 :     PLAssignStmt *newnode = makeNode(PLAssignStmt);
    2164             : 
    2165        5358 :     COPY_STRING_FIELD(name);
    2166        5358 :     COPY_NODE_FIELD(indirection);
    2167        5358 :     COPY_SCALAR_FIELD(nnames);
    2168        5358 :     COPY_NODE_FIELD(val);
    2169        5358 :     COPY_LOCATION_FIELD(location);
    2170             : 
    2171        5358 :     return newnode;
    2172             : }
    2173             : 
    2174             : static CreateSchemaStmt *
    2175        2182 : _copyCreateSchemaStmt(const CreateSchemaStmt *from)
    2176             : {
    2177        2182 :     CreateSchemaStmt *newnode = makeNode(CreateSchemaStmt);
    2178             : 
    2179        2182 :     COPY_STRING_FIELD(schemaname);
    2180        2182 :     COPY_NODE_FIELD(authrole);
    2181        2182 :     COPY_NODE_FIELD(schemaElts);
    2182        2182 :     COPY_SCALAR_FIELD(if_not_exists);
    2183             : 
    2184        2182 :     return newnode;
    2185             : }
    2186             : 
    2187             : static AlterTableStmt *
    2188       62080 : _copyAlterTableStmt(const AlterTableStmt *from)
    2189             : {
    2190       62080 :     AlterTableStmt *newnode = makeNode(AlterTableStmt);
    2191             : 
    2192       62080 :     COPY_NODE_FIELD(relation);
    2193       62080 :     COPY_NODE_FIELD(cmds);
    2194       62080 :     COPY_SCALAR_FIELD(objtype);
    2195       62080 :     COPY_SCALAR_FIELD(missing_ok);
    2196             : 
    2197       62080 :     return newnode;
    2198             : }
    2199             : 
    2200             : static AlterTableCmd *
    2201      102340 : _copyAlterTableCmd(const AlterTableCmd *from)
    2202             : {
    2203      102340 :     AlterTableCmd *newnode = makeNode(AlterTableCmd);
    2204             : 
    2205      102340 :     COPY_SCALAR_FIELD(subtype);
    2206      102340 :     COPY_STRING_FIELD(name);
    2207      102340 :     COPY_SCALAR_FIELD(num);
    2208      102340 :     COPY_NODE_FIELD(newowner);
    2209      102340 :     COPY_NODE_FIELD(def);
    2210      102340 :     COPY_SCALAR_FIELD(behavior);
    2211      102340 :     COPY_SCALAR_FIELD(missing_ok);
    2212      102340 :     COPY_SCALAR_FIELD(recurse);
    2213             : 
    2214      102340 :     return newnode;
    2215             : }
    2216             : 
    2217             : static ATAlterConstraint *
    2218         882 : _copyATAlterConstraint(const ATAlterConstraint *from)
    2219             : {
    2220         882 :     ATAlterConstraint *newnode = makeNode(ATAlterConstraint);
    2221             : 
    2222         882 :     COPY_STRING_FIELD(conname);
    2223         882 :     COPY_SCALAR_FIELD(alterEnforceability);
    2224         882 :     COPY_SCALAR_FIELD(is_enforced);
    2225         882 :     COPY_SCALAR_FIELD(alterDeferrability);
    2226         882 :     COPY_SCALAR_FIELD(deferrable);
    2227         882 :     COPY_SCALAR_FIELD(initdeferred);
    2228         882 :     COPY_SCALAR_FIELD(alterInheritability);
    2229         882 :     COPY_SCALAR_FIELD(noinherit);
    2230             : 
    2231         882 :     return newnode;
    2232             : }
    2233             : 
    2234             : static ReplicaIdentityStmt *
    2235        1482 : _copyReplicaIdentityStmt(const ReplicaIdentityStmt *from)
    2236             : {
    2237        1482 :     ReplicaIdentityStmt *newnode = makeNode(ReplicaIdentityStmt);
    2238             : 
    2239        1482 :     COPY_SCALAR_FIELD(identity_type);
    2240        1482 :     COPY_STRING_FIELD(name);
    2241             : 
    2242        1482 :     return newnode;
    2243             : }
    2244             : 
    2245             : static AlterCollationStmt *
    2246          12 : _copyAlterCollationStmt(const AlterCollationStmt *from)
    2247             : {
    2248          12 :     AlterCollationStmt *newnode = makeNode(AlterCollationStmt);
    2249             : 
    2250          12 :     COPY_NODE_FIELD(collname);
    2251             : 
    2252          12 :     return newnode;
    2253             : }
    2254             : 
    2255             : static AlterDomainStmt *
    2256         584 : _copyAlterDomainStmt(const AlterDomainStmt *from)
    2257             : {
    2258         584 :     AlterDomainStmt *newnode = makeNode(AlterDomainStmt);
    2259             : 
    2260         584 :     COPY_SCALAR_FIELD(subtype);
    2261         584 :     COPY_NODE_FIELD(typeName);
    2262         584 :     COPY_STRING_FIELD(name);
    2263         584 :     COPY_NODE_FIELD(def);
    2264         584 :     COPY_SCALAR_FIELD(behavior);
    2265         584 :     COPY_SCALAR_FIELD(missing_ok);
    2266             : 
    2267         584 :     return newnode;
    2268             : }
    2269             : 
    2270             : static GrantStmt *
    2271       54696 : _copyGrantStmt(const GrantStmt *from)
    2272             : {
    2273       54696 :     GrantStmt *newnode = makeNode(GrantStmt);
    2274             : 
    2275       54696 :     COPY_SCALAR_FIELD(is_grant);
    2276       54696 :     COPY_SCALAR_FIELD(targtype);
    2277       54696 :     COPY_SCALAR_FIELD(objtype);
    2278       54696 :     COPY_NODE_FIELD(objects);
    2279       54696 :     COPY_NODE_FIELD(privileges);
    2280       54696 :     COPY_NODE_FIELD(grantees);
    2281       54696 :     COPY_SCALAR_FIELD(grant_option);
    2282       54696 :     COPY_NODE_FIELD(grantor);
    2283       54696 :     COPY_SCALAR_FIELD(behavior);
    2284             : 
    2285       54696 :     return newnode;
    2286             : }
    2287             : 
    2288             : static ObjectWithArgs *
    2289       46342 : _copyObjectWithArgs(const ObjectWithArgs *from)
    2290             : {
    2291       46342 :     ObjectWithArgs *newnode = makeNode(ObjectWithArgs);
    2292             : 
    2293       46342 :     COPY_NODE_FIELD(objname);
    2294       46342 :     COPY_NODE_FIELD(objargs);
    2295       46342 :     COPY_NODE_FIELD(objfuncargs);
    2296       46342 :     COPY_SCALAR_FIELD(args_unspecified);
    2297             : 
    2298       46342 :     return newnode;
    2299             : }
    2300             : 
    2301             : static AccessPriv *
    2302       52160 : _copyAccessPriv(const AccessPriv *from)
    2303             : {
    2304       52160 :     AccessPriv *newnode = makeNode(AccessPriv);
    2305             : 
    2306       52160 :     COPY_STRING_FIELD(priv_name);
    2307       52160 :     COPY_NODE_FIELD(cols);
    2308             : 
    2309       52160 :     return newnode;
    2310             : }
    2311             : 
    2312             : static GrantRoleStmt *
    2313        1970 : _copyGrantRoleStmt(const GrantRoleStmt *from)
    2314             : {
    2315        1970 :     GrantRoleStmt *newnode = makeNode(GrantRoleStmt);
    2316             : 
    2317        1970 :     COPY_NODE_FIELD(granted_roles);
    2318        1970 :     COPY_NODE_FIELD(grantee_roles);
    2319        1970 :     COPY_SCALAR_FIELD(is_grant);
    2320        1970 :     COPY_NODE_FIELD(opt);
    2321        1970 :     COPY_NODE_FIELD(grantor);
    2322        1970 :     COPY_SCALAR_FIELD(behavior);
    2323             : 
    2324        1970 :     return newnode;
    2325             : }
    2326             : 
    2327             : static AlterDefaultPrivilegesStmt *
    2328         420 : _copyAlterDefaultPrivilegesStmt(const AlterDefaultPrivilegesStmt *from)
    2329             : {
    2330         420 :     AlterDefaultPrivilegesStmt *newnode = makeNode(AlterDefaultPrivilegesStmt);
    2331             : 
    2332         420 :     COPY_NODE_FIELD(options);
    2333         420 :     COPY_NODE_FIELD(action);
    2334             : 
    2335         420 :     return newnode;
    2336             : }
    2337             : 
    2338             : static CopyStmt *
    2339       23646 : _copyCopyStmt(const CopyStmt *from)
    2340             : {
    2341       23646 :     CopyStmt *newnode = makeNode(CopyStmt);
    2342             : 
    2343       23646 :     COPY_NODE_FIELD(relation);
    2344       23646 :     COPY_NODE_FIELD(query);
    2345       23646 :     COPY_NODE_FIELD(attlist);
    2346       23646 :     COPY_SCALAR_FIELD(is_from);
    2347       23646 :     COPY_SCALAR_FIELD(is_program);
    2348       23646 :     COPY_STRING_FIELD(filename);
    2349       23646 :     COPY_NODE_FIELD(options);
    2350       23646 :     COPY_NODE_FIELD(whereClause);
    2351             : 
    2352       23646 :     return newnode;
    2353             : }
    2354             : 
    2355             : static VariableSetStmt *
    2356       69710 : _copyVariableSetStmt(const VariableSetStmt *from)
    2357             : {
    2358       69710 :     VariableSetStmt *newnode = makeNode(VariableSetStmt);
    2359             : 
    2360       69710 :     COPY_SCALAR_FIELD(kind);
    2361       69710 :     COPY_STRING_FIELD(name);
    2362       69710 :     COPY_NODE_FIELD(args);
    2363       69710 :     COPY_SCALAR_FIELD(jumble_args);
    2364       69710 :     COPY_SCALAR_FIELD(is_local);
    2365       69710 :     COPY_LOCATION_FIELD(location);
    2366             : 
    2367       69710 :     return newnode;
    2368             : }
    2369             : 
    2370             : static VariableShowStmt *
    2371        1876 : _copyVariableShowStmt(const VariableShowStmt *from)
    2372             : {
    2373        1876 :     VariableShowStmt *newnode = makeNode(VariableShowStmt);
    2374             : 
    2375        1876 :     COPY_STRING_FIELD(name);
    2376             : 
    2377        1876 :     return newnode;
    2378             : }
    2379             : 
    2380             : static CreateStmt *
    2381       76904 : _copyCreateStmt(const CreateStmt *from)
    2382             : {
    2383       76904 :     CreateStmt *newnode = makeNode(CreateStmt);
    2384             : 
    2385       76904 :     COPY_NODE_FIELD(relation);
    2386       76904 :     COPY_NODE_FIELD(tableElts);
    2387       76904 :     COPY_NODE_FIELD(inhRelations);
    2388       76904 :     COPY_NODE_FIELD(partbound);
    2389       76904 :     COPY_NODE_FIELD(partspec);
    2390       76904 :     COPY_NODE_FIELD(ofTypename);
    2391       76904 :     COPY_NODE_FIELD(constraints);
    2392       76904 :     COPY_NODE_FIELD(nnconstraints);
    2393       76904 :     COPY_NODE_FIELD(options);
    2394       76904 :     COPY_SCALAR_FIELD(oncommit);
    2395       76904 :     COPY_STRING_FIELD(tablespacename);
    2396       76904 :     COPY_STRING_FIELD(accessMethod);
    2397       76904 :     COPY_SCALAR_FIELD(if_not_exists);
    2398             : 
    2399       76904 :     return newnode;
    2400             : }
    2401             : 
    2402             : static Constraint *
    2403      102344 : _copyConstraint(const Constraint *from)
    2404             : {
    2405      102344 :     Constraint *newnode = makeNode(Constraint);
    2406             : 
    2407      102344 :     COPY_SCALAR_FIELD(contype);
    2408      102344 :     COPY_STRING_FIELD(conname);
    2409      102344 :     COPY_SCALAR_FIELD(deferrable);
    2410      102344 :     COPY_SCALAR_FIELD(initdeferred);
    2411      102344 :     COPY_SCALAR_FIELD(is_enforced);
    2412      102344 :     COPY_SCALAR_FIELD(skip_validation);
    2413      102344 :     COPY_SCALAR_FIELD(initially_valid);
    2414      102344 :     COPY_SCALAR_FIELD(is_no_inherit);
    2415      102344 :     COPY_NODE_FIELD(raw_expr);
    2416      102344 :     COPY_STRING_FIELD(cooked_expr);
    2417      102344 :     COPY_SCALAR_FIELD(generated_when);
    2418      102344 :     COPY_SCALAR_FIELD(generated_kind);
    2419      102344 :     COPY_SCALAR_FIELD(nulls_not_distinct);
    2420      102344 :     COPY_NODE_FIELD(keys);
    2421      102344 :     COPY_SCALAR_FIELD(without_overlaps);
    2422      102344 :     COPY_NODE_FIELD(including);
    2423      102344 :     COPY_NODE_FIELD(exclusions);
    2424      102344 :     COPY_NODE_FIELD(options);
    2425      102344 :     COPY_STRING_FIELD(indexname);
    2426      102344 :     COPY_STRING_FIELD(indexspace);
    2427      102344 :     COPY_SCALAR_FIELD(reset_default_tblspc);
    2428      102344 :     COPY_STRING_FIELD(access_method);
    2429      102344 :     COPY_NODE_FIELD(where_clause);
    2430      102344 :     COPY_NODE_FIELD(pktable);
    2431      102344 :     COPY_NODE_FIELD(fk_attrs);
    2432      102344 :     COPY_NODE_FIELD(pk_attrs);
    2433      102344 :     COPY_SCALAR_FIELD(fk_with_period);
    2434      102344 :     COPY_SCALAR_FIELD(pk_with_period);
    2435      102344 :     COPY_SCALAR_FIELD(fk_matchtype);
    2436      102344 :     COPY_SCALAR_FIELD(fk_upd_action);
    2437      102344 :     COPY_SCALAR_FIELD(fk_del_action);
    2438      102344 :     COPY_NODE_FIELD(fk_del_set_cols);
    2439      102344 :     COPY_NODE_FIELD(old_conpfeqop);
    2440      102344 :     COPY_SCALAR_FIELD(old_pktable_oid);
    2441      102344 :     COPY_LOCATION_FIELD(location);
    2442             : 
    2443      102344 :     return newnode;
    2444             : }
    2445             : 
    2446             : static CreateTableSpaceStmt *
    2447         260 : _copyCreateTableSpaceStmt(const CreateTableSpaceStmt *from)
    2448             : {
    2449         260 :     CreateTableSpaceStmt *newnode = makeNode(CreateTableSpaceStmt);
    2450             : 
    2451         260 :     COPY_STRING_FIELD(tablespacename);
    2452         260 :     COPY_NODE_FIELD(owner);
    2453         260 :     COPY_STRING_FIELD(location);
    2454         260 :     COPY_NODE_FIELD(options);
    2455             : 
    2456         260 :     return newnode;
    2457             : }
    2458             : 
    2459             : static DropTableSpaceStmt *
    2460         128 : _copyDropTableSpaceStmt(const DropTableSpaceStmt *from)
    2461             : {
    2462         128 :     DropTableSpaceStmt *newnode = makeNode(DropTableSpaceStmt);
    2463             : 
    2464         128 :     COPY_STRING_FIELD(tablespacename);
    2465         128 :     COPY_SCALAR_FIELD(missing_ok);
    2466             : 
    2467         128 :     return newnode;
    2468             : }
    2469             : 
    2470             : static AlterTableSpaceOptionsStmt *
    2471          48 : _copyAlterTableSpaceOptionsStmt(const AlterTableSpaceOptionsStmt *from)
    2472             : {
    2473          48 :     AlterTableSpaceOptionsStmt *newnode = makeNode(AlterTableSpaceOptionsStmt);
    2474             : 
    2475          48 :     COPY_STRING_FIELD(tablespacename);
    2476          48 :     COPY_NODE_FIELD(options);
    2477          48 :     COPY_SCALAR_FIELD(isReset);
    2478             : 
    2479          48 :     return newnode;
    2480             : }
    2481             : 
    2482             : static AlterTableMoveAllStmt *
    2483         120 : _copyAlterTableMoveAllStmt(const AlterTableMoveAllStmt *from)
    2484             : {
    2485         120 :     AlterTableMoveAllStmt *newnode = makeNode(AlterTableMoveAllStmt);
    2486             : 
    2487         120 :     COPY_STRING_FIELD(orig_tablespacename);
    2488         120 :     COPY_SCALAR_FIELD(objtype);
    2489         120 :     COPY_NODE_FIELD(roles);
    2490         120 :     COPY_STRING_FIELD(new_tablespacename);
    2491         120 :     COPY_SCALAR_FIELD(nowait);
    2492             : 
    2493         120 :     return newnode;
    2494             : }
    2495             : 
    2496             : static CreateExtensionStmt *
    2497        1122 : _copyCreateExtensionStmt(const CreateExtensionStmt *from)
    2498             : {
    2499        1122 :     CreateExtensionStmt *newnode = makeNode(CreateExtensionStmt);
    2500             : 
    2501        1122 :     COPY_STRING_FIELD(extname);
    2502        1122 :     COPY_SCALAR_FIELD(if_not_exists);
    2503        1122 :     COPY_NODE_FIELD(options);
    2504             : 
    2505        1122 :     return newnode;
    2506             : }
    2507             : 
    2508             : static AlterExtensionStmt *
    2509          86 : _copyAlterExtensionStmt(const AlterExtensionStmt *from)
    2510             : {
    2511          86 :     AlterExtensionStmt *newnode = makeNode(AlterExtensionStmt);
    2512             : 
    2513          86 :     COPY_STRING_FIELD(extname);
    2514          86 :     COPY_NODE_FIELD(options);
    2515             : 
    2516          86 :     return newnode;
    2517             : }
    2518             : 
    2519             : static AlterExtensionContentsStmt *
    2520         570 : _copyAlterExtensionContentsStmt(const AlterExtensionContentsStmt *from)
    2521             : {
    2522         570 :     AlterExtensionContentsStmt *newnode = makeNode(AlterExtensionContentsStmt);
    2523             : 
    2524         570 :     COPY_STRING_FIELD(extname);
    2525         570 :     COPY_SCALAR_FIELD(action);
    2526         570 :     COPY_SCALAR_FIELD(objtype);
    2527         570 :     COPY_NODE_FIELD(object);
    2528             : 
    2529         570 :     return newnode;
    2530             : }
    2531             : 
    2532             : static CreateFdwStmt *
    2533         420 : _copyCreateFdwStmt(const CreateFdwStmt *from)
    2534             : {
    2535         420 :     CreateFdwStmt *newnode = makeNode(CreateFdwStmt);
    2536             : 
    2537         420 :     COPY_STRING_FIELD(fdwname);
    2538         420 :     COPY_NODE_FIELD(func_options);
    2539         420 :     COPY_NODE_FIELD(options);
    2540             : 
    2541         420 :     return newnode;
    2542             : }
    2543             : 
    2544             : static AlterFdwStmt *
    2545         244 : _copyAlterFdwStmt(const AlterFdwStmt *from)
    2546             : {
    2547         244 :     AlterFdwStmt *newnode = makeNode(AlterFdwStmt);
    2548             : 
    2549         244 :     COPY_STRING_FIELD(fdwname);
    2550         244 :     COPY_NODE_FIELD(func_options);
    2551         244 :     COPY_NODE_FIELD(options);
    2552             : 
    2553         244 :     return newnode;
    2554             : }
    2555             : 
    2556             : static CreateForeignServerStmt *
    2557         600 : _copyCreateForeignServerStmt(const CreateForeignServerStmt *from)
    2558             : {
    2559         600 :     CreateForeignServerStmt *newnode = makeNode(CreateForeignServerStmt);
    2560             : 
    2561         600 :     COPY_STRING_FIELD(servername);
    2562         600 :     COPY_STRING_FIELD(servertype);
    2563         600 :     COPY_STRING_FIELD(version);
    2564         600 :     COPY_STRING_FIELD(fdwname);
    2565         600 :     COPY_SCALAR_FIELD(if_not_exists);
    2566         600 :     COPY_NODE_FIELD(options);
    2567             : 
    2568         600 :     return newnode;
    2569             : }
    2570             : 
    2571             : static AlterForeignServerStmt *
    2572         464 : _copyAlterForeignServerStmt(const AlterForeignServerStmt *from)
    2573             : {
    2574         464 :     AlterForeignServerStmt *newnode = makeNode(AlterForeignServerStmt);
    2575             : 
    2576         464 :     COPY_STRING_FIELD(servername);
    2577         464 :     COPY_STRING_FIELD(version);
    2578         464 :     COPY_NODE_FIELD(options);
    2579         464 :     COPY_SCALAR_FIELD(has_version);
    2580             : 
    2581         464 :     return newnode;
    2582             : }
    2583             : 
    2584             : static CreateForeignTableStmt *
    2585         914 : _copyCreateForeignTableStmt(const CreateForeignTableStmt *from)
    2586             : {
    2587         914 :     CreateForeignTableStmt *newnode = makeNode(CreateForeignTableStmt);
    2588             : 
    2589         914 :     COPY_NODE_FIELD(base.relation);
    2590         914 :     COPY_NODE_FIELD(base.tableElts);
    2591         914 :     COPY_NODE_FIELD(base.inhRelations);
    2592         914 :     COPY_NODE_FIELD(base.partbound);
    2593         914 :     COPY_NODE_FIELD(base.partspec);
    2594         914 :     COPY_NODE_FIELD(base.ofTypename);
    2595         914 :     COPY_NODE_FIELD(base.constraints);
    2596         914 :     COPY_NODE_FIELD(base.nnconstraints);
    2597         914 :     COPY_NODE_FIELD(base.options);
    2598         914 :     COPY_SCALAR_FIELD(base.oncommit);
    2599         914 :     COPY_STRING_FIELD(base.tablespacename);
    2600         914 :     COPY_STRING_FIELD(base.accessMethod);
    2601         914 :     COPY_SCALAR_FIELD(base.if_not_exists);
    2602         914 :     COPY_STRING_FIELD(servername);
    2603         914 :     COPY_NODE_FIELD(options);
    2604             : 
    2605         914 :     return newnode;
    2606             : }
    2607             : 
    2608             : static CreateUserMappingStmt *
    2609         510 : _copyCreateUserMappingStmt(const CreateUserMappingStmt *from)
    2610             : {
    2611         510 :     CreateUserMappingStmt *newnode = makeNode(CreateUserMappingStmt);
    2612             : 
    2613         510 :     COPY_NODE_FIELD(user);
    2614         510 :     COPY_STRING_FIELD(servername);
    2615         510 :     COPY_SCALAR_FIELD(if_not_exists);
    2616         510 :     COPY_NODE_FIELD(options);
    2617             : 
    2618         510 :     return newnode;
    2619             : }
    2620             : 
    2621             : static AlterUserMappingStmt *
    2622         236 : _copyAlterUserMappingStmt(const AlterUserMappingStmt *from)
    2623             : {
    2624         236 :     AlterUserMappingStmt *newnode = makeNode(AlterUserMappingStmt);
    2625             : 
    2626         236 :     COPY_NODE_FIELD(user);
    2627         236 :     COPY_STRING_FIELD(servername);
    2628         236 :     COPY_NODE_FIELD(options);
    2629             : 
    2630         236 :     return newnode;
    2631             : }
    2632             : 
    2633             : static DropUserMappingStmt *
    2634         252 : _copyDropUserMappingStmt(const DropUserMappingStmt *from)
    2635             : {
    2636         252 :     DropUserMappingStmt *newnode = makeNode(DropUserMappingStmt);
    2637             : 
    2638         252 :     COPY_NODE_FIELD(user);
    2639         252 :     COPY_STRING_FIELD(servername);
    2640         252 :     COPY_SCALAR_FIELD(missing_ok);
    2641             : 
    2642         252 :     return newnode;
    2643             : }
    2644             : 
    2645             : static ImportForeignSchemaStmt *
    2646          96 : _copyImportForeignSchemaStmt(const ImportForeignSchemaStmt *from)
    2647             : {
    2648          96 :     ImportForeignSchemaStmt *newnode = makeNode(ImportForeignSchemaStmt);
    2649             : 
    2650          96 :     COPY_STRING_FIELD(server_name);
    2651          96 :     COPY_STRING_FIELD(remote_schema);
    2652          96 :     COPY_STRING_FIELD(local_schema);
    2653          96 :     COPY_SCALAR_FIELD(list_type);
    2654          96 :     COPY_NODE_FIELD(table_list);
    2655          96 :     COPY_NODE_FIELD(options);
    2656             : 
    2657          96 :     return newnode;
    2658             : }
    2659             : 
    2660             : static CreatePolicyStmt *
    2661        1502 : _copyCreatePolicyStmt(const CreatePolicyStmt *from)
    2662             : {
    2663        1502 :     CreatePolicyStmt *newnode = makeNode(CreatePolicyStmt);
    2664             : 
    2665        1502 :     COPY_STRING_FIELD(policy_name);
    2666        1502 :     COPY_NODE_FIELD(table);
    2667        1502 :     COPY_STRING_FIELD(cmd_name);
    2668        1502 :     COPY_SCALAR_FIELD(permissive);
    2669        1502 :     COPY_NODE_FIELD(roles);
    2670        1502 :     COPY_NODE_FIELD(qual);
    2671        1502 :     COPY_NODE_FIELD(with_check);
    2672             : 
    2673        1502 :     return newnode;
    2674             : }
    2675             : 
    2676             : static AlterPolicyStmt *
    2677         174 : _copyAlterPolicyStmt(const AlterPolicyStmt *from)
    2678             : {
    2679         174 :     AlterPolicyStmt *newnode = makeNode(AlterPolicyStmt);
    2680             : 
    2681         174 :     COPY_STRING_FIELD(policy_name);
    2682         174 :     COPY_NODE_FIELD(table);
    2683         174 :     COPY_NODE_FIELD(roles);
    2684         174 :     COPY_NODE_FIELD(qual);
    2685         174 :     COPY_NODE_FIELD(with_check);
    2686             : 
    2687         174 :     return newnode;
    2688             : }
    2689             : 
    2690             : static CreateAmStmt *
    2691         124 : _copyCreateAmStmt(const CreateAmStmt *from)
    2692             : {
    2693         124 :     CreateAmStmt *newnode = makeNode(CreateAmStmt);
    2694             : 
    2695         124 :     COPY_STRING_FIELD(amname);
    2696         124 :     COPY_NODE_FIELD(handler_name);
    2697         124 :     COPY_SCALAR_FIELD(amtype);
    2698             : 
    2699         124 :     return newnode;
    2700             : }
    2701             : 
    2702             : static CreateTrigStmt *
    2703        7182 : _copyCreateTrigStmt(const CreateTrigStmt *from)
    2704             : {
    2705        7182 :     CreateTrigStmt *newnode = makeNode(CreateTrigStmt);
    2706             : 
    2707        7182 :     COPY_SCALAR_FIELD(replace);
    2708        7182 :     COPY_SCALAR_FIELD(isconstraint);
    2709        7182 :     COPY_STRING_FIELD(trigname);
    2710        7182 :     COPY_NODE_FIELD(relation);
    2711        7182 :     COPY_NODE_FIELD(funcname);
    2712        7182 :     COPY_NODE_FIELD(args);
    2713        7182 :     COPY_SCALAR_FIELD(row);
    2714        7182 :     COPY_SCALAR_FIELD(timing);
    2715        7182 :     COPY_SCALAR_FIELD(events);
    2716        7182 :     COPY_NODE_FIELD(columns);
    2717        7182 :     COPY_NODE_FIELD(whenClause);
    2718        7182 :     COPY_NODE_FIELD(transitionRels);
    2719        7182 :     COPY_SCALAR_FIELD(deferrable);
    2720        7182 :     COPY_SCALAR_FIELD(initdeferred);
    2721        7182 :     COPY_NODE_FIELD(constrrel);
    2722             : 
    2723        7182 :     return newnode;
    2724             : }
    2725             : 
    2726             : static CreateEventTrigStmt *
    2727         400 : _copyCreateEventTrigStmt(const CreateEventTrigStmt *from)
    2728             : {
    2729         400 :     CreateEventTrigStmt *newnode = makeNode(CreateEventTrigStmt);
    2730             : 
    2731         400 :     COPY_STRING_FIELD(trigname);
    2732         400 :     COPY_STRING_FIELD(eventname);
    2733         400 :     COPY_NODE_FIELD(whenclause);
    2734         400 :     COPY_NODE_FIELD(funcname);
    2735             : 
    2736         400 :     return newnode;
    2737             : }
    2738             : 
    2739             : static AlterEventTrigStmt *
    2740          96 : _copyAlterEventTrigStmt(const AlterEventTrigStmt *from)
    2741             : {
    2742          96 :     AlterEventTrigStmt *newnode = makeNode(AlterEventTrigStmt);
    2743             : 
    2744          96 :     COPY_STRING_FIELD(trigname);
    2745          96 :     COPY_SCALAR_FIELD(tgenabled);
    2746             : 
    2747          96 :     return newnode;
    2748             : }
    2749             : 
    2750             : static CreatePLangStmt *
    2751         284 : _copyCreatePLangStmt(const CreatePLangStmt *from)
    2752             : {
    2753         284 :     CreatePLangStmt *newnode = makeNode(CreatePLangStmt);
    2754             : 
    2755         284 :     COPY_SCALAR_FIELD(replace);
    2756         284 :     COPY_STRING_FIELD(plname);
    2757         284 :     COPY_NODE_FIELD(plhandler);
    2758         284 :     COPY_NODE_FIELD(plinline);
    2759         284 :     COPY_NODE_FIELD(plvalidator);
    2760         284 :     COPY_SCALAR_FIELD(pltrusted);
    2761             : 
    2762         284 :     return newnode;
    2763             : }
    2764             : 
    2765             : static CreateRoleStmt *
    2766        3740 : _copyCreateRoleStmt(const CreateRoleStmt *from)
    2767             : {
    2768        3740 :     CreateRoleStmt *newnode = makeNode(CreateRoleStmt);
    2769             : 
    2770        3740 :     COPY_SCALAR_FIELD(stmt_type);
    2771        3740 :     COPY_STRING_FIELD(role);
    2772        3740 :     COPY_NODE_FIELD(options);
    2773             : 
    2774        3740 :     return newnode;
    2775             : }
    2776             : 
    2777             : static AlterRoleStmt *
    2778         952 : _copyAlterRoleStmt(const AlterRoleStmt *from)
    2779             : {
    2780         952 :     AlterRoleStmt *newnode = makeNode(AlterRoleStmt);
    2781             : 
    2782         952 :     COPY_NODE_FIELD(role);
    2783         952 :     COPY_NODE_FIELD(options);
    2784         952 :     COPY_SCALAR_FIELD(action);
    2785             : 
    2786         952 :     return newnode;
    2787             : }
    2788             : 
    2789             : static AlterRoleSetStmt *
    2790         188 : _copyAlterRoleSetStmt(const AlterRoleSetStmt *from)
    2791             : {
    2792         188 :     AlterRoleSetStmt *newnode = makeNode(AlterRoleSetStmt);
    2793             : 
    2794         188 :     COPY_NODE_FIELD(role);
    2795         188 :     COPY_STRING_FIELD(database);
    2796         188 :     COPY_NODE_FIELD(setstmt);
    2797             : 
    2798         188 :     return newnode;
    2799             : }
    2800             : 
    2801             : static DropRoleStmt *
    2802        3448 : _copyDropRoleStmt(const DropRoleStmt *from)
    2803             : {
    2804        3448 :     DropRoleStmt *newnode = makeNode(DropRoleStmt);
    2805             : 
    2806        3448 :     COPY_NODE_FIELD(roles);
    2807        3448 :     COPY_SCALAR_FIELD(missing_ok);
    2808             : 
    2809        3448 :     return newnode;
    2810             : }
    2811             : 
    2812             : static CreateSeqStmt *
    2813        1454 : _copyCreateSeqStmt(const CreateSeqStmt *from)
    2814             : {
    2815        1454 :     CreateSeqStmt *newnode = makeNode(CreateSeqStmt);
    2816             : 
    2817        1454 :     COPY_NODE_FIELD(sequence);
    2818        1454 :     COPY_NODE_FIELD(options);
    2819        1454 :     COPY_SCALAR_FIELD(ownerId);
    2820        1454 :     COPY_SCALAR_FIELD(for_identity);
    2821        1454 :     COPY_SCALAR_FIELD(if_not_exists);
    2822             : 
    2823        1454 :     return newnode;
    2824             : }
    2825             : 
    2826             : static AlterSeqStmt *
    2827         496 : _copyAlterSeqStmt(const AlterSeqStmt *from)
    2828             : {
    2829         496 :     AlterSeqStmt *newnode = makeNode(AlterSeqStmt);
    2830             : 
    2831         496 :     COPY_NODE_FIELD(sequence);
    2832         496 :     COPY_NODE_FIELD(options);
    2833         496 :     COPY_SCALAR_FIELD(for_identity);
    2834         496 :     COPY_SCALAR_FIELD(missing_ok);
    2835             : 
    2836         496 :     return newnode;
    2837             : }
    2838             : 
    2839             : static DefineStmt *
    2840       18592 : _copyDefineStmt(const DefineStmt *from)
    2841             : {
    2842       18592 :     DefineStmt *newnode = makeNode(DefineStmt);
    2843             : 
    2844       18592 :     COPY_SCALAR_FIELD(kind);
    2845       18592 :     COPY_SCALAR_FIELD(oldstyle);
    2846       18592 :     COPY_NODE_FIELD(defnames);
    2847       18592 :     COPY_NODE_FIELD(args);
    2848       18592 :     COPY_NODE_FIELD(definition);
    2849       18592 :     COPY_SCALAR_FIELD(if_not_exists);
    2850       18592 :     COPY_SCALAR_FIELD(replace);
    2851             : 
    2852       18592 :     return newnode;
    2853             : }
    2854             : 
    2855             : static CreateDomainStmt *
    2856        2958 : _copyCreateDomainStmt(const CreateDomainStmt *from)
    2857             : {
    2858        2958 :     CreateDomainStmt *newnode = makeNode(CreateDomainStmt);
    2859             : 
    2860        2958 :     COPY_NODE_FIELD(domainname);
    2861        2958 :     COPY_NODE_FIELD(typeName);
    2862        2958 :     COPY_NODE_FIELD(collClause);
    2863        2958 :     COPY_NODE_FIELD(constraints);
    2864             : 
    2865        2958 :     return newnode;
    2866             : }
    2867             : 
    2868             : static CreateOpClassStmt *
    2869        1120 : _copyCreateOpClassStmt(const CreateOpClassStmt *from)
    2870             : {
    2871        1120 :     CreateOpClassStmt *newnode = makeNode(CreateOpClassStmt);
    2872             : 
    2873        1120 :     COPY_NODE_FIELD(opclassname);
    2874        1120 :     COPY_NODE_FIELD(opfamilyname);
    2875        1120 :     COPY_STRING_FIELD(amname);
    2876        1120 :     COPY_NODE_FIELD(datatype);
    2877        1120 :     COPY_NODE_FIELD(items);
    2878        1120 :     COPY_SCALAR_FIELD(isDefault);
    2879             : 
    2880        1120 :     return newnode;
    2881             : }
    2882             : 
    2883             : static CreateOpClassItem *
    2884       13798 : _copyCreateOpClassItem(const CreateOpClassItem *from)
    2885             : {
    2886       13798 :     CreateOpClassItem *newnode = makeNode(CreateOpClassItem);
    2887             : 
    2888       13798 :     COPY_SCALAR_FIELD(itemtype);
    2889       13798 :     COPY_NODE_FIELD(name);
    2890       13798 :     COPY_SCALAR_FIELD(number);
    2891       13798 :     COPY_NODE_FIELD(order_family);
    2892       13798 :     COPY_NODE_FIELD(class_args);
    2893       13798 :     COPY_NODE_FIELD(storedtype);
    2894             : 
    2895       13798 :     return newnode;
    2896             : }
    2897             : 
    2898             : static CreateOpFamilyStmt *
    2899         304 : _copyCreateOpFamilyStmt(const CreateOpFamilyStmt *from)
    2900             : {
    2901         304 :     CreateOpFamilyStmt *newnode = makeNode(CreateOpFamilyStmt);
    2902             : 
    2903         304 :     COPY_NODE_FIELD(opfamilyname);
    2904         304 :     COPY_STRING_FIELD(amname);
    2905             : 
    2906         304 :     return newnode;
    2907             : }
    2908             : 
    2909             : static AlterOpFamilyStmt *
    2910        1842 : _copyAlterOpFamilyStmt(const AlterOpFamilyStmt *from)
    2911             : {
    2912        1842 :     AlterOpFamilyStmt *newnode = makeNode(AlterOpFamilyStmt);
    2913             : 
    2914        1842 :     COPY_NODE_FIELD(opfamilyname);
    2915        1842 :     COPY_STRING_FIELD(amname);
    2916        1842 :     COPY_SCALAR_FIELD(isDrop);
    2917        1842 :     COPY_NODE_FIELD(items);
    2918             : 
    2919        1842 :     return newnode;
    2920             : }
    2921             : 
    2922             : static DropStmt *
    2923       52440 : _copyDropStmt(const DropStmt *from)
    2924             : {
    2925       52440 :     DropStmt *newnode = makeNode(DropStmt);
    2926             : 
    2927       52440 :     COPY_NODE_FIELD(objects);
    2928       52440 :     COPY_SCALAR_FIELD(removeType);
    2929       52440 :     COPY_SCALAR_FIELD(behavior);
    2930       52440 :     COPY_SCALAR_FIELD(missing_ok);
    2931       52440 :     COPY_SCALAR_FIELD(concurrent);
    2932             : 
    2933       52440 :     return newnode;
    2934             : }
    2935             : 
    2936             : static TruncateStmt *
    2937        3520 : _copyTruncateStmt(const TruncateStmt *from)
    2938             : {
    2939        3520 :     TruncateStmt *newnode = makeNode(TruncateStmt);
    2940             : 
    2941        3520 :     COPY_NODE_FIELD(relations);
    2942        3520 :     COPY_SCALAR_FIELD(restart_seqs);
    2943        3520 :     COPY_SCALAR_FIELD(behavior);
    2944             : 
    2945        3520 :     return newnode;
    2946             : }
    2947             : 
    2948             : static CommentStmt *
    2949       14212 : _copyCommentStmt(const CommentStmt *from)
    2950             : {
    2951       14212 :     CommentStmt *newnode = makeNode(CommentStmt);
    2952             : 
    2953       14212 :     COPY_SCALAR_FIELD(objtype);
    2954       14212 :     COPY_NODE_FIELD(object);
    2955       14212 :     COPY_STRING_FIELD(comment);
    2956             : 
    2957       14212 :     return newnode;
    2958             : }
    2959             : 
    2960             : static SecLabelStmt *
    2961         238 : _copySecLabelStmt(const SecLabelStmt *from)
    2962             : {
    2963         238 :     SecLabelStmt *newnode = makeNode(SecLabelStmt);
    2964             : 
    2965         238 :     COPY_SCALAR_FIELD(objtype);
    2966         238 :     COPY_NODE_FIELD(object);
    2967         238 :     COPY_STRING_FIELD(provider);
    2968         238 :     COPY_STRING_FIELD(label);
    2969             : 
    2970         238 :     return newnode;
    2971             : }
    2972             : 
    2973             : static DeclareCursorStmt *
    2974       16084 : _copyDeclareCursorStmt(const DeclareCursorStmt *from)
    2975             : {
    2976       16084 :     DeclareCursorStmt *newnode = makeNode(DeclareCursorStmt);
    2977             : 
    2978       16084 :     COPY_STRING_FIELD(portalname);
    2979       16084 :     COPY_SCALAR_FIELD(options);
    2980       16084 :     COPY_NODE_FIELD(query);
    2981             : 
    2982       16084 :     return newnode;
    2983             : }
    2984             : 
    2985             : static ClosePortalStmt *
    2986        4484 : _copyClosePortalStmt(const ClosePortalStmt *from)
    2987             : {
    2988        4484 :     ClosePortalStmt *newnode = makeNode(ClosePortalStmt);
    2989             : 
    2990        4484 :     COPY_STRING_FIELD(portalname);
    2991             : 
    2992        4484 :     return newnode;
    2993             : }
    2994             : 
    2995             : static FetchStmt *
    2996       15428 : _copyFetchStmt(const FetchStmt *from)
    2997             : {
    2998       15428 :     FetchStmt *newnode = makeNode(FetchStmt);
    2999             : 
    3000       15428 :     COPY_SCALAR_FIELD(direction);
    3001       15428 :     COPY_SCALAR_FIELD(howMany);
    3002       15428 :     COPY_STRING_FIELD(portalname);
    3003       15428 :     COPY_SCALAR_FIELD(ismove);
    3004       15428 :     COPY_SCALAR_FIELD(direction_keyword);
    3005       15428 :     COPY_LOCATION_FIELD(location);
    3006             : 
    3007       15428 :     return newnode;
    3008             : }
    3009             : 
    3010             : static IndexStmt *
    3011       13796 : _copyIndexStmt(const IndexStmt *from)
    3012             : {
    3013       13796 :     IndexStmt *newnode = makeNode(IndexStmt);
    3014             : 
    3015       13796 :     COPY_STRING_FIELD(idxname);
    3016       13796 :     COPY_NODE_FIELD(relation);
    3017       13796 :     COPY_STRING_FIELD(accessMethod);
    3018       13796 :     COPY_STRING_FIELD(tableSpace);
    3019       13796 :     COPY_NODE_FIELD(indexParams);
    3020       13796 :     COPY_NODE_FIELD(indexIncludingParams);
    3021       13796 :     COPY_NODE_FIELD(options);
    3022       13796 :     COPY_NODE_FIELD(whereClause);
    3023       13796 :     COPY_NODE_FIELD(excludeOpNames);
    3024       13796 :     COPY_STRING_FIELD(idxcomment);
    3025       13796 :     COPY_SCALAR_FIELD(indexOid);
    3026       13796 :     COPY_SCALAR_FIELD(oldNumber);
    3027       13796 :     COPY_SCALAR_FIELD(oldCreateSubid);
    3028       13796 :     COPY_SCALAR_FIELD(oldFirstRelfilelocatorSubid);
    3029       13796 :     COPY_SCALAR_FIELD(unique);
    3030       13796 :     COPY_SCALAR_FIELD(nulls_not_distinct);
    3031       13796 :     COPY_SCALAR_FIELD(primary);
    3032       13796 :     COPY_SCALAR_FIELD(isconstraint);
    3033       13796 :     COPY_SCALAR_FIELD(iswithoutoverlaps);
    3034       13796 :     COPY_SCALAR_FIELD(deferrable);
    3035       13796 :     COPY_SCALAR_FIELD(initdeferred);
    3036       13796 :     COPY_SCALAR_FIELD(transformed);
    3037       13796 :     COPY_SCALAR_FIELD(concurrent);
    3038       13796 :     COPY_SCALAR_FIELD(if_not_exists);
    3039       13796 :     COPY_SCALAR_FIELD(reset_default_tblspc);
    3040             : 
    3041       13796 :     return newnode;
    3042             : }
    3043             : 
    3044             : static CreateStatsStmt *
    3045        1448 : _copyCreateStatsStmt(const CreateStatsStmt *from)
    3046             : {
    3047        1448 :     CreateStatsStmt *newnode = makeNode(CreateStatsStmt);
    3048             : 
    3049        1448 :     COPY_NODE_FIELD(defnames);
    3050        1448 :     COPY_NODE_FIELD(stat_types);
    3051        1448 :     COPY_NODE_FIELD(exprs);
    3052        1448 :     COPY_NODE_FIELD(relations);
    3053        1448 :     COPY_STRING_FIELD(stxcomment);
    3054        1448 :     COPY_SCALAR_FIELD(transformed);
    3055        1448 :     COPY_SCALAR_FIELD(if_not_exists);
    3056             : 
    3057        1448 :     return newnode;
    3058             : }
    3059             : 
    3060             : static StatsElem *
    3061        3332 : _copyStatsElem(const StatsElem *from)
    3062             : {
    3063        3332 :     StatsElem *newnode = makeNode(StatsElem);
    3064             : 
    3065        3332 :     COPY_STRING_FIELD(name);
    3066        3332 :     COPY_NODE_FIELD(expr);
    3067             : 
    3068        3332 :     return newnode;
    3069             : }
    3070             : 
    3071             : static AlterStatsStmt *
    3072          52 : _copyAlterStatsStmt(const AlterStatsStmt *from)
    3073             : {
    3074          52 :     AlterStatsStmt *newnode = makeNode(AlterStatsStmt);
    3075             : 
    3076          52 :     COPY_NODE_FIELD(defnames);
    3077          52 :     COPY_NODE_FIELD(stxstattarget);
    3078          52 :     COPY_SCALAR_FIELD(missing_ok);
    3079             : 
    3080          52 :     return newnode;
    3081             : }
    3082             : 
    3083             : static CreateFunctionStmt *
    3084       51568 : _copyCreateFunctionStmt(const CreateFunctionStmt *from)
    3085             : {
    3086       51568 :     CreateFunctionStmt *newnode = makeNode(CreateFunctionStmt);
    3087             : 
    3088       51568 :     COPY_SCALAR_FIELD(is_procedure);
    3089       51568 :     COPY_SCALAR_FIELD(replace);
    3090       51568 :     COPY_NODE_FIELD(funcname);
    3091       51568 :     COPY_NODE_FIELD(parameters);
    3092       51568 :     COPY_NODE_FIELD(returnType);
    3093       51568 :     COPY_NODE_FIELD(options);
    3094       51568 :     COPY_NODE_FIELD(sql_body);
    3095             : 
    3096       51568 :     return newnode;
    3097             : }
    3098             : 
    3099             : static FunctionParameter *
    3100      164414 : _copyFunctionParameter(const FunctionParameter *from)
    3101             : {
    3102      164414 :     FunctionParameter *newnode = makeNode(FunctionParameter);
    3103             : 
    3104      164414 :     COPY_STRING_FIELD(name);
    3105      164414 :     COPY_NODE_FIELD(argType);
    3106      164414 :     COPY_SCALAR_FIELD(mode);
    3107      164414 :     COPY_NODE_FIELD(defexpr);
    3108      164414 :     COPY_LOCATION_FIELD(location);
    3109             : 
    3110      164414 :     return newnode;
    3111             : }
    3112             : 
    3113             : static AlterFunctionStmt *
    3114        2788 : _copyAlterFunctionStmt(const AlterFunctionStmt *from)
    3115             : {
    3116        2788 :     AlterFunctionStmt *newnode = makeNode(AlterFunctionStmt);
    3117             : 
    3118        2788 :     COPY_SCALAR_FIELD(objtype);
    3119        2788 :     COPY_NODE_FIELD(func);
    3120        2788 :     COPY_NODE_FIELD(actions);
    3121             : 
    3122        2788 :     return newnode;
    3123             : }
    3124             : 
    3125             : static DoStmt *
    3126        2776 : _copyDoStmt(const DoStmt *from)
    3127             : {
    3128        2776 :     DoStmt *newnode = makeNode(DoStmt);
    3129             : 
    3130        2776 :     COPY_NODE_FIELD(args);
    3131             : 
    3132        2776 :     return newnode;
    3133             : }
    3134             : 
    3135             : static CallStmt *
    3136        1716 : _copyCallStmt(const CallStmt *from)
    3137             : {
    3138        1716 :     CallStmt *newnode = makeNode(CallStmt);
    3139             : 
    3140        1716 :     COPY_NODE_FIELD(funccall);
    3141        1716 :     COPY_NODE_FIELD(funcexpr);
    3142        1716 :     COPY_NODE_FIELD(outargs);
    3143             : 
    3144        1716 :     return newnode;
    3145             : }
    3146             : 
    3147             : static RenameStmt *
    3148        3102 : _copyRenameStmt(const RenameStmt *from)
    3149             : {
    3150        3102 :     RenameStmt *newnode = makeNode(RenameStmt);
    3151             : 
    3152        3102 :     COPY_SCALAR_FIELD(renameType);
    3153        3102 :     COPY_SCALAR_FIELD(relationType);
    3154        3102 :     COPY_NODE_FIELD(relation);
    3155        3102 :     COPY_NODE_FIELD(object);
    3156        3102 :     COPY_STRING_FIELD(subname);
    3157        3102 :     COPY_STRING_FIELD(newname);
    3158        3102 :     COPY_SCALAR_FIELD(behavior);
    3159        3102 :     COPY_SCALAR_FIELD(missing_ok);
    3160             : 
    3161        3102 :     return newnode;
    3162             : }
    3163             : 
    3164             : static AlterObjectDependsStmt *
    3165          92 : _copyAlterObjectDependsStmt(const AlterObjectDependsStmt *from)
    3166             : {
    3167          92 :     AlterObjectDependsStmt *newnode = makeNode(AlterObjectDependsStmt);
    3168             : 
    3169          92 :     COPY_SCALAR_FIELD(objectType);
    3170          92 :     COPY_NODE_FIELD(relation);
    3171          92 :     COPY_NODE_FIELD(object);
    3172          92 :     COPY_NODE_FIELD(extname);
    3173          92 :     COPY_SCALAR_FIELD(remove);
    3174             : 
    3175          92 :     return newnode;
    3176             : }
    3177             : 
    3178             : static AlterObjectSchemaStmt *
    3179         800 : _copyAlterObjectSchemaStmt(const AlterObjectSchemaStmt *from)
    3180             : {
    3181         800 :     AlterObjectSchemaStmt *newnode = makeNode(AlterObjectSchemaStmt);
    3182             : 
    3183         800 :     COPY_SCALAR_FIELD(objectType);
    3184         800 :     COPY_NODE_FIELD(relation);
    3185         800 :     COPY_NODE_FIELD(object);
    3186         800 :     COPY_STRING_FIELD(newschema);
    3187         800 :     COPY_SCALAR_FIELD(missing_ok);
    3188             : 
    3189         800 :     return newnode;
    3190             : }
    3191             : 
    3192             : static AlterOwnerStmt *
    3193        3344 : _copyAlterOwnerStmt(const AlterOwnerStmt *from)
    3194             : {
    3195        3344 :     AlterOwnerStmt *newnode = makeNode(AlterOwnerStmt);
    3196             : 
    3197        3344 :     COPY_SCALAR_FIELD(objectType);
    3198        3344 :     COPY_NODE_FIELD(relation);
    3199        3344 :     COPY_NODE_FIELD(object);
    3200        3344 :     COPY_NODE_FIELD(newowner);
    3201             : 
    3202        3344 :     return newnode;
    3203             : }
    3204             : 
    3205             : static AlterOperatorStmt *
    3206        1216 : _copyAlterOperatorStmt(const AlterOperatorStmt *from)
    3207             : {
    3208        1216 :     AlterOperatorStmt *newnode = makeNode(AlterOperatorStmt);
    3209             : 
    3210        1216 :     COPY_NODE_FIELD(opername);
    3211        1216 :     COPY_NODE_FIELD(options);
    3212             : 
    3213        1216 :     return newnode;
    3214             : }
    3215             : 
    3216             : static AlterTypeStmt *
    3217         120 : _copyAlterTypeStmt(const AlterTypeStmt *from)
    3218             : {
    3219         120 :     AlterTypeStmt *newnode = makeNode(AlterTypeStmt);
    3220             : 
    3221         120 :     COPY_NODE_FIELD(typeName);
    3222         120 :     COPY_NODE_FIELD(options);
    3223             : 
    3224         120 :     return newnode;
    3225             : }
    3226             : 
    3227             : static RuleStmt *
    3228        2192 : _copyRuleStmt(const RuleStmt *from)
    3229             : {
    3230        2192 :     RuleStmt *newnode = makeNode(RuleStmt);
    3231             : 
    3232        2192 :     COPY_NODE_FIELD(relation);
    3233        2192 :     COPY_STRING_FIELD(rulename);
    3234        2192 :     COPY_NODE_FIELD(whereClause);
    3235        2192 :     COPY_SCALAR_FIELD(event);
    3236        2192 :     COPY_SCALAR_FIELD(instead);
    3237        2192 :     COPY_NODE_FIELD(actions);
    3238        2192 :     COPY_SCALAR_FIELD(replace);
    3239             : 
    3240        2192 :     return newnode;
    3241             : }
    3242             : 
    3243             : static NotifyStmt *
    3244         292 : _copyNotifyStmt(const NotifyStmt *from)
    3245             : {
    3246         292 :     NotifyStmt *newnode = makeNode(NotifyStmt);
    3247             : 
    3248         292 :     COPY_STRING_FIELD(conditionname);
    3249         292 :     COPY_STRING_FIELD(payload);
    3250             : 
    3251         292 :     return newnode;
    3252             : }
    3253             : 
    3254             : static ListenStmt *
    3255         148 : _copyListenStmt(const ListenStmt *from)
    3256             : {
    3257         148 :     ListenStmt *newnode = makeNode(ListenStmt);
    3258             : 
    3259         148 :     COPY_STRING_FIELD(conditionname);
    3260             : 
    3261         148 :     return newnode;
    3262             : }
    3263             : 
    3264             : static UnlistenStmt *
    3265          76 : _copyUnlistenStmt(const UnlistenStmt *from)
    3266             : {
    3267          76 :     UnlistenStmt *newnode = makeNode(UnlistenStmt);
    3268             : 
    3269          76 :     COPY_STRING_FIELD(conditionname);
    3270             : 
    3271          76 :     return newnode;
    3272             : }
    3273             : 
    3274             : static TransactionStmt *
    3275       73756 : _copyTransactionStmt(const TransactionStmt *from)
    3276             : {
    3277       73756 :     TransactionStmt *newnode = makeNode(TransactionStmt);
    3278             : 
    3279       73756 :     COPY_SCALAR_FIELD(kind);
    3280       73756 :     COPY_NODE_FIELD(options);
    3281       73756 :     COPY_STRING_FIELD(savepoint_name);
    3282       73756 :     COPY_STRING_FIELD(gid);
    3283       73756 :     COPY_SCALAR_FIELD(chain);
    3284       73756 :     COPY_LOCATION_FIELD(location);
    3285             : 
    3286       73756 :     return newnode;
    3287             : }
    3288             : 
    3289             : static CompositeTypeStmt *
    3290        9016 : _copyCompositeTypeStmt(const CompositeTypeStmt *from)
    3291             : {
    3292        9016 :     CompositeTypeStmt *newnode = makeNode(CompositeTypeStmt);
    3293             : 
    3294        9016 :     COPY_NODE_FIELD(typevar);
    3295        9016 :     COPY_NODE_FIELD(coldeflist);
    3296             : 
    3297        9016 :     return newnode;
    3298             : }
    3299             : 
    3300             : static CreateEnumStmt *
    3301         704 : _copyCreateEnumStmt(const CreateEnumStmt *from)
    3302             : {
    3303         704 :     CreateEnumStmt *newnode = makeNode(CreateEnumStmt);
    3304             : 
    3305         704 :     COPY_NODE_FIELD(typeName);
    3306         704 :     COPY_NODE_FIELD(vals);
    3307             : 
    3308         704 :     return newnode;
    3309             : }
    3310             : 
    3311             : static CreateRangeStmt *
    3312         370 : _copyCreateRangeStmt(const CreateRangeStmt *from)
    3313             : {
    3314         370 :     CreateRangeStmt *newnode = makeNode(CreateRangeStmt);
    3315             : 
    3316         370 :     COPY_NODE_FIELD(typeName);
    3317         370 :     COPY_NODE_FIELD(params);
    3318             : 
    3319         370 :     return newnode;
    3320             : }
    3321             : 
    3322             : static AlterEnumStmt *
    3323         796 : _copyAlterEnumStmt(const AlterEnumStmt *from)
    3324             : {
    3325         796 :     AlterEnumStmt *newnode = makeNode(AlterEnumStmt);
    3326             : 
    3327         796 :     COPY_NODE_FIELD(typeName);
    3328         796 :     COPY_STRING_FIELD(oldVal);
    3329         796 :     COPY_STRING_FIELD(newVal);
    3330         796 :     COPY_STRING_FIELD(newValNeighbor);
    3331         796 :     COPY_SCALAR_FIELD(newValIsAfter);
    3332         796 :     COPY_SCALAR_FIELD(skipIfNewValExists);
    3333             : 
    3334         796 :     return newnode;
    3335             : }
    3336             : 
    3337             : static ViewStmt *
    3338       34202 : _copyViewStmt(const ViewStmt *from)
    3339             : {
    3340       34202 :     ViewStmt *newnode = makeNode(ViewStmt);
    3341             : 
    3342       34202 :     COPY_NODE_FIELD(view);
    3343       34202 :     COPY_NODE_FIELD(aliases);
    3344       34202 :     COPY_NODE_FIELD(query);
    3345       34202 :     COPY_SCALAR_FIELD(replace);
    3346       34202 :     COPY_NODE_FIELD(options);
    3347       34202 :     COPY_SCALAR_FIELD(withCheckOption);
    3348             : 
    3349       34202 :     return newnode;
    3350             : }
    3351             : 
    3352             : static LoadStmt *
    3353         128 : _copyLoadStmt(const LoadStmt *from)
    3354             : {
    3355         128 :     LoadStmt *newnode = makeNode(LoadStmt);
    3356             : 
    3357         128 :     COPY_STRING_FIELD(filename);
    3358             : 
    3359         128 :     return newnode;
    3360             : }
    3361             : 
    3362             : static CreatedbStmt *
    3363        1604 : _copyCreatedbStmt(const CreatedbStmt *from)
    3364             : {
    3365        1604 :     CreatedbStmt *newnode = makeNode(CreatedbStmt);
    3366             : 
    3367        1604 :     COPY_STRING_FIELD(dbname);
    3368        1604 :     COPY_NODE_FIELD(options);
    3369             : 
    3370        1604 :     return newnode;
    3371             : }
    3372             : 
    3373             : static AlterDatabaseStmt *
    3374         164 : _copyAlterDatabaseStmt(const AlterDatabaseStmt *from)
    3375             : {
    3376         164 :     AlterDatabaseStmt *newnode = makeNode(AlterDatabaseStmt);
    3377             : 
    3378         164 :     COPY_STRING_FIELD(dbname);
    3379         164 :     COPY_NODE_FIELD(options);
    3380             : 
    3381         164 :     return newnode;
    3382             : }
    3383             : 
    3384             : static AlterDatabaseRefreshCollStmt *
    3385          12 : _copyAlterDatabaseRefreshCollStmt(const AlterDatabaseRefreshCollStmt *from)
    3386             : {
    3387          12 :     AlterDatabaseRefreshCollStmt *newnode = makeNode(AlterDatabaseRefreshCollStmt);
    3388             : 
    3389          12 :     COPY_STRING_FIELD(dbname);
    3390             : 
    3391          12 :     return newnode;
    3392             : }
    3393             : 
    3394             : static AlterDatabaseSetStmt *
    3395        2460 : _copyAlterDatabaseSetStmt(const AlterDatabaseSetStmt *from)
    3396             : {
    3397        2460 :     AlterDatabaseSetStmt *newnode = makeNode(AlterDatabaseSetStmt);
    3398             : 
    3399        2460 :     COPY_STRING_FIELD(dbname);
    3400        2460 :     COPY_NODE_FIELD(setstmt);
    3401             : 
    3402        2460 :     return newnode;
    3403             : }
    3404             : 
    3405             : static DropdbStmt *
    3406         248 : _copyDropdbStmt(const DropdbStmt *from)
    3407             : {
    3408         248 :     DropdbStmt *newnode = makeNode(DropdbStmt);
    3409             : 
    3410         248 :     COPY_STRING_FIELD(dbname);
    3411         248 :     COPY_SCALAR_FIELD(missing_ok);
    3412         248 :     COPY_NODE_FIELD(options);
    3413             : 
    3414         248 :     return newnode;
    3415             : }
    3416             : 
    3417             : static AlterSystemStmt *
    3418         384 : _copyAlterSystemStmt(const AlterSystemStmt *from)
    3419             : {
    3420         384 :     AlterSystemStmt *newnode = makeNode(AlterSystemStmt);
    3421             : 
    3422         384 :     COPY_NODE_FIELD(setstmt);
    3423             : 
    3424         384 :     return newnode;
    3425             : }
    3426             : 
    3427             : static ClusterStmt *
    3428         472 : _copyClusterStmt(const ClusterStmt *from)
    3429             : {
    3430         472 :     ClusterStmt *newnode = makeNode(ClusterStmt);
    3431             : 
    3432         472 :     COPY_NODE_FIELD(relation);
    3433         472 :     COPY_STRING_FIELD(indexname);
    3434         472 :     COPY_NODE_FIELD(params);
    3435             : 
    3436         472 :     return newnode;
    3437             : }
    3438             : 
    3439             : static VacuumStmt *
    3440       27760 : _copyVacuumStmt(const VacuumStmt *from)
    3441             : {
    3442       27760 :     VacuumStmt *newnode = makeNode(VacuumStmt);
    3443             : 
    3444       27760 :     COPY_NODE_FIELD(options);
    3445       27760 :     COPY_NODE_FIELD(rels);
    3446       27760 :     COPY_SCALAR_FIELD(is_vacuumcmd);
    3447             : 
    3448       27760 :     return newnode;
    3449             : }
    3450             : 
    3451             : static VacuumRelation *
    3452       27380 : _copyVacuumRelation(const VacuumRelation *from)
    3453             : {
    3454       27380 :     VacuumRelation *newnode = makeNode(VacuumRelation);
    3455             : 
    3456       27380 :     COPY_NODE_FIELD(relation);
    3457       27380 :     COPY_SCALAR_FIELD(oid);
    3458       27380 :     COPY_NODE_FIELD(va_cols);
    3459             : 
    3460       27380 :     return newnode;
    3461             : }
    3462             : 
    3463             : static ExplainStmt *
    3464       81072 : _copyExplainStmt(const ExplainStmt *from)
    3465             : {
    3466       81072 :     ExplainStmt *newnode = makeNode(ExplainStmt);
    3467             : 
    3468       81072 :     COPY_NODE_FIELD(query);
    3469       81072 :     COPY_NODE_FIELD(options);
    3470             : 
    3471       81072 :     return newnode;
    3472             : }
    3473             : 
    3474             : static CreateTableAsStmt *
    3475        4176 : _copyCreateTableAsStmt(const CreateTableAsStmt *from)
    3476             : {
    3477        4176 :     CreateTableAsStmt *newnode = makeNode(CreateTableAsStmt);
    3478             : 
    3479        4176 :     COPY_NODE_FIELD(query);
    3480        4176 :     COPY_NODE_FIELD(into);
    3481        4176 :     COPY_SCALAR_FIELD(objtype);
    3482        4176 :     COPY_SCALAR_FIELD(is_select_into);
    3483        4176 :     COPY_SCALAR_FIELD(if_not_exists);
    3484             : 
    3485        4176 :     return newnode;
    3486             : }
    3487             : 
    3488             : static RefreshMatViewStmt *
    3489         544 : _copyRefreshMatViewStmt(const RefreshMatViewStmt *from)
    3490             : {
    3491         544 :     RefreshMatViewStmt *newnode = makeNode(RefreshMatViewStmt);
    3492             : 
    3493         544 :     COPY_SCALAR_FIELD(concurrent);
    3494         544 :     COPY_SCALAR_FIELD(skipData);
    3495         544 :     COPY_NODE_FIELD(relation);
    3496             : 
    3497         544 :     return newnode;
    3498             : }
    3499             : 
    3500             : static CheckPointStmt *
    3501        1130 : _copyCheckPointStmt(const CheckPointStmt *from)
    3502             : {
    3503        1130 :     CheckPointStmt *newnode = makeNode(CheckPointStmt);
    3504             : 
    3505        1130 :     COPY_NODE_FIELD(options);
    3506             : 
    3507        1130 :     return newnode;
    3508             : }
    3509             : 
    3510             : static DiscardStmt *
    3511          60 : _copyDiscardStmt(const DiscardStmt *from)
    3512             : {
    3513          60 :     DiscardStmt *newnode = makeNode(DiscardStmt);
    3514             : 
    3515          60 :     COPY_SCALAR_FIELD(target);
    3516             : 
    3517          60 :     return newnode;
    3518             : }
    3519             : 
    3520             : static LockStmt *
    3521        2448 : _copyLockStmt(const LockStmt *from)
    3522             : {
    3523        2448 :     LockStmt *newnode = makeNode(LockStmt);
    3524             : 
    3525        2448 :     COPY_NODE_FIELD(relations);
    3526        2448 :     COPY_SCALAR_FIELD(mode);
    3527        2448 :     COPY_SCALAR_FIELD(nowait);
    3528             : 
    3529        2448 :     return newnode;
    3530             : }
    3531             : 
    3532             : static ConstraintsSetStmt *
    3533         212 : _copyConstraintsSetStmt(const ConstraintsSetStmt *from)
    3534             : {
    3535         212 :     ConstraintsSetStmt *newnode = makeNode(ConstraintsSetStmt);
    3536             : 
    3537         212 :     COPY_NODE_FIELD(constraints);
    3538         212 :     COPY_SCALAR_FIELD(deferred);
    3539             : 
    3540         212 :     return newnode;
    3541             : }
    3542             : 
    3543             : static ReindexStmt *
    3544        2462 : _copyReindexStmt(const ReindexStmt *from)
    3545             : {
    3546        2462 :     ReindexStmt *newnode = makeNode(ReindexStmt);
    3547             : 
    3548        2462 :     COPY_SCALAR_FIELD(kind);
    3549        2462 :     COPY_NODE_FIELD(relation);
    3550        2462 :     COPY_STRING_FIELD(name);
    3551        2462 :     COPY_NODE_FIELD(params);
    3552             : 
    3553        2462 :     return newnode;
    3554             : }
    3555             : 
    3556             : static CreateConversionStmt *
    3557         130 : _copyCreateConversionStmt(const CreateConversionStmt *from)
    3558             : {
    3559         130 :     CreateConversionStmt *newnode = makeNode(CreateConversionStmt);
    3560             : 
    3561         130 :     COPY_NODE_FIELD(conversion_name);
    3562         130 :     COPY_STRING_FIELD(for_encoding_name);
    3563         130 :     COPY_STRING_FIELD(to_encoding_name);
    3564         130 :     COPY_NODE_FIELD(func_name);
    3565         130 :     COPY_SCALAR_FIELD(def);
    3566             : 
    3567         130 :     return newnode;
    3568             : }
    3569             : 
    3570             : static CreateCastStmt *
    3571         564 : _copyCreateCastStmt(const CreateCastStmt *from)
    3572             : {
    3573         564 :     CreateCastStmt *newnode = makeNode(CreateCastStmt);
    3574             : 
    3575         564 :     COPY_NODE_FIELD(sourcetype);
    3576         564 :     COPY_NODE_FIELD(targettype);
    3577         564 :     COPY_NODE_FIELD(func);
    3578         564 :     COPY_SCALAR_FIELD(context);
    3579         564 :     COPY_SCALAR_FIELD(inout);
    3580             : 
    3581         564 :     return newnode;
    3582             : }
    3583             : 
    3584             : static CreateTransformStmt *
    3585         102 : _copyCreateTransformStmt(const CreateTransformStmt *from)
    3586             : {
    3587         102 :     CreateTransformStmt *newnode = makeNode(CreateTransformStmt);
    3588             : 
    3589         102 :     COPY_SCALAR_FIELD(replace);
    3590         102 :     COPY_NODE_FIELD(type_name);
    3591         102 :     COPY_STRING_FIELD(lang);
    3592         102 :     COPY_NODE_FIELD(fromsql);
    3593         102 :     COPY_NODE_FIELD(tosql);
    3594             : 
    3595         102 :     return newnode;
    3596             : }
    3597             : 
    3598             : static PrepareStmt *
    3599        4084 : _copyPrepareStmt(const PrepareStmt *from)
    3600             : {
    3601        4084 :     PrepareStmt *newnode = makeNode(PrepareStmt);
    3602             : 
    3603        4084 :     COPY_STRING_FIELD(name);
    3604        4084 :     COPY_NODE_FIELD(argtypes);
    3605        4084 :     COPY_NODE_FIELD(query);
    3606             : 
    3607        4084 :     return newnode;
    3608             : }
    3609             : 
    3610             : static ExecuteStmt *
    3611       33380 : _copyExecuteStmt(const ExecuteStmt *from)
    3612             : {
    3613       33380 :     ExecuteStmt *newnode = makeNode(ExecuteStmt);
    3614             : 
    3615       33380 :     COPY_STRING_FIELD(name);
    3616       33380 :     COPY_NODE_FIELD(params);
    3617             : 
    3618       33380 :     return newnode;
    3619             : }
    3620             : 
    3621             : static DeallocateStmt *
    3622        8176 : _copyDeallocateStmt(const DeallocateStmt *from)
    3623             : {
    3624        8176 :     DeallocateStmt *newnode = makeNode(DeallocateStmt);
    3625             : 
    3626        8176 :     COPY_STRING_FIELD(name);
    3627        8176 :     COPY_SCALAR_FIELD(isall);
    3628        8176 :     COPY_LOCATION_FIELD(location);
    3629             : 
    3630        8176 :     return newnode;
    3631             : }
    3632             : 
    3633             : static DropOwnedStmt *
    3634         296 : _copyDropOwnedStmt(const DropOwnedStmt *from)
    3635             : {
    3636         296 :     DropOwnedStmt *newnode = makeNode(DropOwnedStmt);
    3637             : 
    3638         296 :     COPY_NODE_FIELD(roles);
    3639         296 :     COPY_SCALAR_FIELD(behavior);
    3640             : 
    3641         296 :     return newnode;
    3642             : }
    3643             : 
    3644             : static ReassignOwnedStmt *
    3645          92 : _copyReassignOwnedStmt(const ReassignOwnedStmt *from)
    3646             : {
    3647          92 :     ReassignOwnedStmt *newnode = makeNode(ReassignOwnedStmt);
    3648             : 
    3649          92 :     COPY_NODE_FIELD(roles);
    3650          92 :     COPY_NODE_FIELD(newrole);
    3651             : 
    3652          92 :     return newnode;
    3653             : }
    3654             : 
    3655             : static AlterTSDictionaryStmt *
    3656          80 : _copyAlterTSDictionaryStmt(const AlterTSDictionaryStmt *from)
    3657             : {
    3658          80 :     AlterTSDictionaryStmt *newnode = makeNode(AlterTSDictionaryStmt);
    3659             : 
    3660          80 :     COPY_NODE_FIELD(dictname);
    3661          80 :     COPY_NODE_FIELD(options);
    3662             : 
    3663          80 :     return newnode;
    3664             : }
    3665             : 
    3666             : static AlterTSConfigurationStmt *
    3667       17186 : _copyAlterTSConfigurationStmt(const AlterTSConfigurationStmt *from)
    3668             : {
    3669       17186 :     AlterTSConfigurationStmt *newnode = makeNode(AlterTSConfigurationStmt);
    3670             : 
    3671       17186 :     COPY_SCALAR_FIELD(kind);
    3672       17186 :     COPY_NODE_FIELD(cfgname);
    3673       17186 :     COPY_NODE_FIELD(tokentype);
    3674       17186 :     COPY_NODE_FIELD(dicts);
    3675       17186 :     COPY_SCALAR_FIELD(override);
    3676       17186 :     COPY_SCALAR_FIELD(replace);
    3677       17186 :     COPY_SCALAR_FIELD(missing_ok);
    3678             : 
    3679       17186 :     return newnode;
    3680             : }
    3681             : 
    3682             : static PublicationTable *
    3683        2868 : _copyPublicationTable(const PublicationTable *from)
    3684             : {
    3685        2868 :     PublicationTable *newnode = makeNode(PublicationTable);
    3686             : 
    3687        2868 :     COPY_NODE_FIELD(relation);
    3688        2868 :     COPY_NODE_FIELD(whereClause);
    3689        2868 :     COPY_NODE_FIELD(columns);
    3690             : 
    3691        2868 :     return newnode;
    3692             : }
    3693             : 
    3694             : static PublicationObjSpec *
    3695        3660 : _copyPublicationObjSpec(const PublicationObjSpec *from)
    3696             : {
    3697        3660 :     PublicationObjSpec *newnode = makeNode(PublicationObjSpec);
    3698             : 
    3699        3660 :     COPY_SCALAR_FIELD(pubobjtype);
    3700        3660 :     COPY_STRING_FIELD(name);
    3701        3660 :     COPY_NODE_FIELD(pubtable);
    3702        3660 :     COPY_LOCATION_FIELD(location);
    3703             : 
    3704        3660 :     return newnode;
    3705             : }
    3706             : 
    3707             : static PublicationAllObjSpec *
    3708         296 : _copyPublicationAllObjSpec(const PublicationAllObjSpec *from)
    3709             : {
    3710         296 :     PublicationAllObjSpec *newnode = makeNode(PublicationAllObjSpec);
    3711             : 
    3712         296 :     COPY_SCALAR_FIELD(pubobjtype);
    3713         296 :     COPY_LOCATION_FIELD(location);
    3714             : 
    3715         296 :     return newnode;
    3716             : }
    3717             : 
    3718             : static CreatePublicationStmt *
    3719        1804 : _copyCreatePublicationStmt(const CreatePublicationStmt *from)
    3720             : {
    3721        1804 :     CreatePublicationStmt *newnode = makeNode(CreatePublicationStmt);
    3722             : 
    3723        1804 :     COPY_STRING_FIELD(pubname);
    3724        1804 :     COPY_NODE_FIELD(options);
    3725        1804 :     COPY_NODE_FIELD(pubobjects);
    3726        1804 :     COPY_SCALAR_FIELD(for_all_tables);
    3727        1804 :     COPY_SCALAR_FIELD(for_all_sequences);
    3728             : 
    3729        1804 :     return newnode;
    3730             : }
    3731             : 
    3732             : static AlterPublicationStmt *
    3733        2188 : _copyAlterPublicationStmt(const AlterPublicationStmt *from)
    3734             : {
    3735        2188 :     AlterPublicationStmt *newnode = makeNode(AlterPublicationStmt);
    3736             : 
    3737        2188 :     COPY_STRING_FIELD(pubname);
    3738        2188 :     COPY_NODE_FIELD(options);
    3739        2188 :     COPY_NODE_FIELD(pubobjects);
    3740        2188 :     COPY_SCALAR_FIELD(action);
    3741             : 
    3742        2188 :     return newnode;
    3743             : }
    3744             : 
    3745             : static CreateSubscriptionStmt *
    3746         960 : _copyCreateSubscriptionStmt(const CreateSubscriptionStmt *from)
    3747             : {
    3748         960 :     CreateSubscriptionStmt *newnode = makeNode(CreateSubscriptionStmt);
    3749             : 
    3750         960 :     COPY_STRING_FIELD(subname);
    3751         960 :     COPY_STRING_FIELD(conninfo);
    3752         960 :     COPY_NODE_FIELD(publication);
    3753         960 :     COPY_NODE_FIELD(options);
    3754             : 
    3755         960 :     return newnode;
    3756             : }
    3757             : 
    3758             : static AlterSubscriptionStmt *
    3759        1100 : _copyAlterSubscriptionStmt(const AlterSubscriptionStmt *from)
    3760             : {
    3761        1100 :     AlterSubscriptionStmt *newnode = makeNode(AlterSubscriptionStmt);
    3762             : 
    3763        1100 :     COPY_SCALAR_FIELD(kind);
    3764        1100 :     COPY_STRING_FIELD(subname);
    3765        1100 :     COPY_STRING_FIELD(conninfo);
    3766        1100 :     COPY_NODE_FIELD(publication);
    3767        1100 :     COPY_NODE_FIELD(options);
    3768             : 
    3769        1100 :     return newnode;
    3770             : }
    3771             : 
    3772             : static DropSubscriptionStmt *
    3773         496 : _copyDropSubscriptionStmt(const DropSubscriptionStmt *from)
    3774             : {
    3775         496 :     DropSubscriptionStmt *newnode = makeNode(DropSubscriptionStmt);
    3776             : 
    3777         496 :     COPY_STRING_FIELD(subname);
    3778         496 :     COPY_SCALAR_FIELD(missing_ok);
    3779         496 :     COPY_SCALAR_FIELD(behavior);
    3780             : 
    3781         496 :     return newnode;
    3782             : }
    3783             : 
    3784             : static PathKey *
    3785           0 : _copyPathKey(const PathKey *from)
    3786             : {
    3787           0 :     PathKey *newnode = makeNode(PathKey);
    3788             : 
    3789           0 :     COPY_SCALAR_FIELD(pk_eclass);
    3790           0 :     COPY_SCALAR_FIELD(pk_opfamily);
    3791           0 :     COPY_SCALAR_FIELD(pk_cmptype);
    3792           0 :     COPY_SCALAR_FIELD(pk_nulls_first);
    3793             : 
    3794           0 :     return newnode;
    3795             : }
    3796             : 
    3797             : static GroupByOrdering *
    3798           0 : _copyGroupByOrdering(const GroupByOrdering *from)
    3799             : {
    3800           0 :     GroupByOrdering *newnode = makeNode(GroupByOrdering);
    3801             : 
    3802           0 :     COPY_NODE_FIELD(pathkeys);
    3803           0 :     COPY_NODE_FIELD(clauses);
    3804             : 
    3805           0 :     return newnode;
    3806             : }
    3807             : 
    3808             : static RestrictInfo *
    3809           0 : _copyRestrictInfo(const RestrictInfo *from)
    3810             : {
    3811           0 :     RestrictInfo *newnode = makeNode(RestrictInfo);
    3812             : 
    3813           0 :     COPY_NODE_FIELD(clause);
    3814           0 :     COPY_SCALAR_FIELD(is_pushed_down);
    3815           0 :     COPY_SCALAR_FIELD(can_join);
    3816           0 :     COPY_SCALAR_FIELD(pseudoconstant);
    3817           0 :     COPY_SCALAR_FIELD(has_clone);
    3818           0 :     COPY_SCALAR_FIELD(is_clone);
    3819           0 :     COPY_SCALAR_FIELD(leakproof);
    3820           0 :     COPY_SCALAR_FIELD(has_volatile);
    3821           0 :     COPY_SCALAR_FIELD(security_level);
    3822           0 :     COPY_SCALAR_FIELD(num_base_rels);
    3823           0 :     COPY_BITMAPSET_FIELD(clause_relids);
    3824           0 :     COPY_BITMAPSET_FIELD(required_relids);
    3825           0 :     COPY_BITMAPSET_FIELD(incompatible_relids);
    3826           0 :     COPY_BITMAPSET_FIELD(outer_relids);
    3827           0 :     COPY_BITMAPSET_FIELD(left_relids);
    3828           0 :     COPY_BITMAPSET_FIELD(right_relids);
    3829           0 :     COPY_NODE_FIELD(orclause);
    3830           0 :     COPY_SCALAR_FIELD(rinfo_serial);
    3831           0 :     COPY_SCALAR_FIELD(parent_ec);
    3832           0 :     COPY_SCALAR_FIELD(eval_cost);
    3833           0 :     COPY_SCALAR_FIELD(norm_selec);
    3834           0 :     COPY_SCALAR_FIELD(outer_selec);
    3835           0 :     COPY_NODE_FIELD(mergeopfamilies);
    3836           0 :     COPY_SCALAR_FIELD(left_ec);
    3837           0 :     COPY_SCALAR_FIELD(right_ec);
    3838           0 :     COPY_SCALAR_FIELD(left_em);
    3839           0 :     COPY_SCALAR_FIELD(right_em);
    3840           0 :     newnode->scansel_cache = NIL;
    3841           0 :     COPY_SCALAR_FIELD(outer_is_left);
    3842           0 :     COPY_SCALAR_FIELD(hashjoinoperator);
    3843           0 :     COPY_SCALAR_FIELD(left_bucketsize);
    3844           0 :     COPY_SCALAR_FIELD(right_bucketsize);
    3845           0 :     COPY_SCALAR_FIELD(left_mcvfreq);
    3846           0 :     COPY_SCALAR_FIELD(right_mcvfreq);
    3847           0 :     COPY_SCALAR_FIELD(left_hasheqoperator);
    3848           0 :     COPY_SCALAR_FIELD(right_hasheqoperator);
    3849             : 
    3850           0 :     return newnode;
    3851             : }
    3852             : 
    3853             : static PlaceHolderVar *
    3854       14986 : _copyPlaceHolderVar(const PlaceHolderVar *from)
    3855             : {
    3856       14986 :     PlaceHolderVar *newnode = makeNode(PlaceHolderVar);
    3857             : 
    3858       14986 :     COPY_NODE_FIELD(phexpr);
    3859       14986 :     COPY_BITMAPSET_FIELD(phrels);
    3860       14986 :     COPY_BITMAPSET_FIELD(phnullingrels);
    3861       14986 :     COPY_SCALAR_FIELD(phid);
    3862       14986 :     COPY_SCALAR_FIELD(phlevelsup);
    3863             : 
    3864       14986 :     return newnode;
    3865             : }
    3866             : 
    3867             : static SpecialJoinInfo *
    3868           0 : _copySpecialJoinInfo(const SpecialJoinInfo *from)
    3869             : {
    3870           0 :     SpecialJoinInfo *newnode = makeNode(SpecialJoinInfo);
    3871             : 
    3872           0 :     COPY_BITMAPSET_FIELD(min_lefthand);
    3873           0 :     COPY_BITMAPSET_FIELD(min_righthand);
    3874           0 :     COPY_BITMAPSET_FIELD(syn_lefthand);
    3875           0 :     COPY_BITMAPSET_FIELD(syn_righthand);
    3876           0 :     COPY_SCALAR_FIELD(jointype);
    3877           0 :     COPY_SCALAR_FIELD(ojrelid);
    3878           0 :     COPY_BITMAPSET_FIELD(commute_above_l);
    3879           0 :     COPY_BITMAPSET_FIELD(commute_above_r);
    3880           0 :     COPY_BITMAPSET_FIELD(commute_below_l);
    3881           0 :     COPY_BITMAPSET_FIELD(commute_below_r);
    3882           0 :     COPY_SCALAR_FIELD(lhs_strict);
    3883           0 :     COPY_SCALAR_FIELD(semi_can_btree);
    3884           0 :     COPY_SCALAR_FIELD(semi_can_hash);
    3885           0 :     COPY_NODE_FIELD(semi_operators);
    3886           0 :     COPY_NODE_FIELD(semi_rhs_exprs);
    3887             : 
    3888           0 :     return newnode;
    3889             : }
    3890             : 
    3891             : static AppendRelInfo *
    3892       63352 : _copyAppendRelInfo(const AppendRelInfo *from)
    3893             : {
    3894       63352 :     AppendRelInfo *newnode = makeNode(AppendRelInfo);
    3895             : 
    3896       63352 :     COPY_SCALAR_FIELD(parent_relid);
    3897       63352 :     COPY_SCALAR_FIELD(child_relid);
    3898       63352 :     COPY_SCALAR_FIELD(parent_reltype);
    3899       63352 :     COPY_SCALAR_FIELD(child_reltype);
    3900       63352 :     COPY_NODE_FIELD(translated_vars);
    3901       63352 :     COPY_SCALAR_FIELD(num_child_cols);
    3902       63352 :     COPY_POINTER_FIELD(parent_colnos, from->num_child_cols * sizeof(AttrNumber));
    3903       63352 :     COPY_SCALAR_FIELD(parent_reloid);
    3904             : 
    3905       63352 :     return newnode;
    3906             : }
    3907             : 
    3908             : static PlaceHolderInfo *
    3909           0 : _copyPlaceHolderInfo(const PlaceHolderInfo *from)
    3910             : {
    3911           0 :     PlaceHolderInfo *newnode = makeNode(PlaceHolderInfo);
    3912             : 
    3913           0 :     COPY_SCALAR_FIELD(phid);
    3914           0 :     COPY_NODE_FIELD(ph_var);
    3915           0 :     COPY_BITMAPSET_FIELD(ph_eval_at);
    3916           0 :     COPY_BITMAPSET_FIELD(ph_lateral);
    3917           0 :     COPY_BITMAPSET_FIELD(ph_needed);
    3918           0 :     COPY_SCALAR_FIELD(ph_width);
    3919             : 
    3920           0 :     return newnode;
    3921             : }
    3922             : 
    3923             : static AggClauseInfo *
    3924           0 : _copyAggClauseInfo(const AggClauseInfo *from)
    3925             : {
    3926           0 :     AggClauseInfo *newnode = makeNode(AggClauseInfo);
    3927             : 
    3928           0 :     COPY_NODE_FIELD(aggref);
    3929           0 :     COPY_BITMAPSET_FIELD(agg_eval_at);
    3930             : 
    3931           0 :     return newnode;
    3932             : }
    3933             : 
    3934             : static GroupingExprInfo *
    3935           0 : _copyGroupingExprInfo(const GroupingExprInfo *from)
    3936             : {
    3937           0 :     GroupingExprInfo *newnode = makeNode(GroupingExprInfo);
    3938             : 
    3939           0 :     COPY_NODE_FIELD(expr);
    3940           0 :     COPY_SCALAR_FIELD(sortgroupref);
    3941           0 :     COPY_SCALAR_FIELD(ec);
    3942             : 
    3943           0 :     return newnode;
    3944             : }
    3945             : 
    3946             : static PlannedStmt *
    3947      573060 : _copyPlannedStmt(const PlannedStmt *from)
    3948             : {
    3949      573060 :     PlannedStmt *newnode = makeNode(PlannedStmt);
    3950             : 
    3951      573060 :     COPY_SCALAR_FIELD(commandType);
    3952      573060 :     COPY_SCALAR_FIELD(queryId);
    3953      573060 :     COPY_SCALAR_FIELD(planId);
    3954      573060 :     COPY_SCALAR_FIELD(planOrigin);
    3955      573060 :     COPY_SCALAR_FIELD(hasReturning);
    3956      573060 :     COPY_SCALAR_FIELD(hasModifyingCTE);
    3957      573060 :     COPY_SCALAR_FIELD(canSetTag);
    3958      573060 :     COPY_SCALAR_FIELD(transientPlan);
    3959      573060 :     COPY_SCALAR_FIELD(dependsOnRole);
    3960      573060 :     COPY_SCALAR_FIELD(parallelModeNeeded);
    3961      573060 :     COPY_SCALAR_FIELD(jitFlags);
    3962      573060 :     COPY_NODE_FIELD(planTree);
    3963      573060 :     COPY_NODE_FIELD(partPruneInfos);
    3964      573060 :     COPY_NODE_FIELD(rtable);
    3965      573060 :     COPY_BITMAPSET_FIELD(unprunableRelids);
    3966      573060 :     COPY_NODE_FIELD(permInfos);
    3967      573060 :     COPY_NODE_FIELD(resultRelations);
    3968      573060 :     COPY_NODE_FIELD(appendRelations);
    3969      573060 :     COPY_NODE_FIELD(subplans);
    3970      573060 :     COPY_BITMAPSET_FIELD(rewindPlanIDs);
    3971      573060 :     COPY_NODE_FIELD(rowMarks);
    3972      573060 :     COPY_NODE_FIELD(relationOids);
    3973      573060 :     COPY_NODE_FIELD(invalItems);
    3974      573060 :     COPY_NODE_FIELD(paramExecTypes);
    3975      573060 :     COPY_NODE_FIELD(utilityStmt);
    3976      573060 :     COPY_NODE_FIELD(extension_state);
    3977      573060 :     COPY_LOCATION_FIELD(stmt_location);
    3978      573060 :     COPY_LOCATION_FIELD(stmt_len);
    3979             : 
    3980      573060 :     return newnode;
    3981             : }
    3982             : 
    3983             : static Result *
    3984      252334 : _copyResult(const Result *from)
    3985             : {
    3986      252334 :     Result *newnode = makeNode(Result);
    3987             : 
    3988      252334 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    3989      252334 :     COPY_SCALAR_FIELD(plan.startup_cost);
    3990      252334 :     COPY_SCALAR_FIELD(plan.total_cost);
    3991      252334 :     COPY_SCALAR_FIELD(plan.plan_rows);
    3992      252334 :     COPY_SCALAR_FIELD(plan.plan_width);
    3993      252334 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    3994      252334 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    3995      252334 :     COPY_SCALAR_FIELD(plan.async_capable);
    3996      252334 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    3997      252334 :     COPY_NODE_FIELD(plan.targetlist);
    3998      252334 :     COPY_NODE_FIELD(plan.qual);
    3999      252334 :     COPY_NODE_FIELD(plan.lefttree);
    4000      252334 :     COPY_NODE_FIELD(plan.righttree);
    4001      252334 :     COPY_NODE_FIELD(plan.initPlan);
    4002      252334 :     COPY_BITMAPSET_FIELD(plan.extParam);
    4003      252334 :     COPY_BITMAPSET_FIELD(plan.allParam);
    4004      252334 :     COPY_SCALAR_FIELD(result_type);
    4005      252334 :     COPY_NODE_FIELD(resconstantqual);
    4006      252334 :     COPY_BITMAPSET_FIELD(relids);
    4007             : 
    4008      252334 :     return newnode;
    4009             : }
    4010             : 
    4011             : static ProjectSet *
    4012       12132 : _copyProjectSet(const ProjectSet *from)
    4013             : {
    4014       12132 :     ProjectSet *newnode = makeNode(ProjectSet);
    4015             : 
    4016       12132 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    4017       12132 :     COPY_SCALAR_FIELD(plan.startup_cost);
    4018       12132 :     COPY_SCALAR_FIELD(plan.total_cost);
    4019       12132 :     COPY_SCALAR_FIELD(plan.plan_rows);
    4020       12132 :     COPY_SCALAR_FIELD(plan.plan_width);
    4021       12132 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    4022       12132 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    4023       12132 :     COPY_SCALAR_FIELD(plan.async_capable);
    4024       12132 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    4025       12132 :     COPY_NODE_FIELD(plan.targetlist);
    4026       12132 :     COPY_NODE_FIELD(plan.qual);
    4027       12132 :     COPY_NODE_FIELD(plan.lefttree);
    4028       12132 :     COPY_NODE_FIELD(plan.righttree);
    4029       12132 :     COPY_NODE_FIELD(plan.initPlan);
    4030       12132 :     COPY_BITMAPSET_FIELD(plan.extParam);
    4031       12132 :     COPY_BITMAPSET_FIELD(plan.allParam);
    4032             : 
    4033       12132 :     return newnode;
    4034             : }
    4035             : 
    4036             : static ModifyTable *
    4037       95876 : _copyModifyTable(const ModifyTable *from)
    4038             : {
    4039       95876 :     ModifyTable *newnode = makeNode(ModifyTable);
    4040             : 
    4041       95876 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    4042       95876 :     COPY_SCALAR_FIELD(plan.startup_cost);
    4043       95876 :     COPY_SCALAR_FIELD(plan.total_cost);
    4044       95876 :     COPY_SCALAR_FIELD(plan.plan_rows);
    4045       95876 :     COPY_SCALAR_FIELD(plan.plan_width);
    4046       95876 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    4047       95876 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    4048       95876 :     COPY_SCALAR_FIELD(plan.async_capable);
    4049       95876 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    4050       95876 :     COPY_NODE_FIELD(plan.targetlist);
    4051       95876 :     COPY_NODE_FIELD(plan.qual);
    4052       95876 :     COPY_NODE_FIELD(plan.lefttree);
    4053       95876 :     COPY_NODE_FIELD(plan.righttree);
    4054       95876 :     COPY_NODE_FIELD(plan.initPlan);
    4055       95876 :     COPY_BITMAPSET_FIELD(plan.extParam);
    4056       95876 :     COPY_BITMAPSET_FIELD(plan.allParam);
    4057       95876 :     COPY_SCALAR_FIELD(operation);
    4058       95876 :     COPY_SCALAR_FIELD(canSetTag);
    4059       95876 :     COPY_SCALAR_FIELD(nominalRelation);
    4060       95876 :     COPY_SCALAR_FIELD(rootRelation);
    4061       95876 :     COPY_SCALAR_FIELD(partColsUpdated);
    4062       95876 :     COPY_NODE_FIELD(resultRelations);
    4063       95876 :     COPY_NODE_FIELD(updateColnosLists);
    4064       95876 :     COPY_NODE_FIELD(withCheckOptionLists);
    4065       95876 :     COPY_STRING_FIELD(returningOldAlias);
    4066       95876 :     COPY_STRING_FIELD(returningNewAlias);
    4067       95876 :     COPY_NODE_FIELD(returningLists);
    4068       95876 :     COPY_NODE_FIELD(fdwPrivLists);
    4069       95876 :     COPY_BITMAPSET_FIELD(fdwDirectModifyPlans);
    4070       95876 :     COPY_NODE_FIELD(rowMarks);
    4071       95876 :     COPY_SCALAR_FIELD(epqParam);
    4072       95876 :     COPY_SCALAR_FIELD(onConflictAction);
    4073       95876 :     COPY_NODE_FIELD(arbiterIndexes);
    4074       95876 :     COPY_NODE_FIELD(onConflictSet);
    4075       95876 :     COPY_NODE_FIELD(onConflictCols);
    4076       95876 :     COPY_NODE_FIELD(onConflictWhere);
    4077       95876 :     COPY_SCALAR_FIELD(exclRelRTI);
    4078       95876 :     COPY_NODE_FIELD(exclRelTlist);
    4079       95876 :     COPY_NODE_FIELD(mergeActionLists);
    4080       95876 :     COPY_NODE_FIELD(mergeJoinConditions);
    4081             : 
    4082       95876 :     return newnode;
    4083             : }
    4084             : 
    4085             : static Append *
    4086       18298 : _copyAppend(const Append *from)
    4087             : {
    4088       18298 :     Append *newnode = makeNode(Append);
    4089             : 
    4090       18298 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    4091       18298 :     COPY_SCALAR_FIELD(plan.startup_cost);
    4092       18298 :     COPY_SCALAR_FIELD(plan.total_cost);
    4093       18298 :     COPY_SCALAR_FIELD(plan.plan_rows);
    4094       18298 :     COPY_SCALAR_FIELD(plan.plan_width);
    4095       18298 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    4096       18298 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    4097       18298 :     COPY_SCALAR_FIELD(plan.async_capable);
    4098       18298 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    4099       18298 :     COPY_NODE_FIELD(plan.targetlist);
    4100       18298 :     COPY_NODE_FIELD(plan.qual);
    4101       18298 :     COPY_NODE_FIELD(plan.lefttree);
    4102       18298 :     COPY_NODE_FIELD(plan.righttree);
    4103       18298 :     COPY_NODE_FIELD(plan.initPlan);
    4104       18298 :     COPY_BITMAPSET_FIELD(plan.extParam);
    4105       18298 :     COPY_BITMAPSET_FIELD(plan.allParam);
    4106       18298 :     COPY_BITMAPSET_FIELD(apprelids);
    4107       18298 :     COPY_NODE_FIELD(appendplans);
    4108       18298 :     COPY_SCALAR_FIELD(nasyncplans);
    4109       18298 :     COPY_SCALAR_FIELD(first_partial_plan);
    4110       18298 :     COPY_SCALAR_FIELD(part_prune_index);
    4111             : 
    4112       18298 :     return newnode;
    4113             : }
    4114             : 
    4115             : static MergeAppend *
    4116         598 : _copyMergeAppend(const MergeAppend *from)
    4117             : {
    4118         598 :     MergeAppend *newnode = makeNode(MergeAppend);
    4119             : 
    4120         598 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    4121         598 :     COPY_SCALAR_FIELD(plan.startup_cost);
    4122         598 :     COPY_SCALAR_FIELD(plan.total_cost);
    4123         598 :     COPY_SCALAR_FIELD(plan.plan_rows);
    4124         598 :     COPY_SCALAR_FIELD(plan.plan_width);
    4125         598 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    4126         598 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    4127         598 :     COPY_SCALAR_FIELD(plan.async_capable);
    4128         598 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    4129         598 :     COPY_NODE_FIELD(plan.targetlist);
    4130         598 :     COPY_NODE_FIELD(plan.qual);
    4131         598 :     COPY_NODE_FIELD(plan.lefttree);
    4132         598 :     COPY_NODE_FIELD(plan.righttree);
    4133         598 :     COPY_NODE_FIELD(plan.initPlan);
    4134         598 :     COPY_BITMAPSET_FIELD(plan.extParam);
    4135         598 :     COPY_BITMAPSET_FIELD(plan.allParam);
    4136         598 :     COPY_BITMAPSET_FIELD(apprelids);
    4137         598 :     COPY_NODE_FIELD(mergeplans);
    4138         598 :     COPY_SCALAR_FIELD(numCols);
    4139         598 :     COPY_POINTER_FIELD(sortColIdx, from->numCols * sizeof(AttrNumber));
    4140         598 :     COPY_POINTER_FIELD(sortOperators, from->numCols * sizeof(Oid));
    4141         598 :     COPY_POINTER_FIELD(collations, from->numCols * sizeof(Oid));
    4142         598 :     COPY_POINTER_FIELD(nullsFirst, from->numCols * sizeof(bool));
    4143         598 :     COPY_SCALAR_FIELD(part_prune_index);
    4144             : 
    4145         598 :     return newnode;
    4146             : }
    4147             : 
    4148             : static RecursiveUnion *
    4149         922 : _copyRecursiveUnion(const RecursiveUnion *from)
    4150             : {
    4151         922 :     RecursiveUnion *newnode = makeNode(RecursiveUnion);
    4152             : 
    4153         922 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    4154         922 :     COPY_SCALAR_FIELD(plan.startup_cost);
    4155         922 :     COPY_SCALAR_FIELD(plan.total_cost);
    4156         922 :     COPY_SCALAR_FIELD(plan.plan_rows);
    4157         922 :     COPY_SCALAR_FIELD(plan.plan_width);
    4158         922 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    4159         922 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    4160         922 :     COPY_SCALAR_FIELD(plan.async_capable);
    4161         922 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    4162         922 :     COPY_NODE_FIELD(plan.targetlist);
    4163         922 :     COPY_NODE_FIELD(plan.qual);
    4164         922 :     COPY_NODE_FIELD(plan.lefttree);
    4165         922 :     COPY_NODE_FIELD(plan.righttree);
    4166         922 :     COPY_NODE_FIELD(plan.initPlan);
    4167         922 :     COPY_BITMAPSET_FIELD(plan.extParam);
    4168         922 :     COPY_BITMAPSET_FIELD(plan.allParam);
    4169         922 :     COPY_SCALAR_FIELD(wtParam);
    4170         922 :     COPY_SCALAR_FIELD(numCols);
    4171         922 :     COPY_POINTER_FIELD(dupColIdx, from->numCols * sizeof(AttrNumber));
    4172         922 :     COPY_POINTER_FIELD(dupOperators, from->numCols * sizeof(Oid));
    4173         922 :     COPY_POINTER_FIELD(dupCollations, from->numCols * sizeof(Oid));
    4174         922 :     COPY_SCALAR_FIELD(numGroups);
    4175             : 
    4176         922 :     return newnode;
    4177             : }
    4178             : 
    4179             : static BitmapAnd *
    4180         246 : _copyBitmapAnd(const BitmapAnd *from)
    4181             : {
    4182         246 :     BitmapAnd *newnode = makeNode(BitmapAnd);
    4183             : 
    4184         246 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    4185         246 :     COPY_SCALAR_FIELD(plan.startup_cost);
    4186         246 :     COPY_SCALAR_FIELD(plan.total_cost);
    4187         246 :     COPY_SCALAR_FIELD(plan.plan_rows);
    4188         246 :     COPY_SCALAR_FIELD(plan.plan_width);
    4189         246 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    4190         246 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    4191         246 :     COPY_SCALAR_FIELD(plan.async_capable);
    4192         246 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    4193         246 :     COPY_NODE_FIELD(plan.targetlist);
    4194         246 :     COPY_NODE_FIELD(plan.qual);
    4195         246 :     COPY_NODE_FIELD(plan.lefttree);
    4196         246 :     COPY_NODE_FIELD(plan.righttree);
    4197         246 :     COPY_NODE_FIELD(plan.initPlan);
    4198         246 :     COPY_BITMAPSET_FIELD(plan.extParam);
    4199         246 :     COPY_BITMAPSET_FIELD(plan.allParam);
    4200         246 :     COPY_NODE_FIELD(bitmapplans);
    4201             : 
    4202         246 :     return newnode;
    4203             : }
    4204             : 
    4205             : static BitmapOr *
    4206         424 : _copyBitmapOr(const BitmapOr *from)
    4207             : {
    4208         424 :     BitmapOr *newnode = makeNode(BitmapOr);
    4209             : 
    4210         424 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    4211         424 :     COPY_SCALAR_FIELD(plan.startup_cost);
    4212         424 :     COPY_SCALAR_FIELD(plan.total_cost);
    4213         424 :     COPY_SCALAR_FIELD(plan.plan_rows);
    4214         424 :     COPY_SCALAR_FIELD(plan.plan_width);
    4215         424 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    4216         424 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    4217         424 :     COPY_SCALAR_FIELD(plan.async_capable);
    4218         424 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    4219         424 :     COPY_NODE_FIELD(plan.targetlist);
    4220         424 :     COPY_NODE_FIELD(plan.qual);
    4221         424 :     COPY_NODE_FIELD(plan.lefttree);
    4222         424 :     COPY_NODE_FIELD(plan.righttree);
    4223         424 :     COPY_NODE_FIELD(plan.initPlan);
    4224         424 :     COPY_BITMAPSET_FIELD(plan.extParam);
    4225         424 :     COPY_BITMAPSET_FIELD(plan.allParam);
    4226         424 :     COPY_SCALAR_FIELD(isshared);
    4227         424 :     COPY_NODE_FIELD(bitmapplans);
    4228             : 
    4229         424 :     return newnode;
    4230             : }
    4231             : 
    4232             : static SeqScan *
    4233      235052 : _copySeqScan(const SeqScan *from)
    4234             : {
    4235      235052 :     SeqScan *newnode = makeNode(SeqScan);
    4236             : 
    4237      235052 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4238      235052 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4239      235052 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4240      235052 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4241      235052 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4242      235052 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4243      235052 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4244      235052 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4245      235052 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4246      235052 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4247      235052 :     COPY_NODE_FIELD(scan.plan.qual);
    4248      235052 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4249      235052 :     COPY_NODE_FIELD(scan.plan.righttree);
    4250      235052 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4251      235052 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4252      235052 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4253      235052 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4254             : 
    4255      235052 :     return newnode;
    4256             : }
    4257             : 
    4258             : static SampleScan *
    4259         312 : _copySampleScan(const SampleScan *from)
    4260             : {
    4261         312 :     SampleScan *newnode = makeNode(SampleScan);
    4262             : 
    4263         312 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4264         312 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4265         312 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4266         312 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4267         312 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4268         312 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4269         312 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4270         312 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4271         312 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4272         312 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4273         312 :     COPY_NODE_FIELD(scan.plan.qual);
    4274         312 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4275         312 :     COPY_NODE_FIELD(scan.plan.righttree);
    4276         312 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4277         312 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4278         312 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4279         312 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4280         312 :     COPY_NODE_FIELD(tablesample);
    4281             : 
    4282         312 :     return newnode;
    4283             : }
    4284             : 
    4285             : static IndexScan *
    4286      157742 : _copyIndexScan(const IndexScan *from)
    4287             : {
    4288      157742 :     IndexScan *newnode = makeNode(IndexScan);
    4289             : 
    4290      157742 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4291      157742 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4292      157742 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4293      157742 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4294      157742 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4295      157742 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4296      157742 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4297      157742 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4298      157742 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4299      157742 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4300      157742 :     COPY_NODE_FIELD(scan.plan.qual);
    4301      157742 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4302      157742 :     COPY_NODE_FIELD(scan.plan.righttree);
    4303      157742 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4304      157742 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4305      157742 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4306      157742 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4307      157742 :     COPY_SCALAR_FIELD(indexid);
    4308      157742 :     COPY_NODE_FIELD(indexqual);
    4309      157742 :     COPY_NODE_FIELD(indexqualorig);
    4310      157742 :     COPY_NODE_FIELD(indexorderby);
    4311      157742 :     COPY_NODE_FIELD(indexorderbyorig);
    4312      157742 :     COPY_NODE_FIELD(indexorderbyops);
    4313      157742 :     COPY_SCALAR_FIELD(indexorderdir);
    4314             : 
    4315      157742 :     return newnode;
    4316             : }
    4317             : 
    4318             : static IndexOnlyScan *
    4319       20730 : _copyIndexOnlyScan(const IndexOnlyScan *from)
    4320             : {
    4321       20730 :     IndexOnlyScan *newnode = makeNode(IndexOnlyScan);
    4322             : 
    4323       20730 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4324       20730 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4325       20730 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4326       20730 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4327       20730 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4328       20730 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4329       20730 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4330       20730 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4331       20730 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4332       20730 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4333       20730 :     COPY_NODE_FIELD(scan.plan.qual);
    4334       20730 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4335       20730 :     COPY_NODE_FIELD(scan.plan.righttree);
    4336       20730 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4337       20730 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4338       20730 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4339       20730 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4340       20730 :     COPY_SCALAR_FIELD(indexid);
    4341       20730 :     COPY_NODE_FIELD(indexqual);
    4342       20730 :     COPY_NODE_FIELD(recheckqual);
    4343       20730 :     COPY_NODE_FIELD(indexorderby);
    4344       20730 :     COPY_NODE_FIELD(indextlist);
    4345       20730 :     COPY_SCALAR_FIELD(indexorderdir);
    4346             : 
    4347       20730 :     return newnode;
    4348             : }
    4349             : 
    4350             : static BitmapIndexScan *
    4351       22648 : _copyBitmapIndexScan(const BitmapIndexScan *from)
    4352             : {
    4353       22648 :     BitmapIndexScan *newnode = makeNode(BitmapIndexScan);
    4354             : 
    4355       22648 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4356       22648 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4357       22648 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4358       22648 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4359       22648 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4360       22648 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4361       22648 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4362       22648 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4363       22648 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4364       22648 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4365       22648 :     COPY_NODE_FIELD(scan.plan.qual);
    4366       22648 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4367       22648 :     COPY_NODE_FIELD(scan.plan.righttree);
    4368       22648 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4369       22648 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4370       22648 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4371       22648 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4372       22648 :     COPY_SCALAR_FIELD(indexid);
    4373       22648 :     COPY_SCALAR_FIELD(isshared);
    4374       22648 :     COPY_NODE_FIELD(indexqual);
    4375       22648 :     COPY_NODE_FIELD(indexqualorig);
    4376             : 
    4377       22648 :     return newnode;
    4378             : }
    4379             : 
    4380             : static BitmapHeapScan *
    4381       21972 : _copyBitmapHeapScan(const BitmapHeapScan *from)
    4382             : {
    4383       21972 :     BitmapHeapScan *newnode = makeNode(BitmapHeapScan);
    4384             : 
    4385       21972 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4386       21972 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4387       21972 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4388       21972 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4389       21972 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4390       21972 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4391       21972 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4392       21972 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4393       21972 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4394       21972 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4395       21972 :     COPY_NODE_FIELD(scan.plan.qual);
    4396       21972 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4397       21972 :     COPY_NODE_FIELD(scan.plan.righttree);
    4398       21972 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4399       21972 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4400       21972 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4401       21972 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4402       21972 :     COPY_NODE_FIELD(bitmapqualorig);
    4403             : 
    4404       21972 :     return newnode;
    4405             : }
    4406             : 
    4407             : static TidScan *
    4408        1020 : _copyTidScan(const TidScan *from)
    4409             : {
    4410        1020 :     TidScan *newnode = makeNode(TidScan);
    4411             : 
    4412        1020 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4413        1020 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4414        1020 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4415        1020 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4416        1020 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4417        1020 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4418        1020 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4419        1020 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4420        1020 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4421        1020 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4422        1020 :     COPY_NODE_FIELD(scan.plan.qual);
    4423        1020 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4424        1020 :     COPY_NODE_FIELD(scan.plan.righttree);
    4425        1020 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4426        1020 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4427        1020 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4428        1020 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4429        1020 :     COPY_NODE_FIELD(tidquals);
    4430             : 
    4431        1020 :     return newnode;
    4432             : }
    4433             : 
    4434             : static TidRangeScan *
    4435        3684 : _copyTidRangeScan(const TidRangeScan *from)
    4436             : {
    4437        3684 :     TidRangeScan *newnode = makeNode(TidRangeScan);
    4438             : 
    4439        3684 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4440        3684 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4441        3684 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4442        3684 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4443        3684 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4444        3684 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4445        3684 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4446        3684 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4447        3684 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4448        3684 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4449        3684 :     COPY_NODE_FIELD(scan.plan.qual);
    4450        3684 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4451        3684 :     COPY_NODE_FIELD(scan.plan.righttree);
    4452        3684 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4453        3684 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4454        3684 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4455        3684 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4456        3684 :     COPY_NODE_FIELD(tidrangequals);
    4457             : 
    4458        3684 :     return newnode;
    4459             : }
    4460             : 
    4461             : static SubqueryScan *
    4462       16212 : _copySubqueryScan(const SubqueryScan *from)
    4463             : {
    4464       16212 :     SubqueryScan *newnode = makeNode(SubqueryScan);
    4465             : 
    4466       16212 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4467       16212 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4468       16212 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4469       16212 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4470       16212 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4471       16212 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4472       16212 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4473       16212 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4474       16212 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4475       16212 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4476       16212 :     COPY_NODE_FIELD(scan.plan.qual);
    4477       16212 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4478       16212 :     COPY_NODE_FIELD(scan.plan.righttree);
    4479       16212 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4480       16212 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4481       16212 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4482       16212 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4483       16212 :     COPY_NODE_FIELD(subplan);
    4484       16212 :     COPY_SCALAR_FIELD(scanstatus);
    4485             : 
    4486       16212 :     return newnode;
    4487             : }
    4488             : 
    4489             : static FunctionScan *
    4490       54516 : _copyFunctionScan(const FunctionScan *from)
    4491             : {
    4492       54516 :     FunctionScan *newnode = makeNode(FunctionScan);
    4493             : 
    4494       54516 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4495       54516 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4496       54516 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4497       54516 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4498       54516 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4499       54516 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4500       54516 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4501       54516 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4502       54516 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4503       54516 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4504       54516 :     COPY_NODE_FIELD(scan.plan.qual);
    4505       54516 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4506       54516 :     COPY_NODE_FIELD(scan.plan.righttree);
    4507       54516 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4508       54516 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4509       54516 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4510       54516 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4511       54516 :     COPY_NODE_FIELD(functions);
    4512       54516 :     COPY_SCALAR_FIELD(funcordinality);
    4513             : 
    4514       54516 :     return newnode;
    4515             : }
    4516             : 
    4517             : static ValuesScan *
    4518        8488 : _copyValuesScan(const ValuesScan *from)
    4519             : {
    4520        8488 :     ValuesScan *newnode = makeNode(ValuesScan);
    4521             : 
    4522        8488 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4523        8488 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4524        8488 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4525        8488 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4526        8488 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4527        8488 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4528        8488 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4529        8488 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4530        8488 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4531        8488 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4532        8488 :     COPY_NODE_FIELD(scan.plan.qual);
    4533        8488 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4534        8488 :     COPY_NODE_FIELD(scan.plan.righttree);
    4535        8488 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4536        8488 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4537        8488 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4538        8488 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4539        8488 :     COPY_NODE_FIELD(values_lists);
    4540             : 
    4541        8488 :     return newnode;
    4542             : }
    4543             : 
    4544             : static TableFuncScan *
    4545         632 : _copyTableFuncScan(const TableFuncScan *from)
    4546             : {
    4547         632 :     TableFuncScan *newnode = makeNode(TableFuncScan);
    4548             : 
    4549         632 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4550         632 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4551         632 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4552         632 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4553         632 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4554         632 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4555         632 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4556         632 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4557         632 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4558         632 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4559         632 :     COPY_NODE_FIELD(scan.plan.qual);
    4560         632 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4561         632 :     COPY_NODE_FIELD(scan.plan.righttree);
    4562         632 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4563         632 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4564         632 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4565         632 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4566         632 :     COPY_NODE_FIELD(tablefunc);
    4567             : 
    4568         632 :     return newnode;
    4569             : }
    4570             : 
    4571             : static CteScan *
    4572        4324 : _copyCteScan(const CteScan *from)
    4573             : {
    4574        4324 :     CteScan *newnode = makeNode(CteScan);
    4575             : 
    4576        4324 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4577        4324 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4578        4324 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4579        4324 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4580        4324 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4581        4324 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4582        4324 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4583        4324 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4584        4324 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4585        4324 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4586        4324 :     COPY_NODE_FIELD(scan.plan.qual);
    4587        4324 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4588        4324 :     COPY_NODE_FIELD(scan.plan.righttree);
    4589        4324 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4590        4324 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4591        4324 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4592        4324 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4593        4324 :     COPY_SCALAR_FIELD(ctePlanId);
    4594        4324 :     COPY_SCALAR_FIELD(cteParam);
    4595             : 
    4596        4324 :     return newnode;
    4597             : }
    4598             : 
    4599             : static NamedTuplestoreScan *
    4600         928 : _copyNamedTuplestoreScan(const NamedTuplestoreScan *from)
    4601             : {
    4602         928 :     NamedTuplestoreScan *newnode = makeNode(NamedTuplestoreScan);
    4603             : 
    4604         928 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4605         928 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4606         928 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4607         928 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4608         928 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4609         928 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4610         928 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4611         928 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4612         928 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4613         928 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4614         928 :     COPY_NODE_FIELD(scan.plan.qual);
    4615         928 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4616         928 :     COPY_NODE_FIELD(scan.plan.righttree);
    4617         928 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4618         928 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4619         928 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4620         928 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4621         928 :     COPY_STRING_FIELD(enrname);
    4622             : 
    4623         928 :     return newnode;
    4624             : }
    4625             : 
    4626             : static WorkTableScan *
    4627         922 : _copyWorkTableScan(const WorkTableScan *from)
    4628             : {
    4629         922 :     WorkTableScan *newnode = makeNode(WorkTableScan);
    4630             : 
    4631         922 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4632         922 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4633         922 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4634         922 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4635         922 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4636         922 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4637         922 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4638         922 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4639         922 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4640         922 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4641         922 :     COPY_NODE_FIELD(scan.plan.qual);
    4642         922 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4643         922 :     COPY_NODE_FIELD(scan.plan.righttree);
    4644         922 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4645         922 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4646         922 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4647         922 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4648         922 :     COPY_SCALAR_FIELD(wtParam);
    4649             : 
    4650         922 :     return newnode;
    4651             : }
    4652             : 
    4653             : static ForeignScan *
    4654        2102 : _copyForeignScan(const ForeignScan *from)
    4655             : {
    4656        2102 :     ForeignScan *newnode = makeNode(ForeignScan);
    4657             : 
    4658        2102 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4659        2102 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4660        2102 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4661        2102 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4662        2102 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4663        2102 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4664        2102 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4665        2102 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4666        2102 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4667        2102 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4668        2102 :     COPY_NODE_FIELD(scan.plan.qual);
    4669        2102 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4670        2102 :     COPY_NODE_FIELD(scan.plan.righttree);
    4671        2102 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4672        2102 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4673        2102 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4674        2102 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4675        2102 :     COPY_SCALAR_FIELD(operation);
    4676        2102 :     COPY_SCALAR_FIELD(resultRelation);
    4677        2102 :     COPY_SCALAR_FIELD(checkAsUser);
    4678        2102 :     COPY_SCALAR_FIELD(fs_server);
    4679        2102 :     COPY_NODE_FIELD(fdw_exprs);
    4680        2102 :     COPY_NODE_FIELD(fdw_private);
    4681        2102 :     COPY_NODE_FIELD(fdw_scan_tlist);
    4682        2102 :     COPY_NODE_FIELD(fdw_recheck_quals);
    4683        2102 :     COPY_BITMAPSET_FIELD(fs_relids);
    4684        2102 :     COPY_BITMAPSET_FIELD(fs_base_relids);
    4685        2102 :     COPY_SCALAR_FIELD(fsSystemCol);
    4686             : 
    4687        2102 :     return newnode;
    4688             : }
    4689             : 
    4690             : static CustomScan *
    4691           0 : _copyCustomScan(const CustomScan *from)
    4692             : {
    4693           0 :     CustomScan *newnode = makeNode(CustomScan);
    4694             : 
    4695           0 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4696           0 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4697           0 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4698           0 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4699           0 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4700           0 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4701           0 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4702           0 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4703           0 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4704           0 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4705           0 :     COPY_NODE_FIELD(scan.plan.qual);
    4706           0 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4707           0 :     COPY_NODE_FIELD(scan.plan.righttree);
    4708           0 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4709           0 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4710           0 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4711           0 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4712           0 :     COPY_SCALAR_FIELD(flags);
    4713           0 :     COPY_NODE_FIELD(custom_plans);
    4714           0 :     COPY_NODE_FIELD(custom_exprs);
    4715           0 :     COPY_NODE_FIELD(custom_private);
    4716           0 :     COPY_NODE_FIELD(custom_scan_tlist);
    4717           0 :     COPY_BITMAPSET_FIELD(custom_relids);
    4718           0 :     COPY_SCALAR_FIELD(methods);
    4719             : 
    4720           0 :     return newnode;
    4721             : }
    4722             : 
    4723             : static NestLoop *
    4724      101140 : _copyNestLoop(const NestLoop *from)
    4725             : {
    4726      101140 :     NestLoop *newnode = makeNode(NestLoop);
    4727             : 
    4728      101140 :     COPY_SCALAR_FIELD(join.plan.disabled_nodes);
    4729      101140 :     COPY_SCALAR_FIELD(join.plan.startup_cost);
    4730      101140 :     COPY_SCALAR_FIELD(join.plan.total_cost);
    4731      101140 :     COPY_SCALAR_FIELD(join.plan.plan_rows);
    4732      101140 :     COPY_SCALAR_FIELD(join.plan.plan_width);
    4733      101140 :     COPY_SCALAR_FIELD(join.plan.parallel_aware);
    4734      101140 :     COPY_SCALAR_FIELD(join.plan.parallel_safe);
    4735      101140 :     COPY_SCALAR_FIELD(join.plan.async_capable);
    4736      101140 :     COPY_SCALAR_FIELD(join.plan.plan_node_id);
    4737      101140 :     COPY_NODE_FIELD(join.plan.targetlist);
    4738      101140 :     COPY_NODE_FIELD(join.plan.qual);
    4739      101140 :     COPY_NODE_FIELD(join.plan.lefttree);
    4740      101140 :     COPY_NODE_FIELD(join.plan.righttree);
    4741      101140 :     COPY_NODE_FIELD(join.plan.initPlan);
    4742      101140 :     COPY_BITMAPSET_FIELD(join.plan.extParam);
    4743      101140 :     COPY_BITMAPSET_FIELD(join.plan.allParam);
    4744      101140 :     COPY_SCALAR_FIELD(join.jointype);
    4745      101140 :     COPY_SCALAR_FIELD(join.inner_unique);
    4746      101140 :     COPY_NODE_FIELD(join.joinqual);
    4747      101140 :     COPY_NODE_FIELD(nestParams);
    4748             : 
    4749      101140 :     return newnode;
    4750             : }
    4751             : 
    4752             : static NestLoopParam *
    4753       57328 : _copyNestLoopParam(const NestLoopParam *from)
    4754             : {
    4755       57328 :     NestLoopParam *newnode = makeNode(NestLoopParam);
    4756             : 
    4757       57328 :     COPY_SCALAR_FIELD(paramno);
    4758       57328 :     COPY_NODE_FIELD(paramval);
    4759             : 
    4760       57328 :     return newnode;
    4761             : }
    4762             : 
    4763             : static MergeJoin *
    4764        9172 : _copyMergeJoin(const MergeJoin *from)
    4765             : {
    4766        9172 :     MergeJoin *newnode = makeNode(MergeJoin);
    4767             : 
    4768        9172 :     COPY_SCALAR_FIELD(join.plan.disabled_nodes);
    4769        9172 :     COPY_SCALAR_FIELD(join.plan.startup_cost);
    4770        9172 :     COPY_SCALAR_FIELD(join.plan.total_cost);
    4771        9172 :     COPY_SCALAR_FIELD(join.plan.plan_rows);
    4772        9172 :     COPY_SCALAR_FIELD(join.plan.plan_width);
    4773        9172 :     COPY_SCALAR_FIELD(join.plan.parallel_aware);
    4774        9172 :     COPY_SCALAR_FIELD(join.plan.parallel_safe);
    4775        9172 :     COPY_SCALAR_FIELD(join.plan.async_capable);
    4776        9172 :     COPY_SCALAR_FIELD(join.plan.plan_node_id);
    4777        9172 :     COPY_NODE_FIELD(join.plan.targetlist);
    4778        9172 :     COPY_NODE_FIELD(join.plan.qual);
    4779        9172 :     COPY_NODE_FIELD(join.plan.lefttree);
    4780        9172 :     COPY_NODE_FIELD(join.plan.righttree);
    4781        9172 :     COPY_NODE_FIELD(join.plan.initPlan);
    4782        9172 :     COPY_BITMAPSET_FIELD(join.plan.extParam);
    4783        9172 :     COPY_BITMAPSET_FIELD(join.plan.allParam);
    4784        9172 :     COPY_SCALAR_FIELD(join.jointype);
    4785        9172 :     COPY_SCALAR_FIELD(join.inner_unique);
    4786        9172 :     COPY_NODE_FIELD(join.joinqual);
    4787        9172 :     COPY_SCALAR_FIELD(skip_mark_restore);
    4788        9172 :     COPY_NODE_FIELD(mergeclauses);
    4789        9172 :     COPY_POINTER_FIELD(mergeFamilies, list_length(from->mergeclauses) * sizeof(Oid));
    4790        9172 :     COPY_POINTER_FIELD(mergeCollations, list_length(from->mergeclauses) * sizeof(Oid));
    4791        9172 :     COPY_POINTER_FIELD(mergeReversals, list_length(from->mergeclauses) * sizeof(bool));
    4792        9172 :     COPY_POINTER_FIELD(mergeNullsFirst, list_length(from->mergeclauses) * sizeof(bool));
    4793             : 
    4794        9172 :     return newnode;
    4795             : }
    4796             : 
    4797             : static HashJoin *
    4798       37474 : _copyHashJoin(const HashJoin *from)
    4799             : {
    4800       37474 :     HashJoin *newnode = makeNode(HashJoin);
    4801             : 
    4802       37474 :     COPY_SCALAR_FIELD(join.plan.disabled_nodes);
    4803       37474 :     COPY_SCALAR_FIELD(join.plan.startup_cost);
    4804       37474 :     COPY_SCALAR_FIELD(join.plan.total_cost);
    4805       37474 :     COPY_SCALAR_FIELD(join.plan.plan_rows);
    4806       37474 :     COPY_SCALAR_FIELD(join.plan.plan_width);
    4807       37474 :     COPY_SCALAR_FIELD(join.plan.parallel_aware);
    4808       37474 :     COPY_SCALAR_FIELD(join.plan.parallel_safe);
    4809       37474 :     COPY_SCALAR_FIELD(join.plan.async_capable);
    4810       37474 :     COPY_SCALAR_FIELD(join.plan.plan_node_id);
    4811       37474 :     COPY_NODE_FIELD(join.plan.targetlist);
    4812       37474 :     COPY_NODE_FIELD(join.plan.qual);
    4813       37474 :     COPY_NODE_FIELD(join.plan.lefttree);
    4814       37474 :     COPY_NODE_FIELD(join.plan.righttree);
    4815       37474 :     COPY_NODE_FIELD(join.plan.initPlan);
    4816       37474 :     COPY_BITMAPSET_FIELD(join.plan.extParam);
    4817       37474 :     COPY_BITMAPSET_FIELD(join.plan.allParam);
    4818       37474 :     COPY_SCALAR_FIELD(join.jointype);
    4819       37474 :     COPY_SCALAR_FIELD(join.inner_unique);
    4820       37474 :     COPY_NODE_FIELD(join.joinqual);
    4821       37474 :     COPY_NODE_FIELD(hashclauses);
    4822       37474 :     COPY_NODE_FIELD(hashoperators);
    4823       37474 :     COPY_NODE_FIELD(hashcollations);
    4824       37474 :     COPY_NODE_FIELD(hashkeys);
    4825             : 
    4826       37474 :     return newnode;
    4827             : }
    4828             : 
    4829             : static Material *
    4830        5036 : _copyMaterial(const Material *from)
    4831             : {
    4832        5036 :     Material *newnode = makeNode(Material);
    4833             : 
    4834        5036 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    4835        5036 :     COPY_SCALAR_FIELD(plan.startup_cost);
    4836        5036 :     COPY_SCALAR_FIELD(plan.total_cost);
    4837        5036 :     COPY_SCALAR_FIELD(plan.plan_rows);
    4838        5036 :     COPY_SCALAR_FIELD(plan.plan_width);
    4839        5036 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    4840        5036 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    4841        5036 :     COPY_SCALAR_FIELD(plan.async_capable);
    4842        5036 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    4843        5036 :     COPY_NODE_FIELD(plan.targetlist);
    4844        5036 :     COPY_NODE_FIELD(plan.qual);
    4845        5036 :     COPY_NODE_FIELD(plan.lefttree);
    4846        5036 :     COPY_NODE_FIELD(plan.righttree);
    4847        5036 :     COPY_NODE_FIELD(plan.initPlan);
    4848        5036 :     COPY_BITMAPSET_FIELD(plan.extParam);
    4849        5036 :     COPY_BITMAPSET_FIELD(plan.allParam);
    4850             : 
    4851        5036 :     return newnode;
    4852             : }
    4853             : 
    4854             : static Memoize *
    4855        2600 : _copyMemoize(const Memoize *from)
    4856             : {
    4857        2600 :     Memoize *newnode = makeNode(Memoize);
    4858             : 
    4859        2600 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    4860        2600 :     COPY_SCALAR_FIELD(plan.startup_cost);
    4861        2600 :     COPY_SCALAR_FIELD(plan.total_cost);
    4862        2600 :     COPY_SCALAR_FIELD(plan.plan_rows);
    4863        2600 :     COPY_SCALAR_FIELD(plan.plan_width);
    4864        2600 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    4865        2600 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    4866        2600 :     COPY_SCALAR_FIELD(plan.async_capable);
    4867        2600 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    4868        2600 :     COPY_NODE_FIELD(plan.targetlist);
    4869        2600 :     COPY_NODE_FIELD(plan.qual);
    4870        2600 :     COPY_NODE_FIELD(plan.lefttree);
    4871        2600 :     COPY_NODE_FIELD(plan.righttree);
    4872        2600 :     COPY_NODE_FIELD(plan.initPlan);
    4873        2600 :     COPY_BITMAPSET_FIELD(plan.extParam);
    4874        2600 :     COPY_BITMAPSET_FIELD(plan.allParam);
    4875        2600 :     COPY_SCALAR_FIELD(numKeys);
    4876        2600 :     COPY_POINTER_FIELD(hashOperators, from->numKeys * sizeof(Oid));
    4877        2600 :     COPY_POINTER_FIELD(collations, from->numKeys * sizeof(Oid));
    4878        2600 :     COPY_NODE_FIELD(param_exprs);
    4879        2600 :     COPY_SCALAR_FIELD(singlerow);
    4880        2600 :     COPY_SCALAR_FIELD(binary_mode);
    4881        2600 :     COPY_SCALAR_FIELD(est_entries);
    4882        2600 :     COPY_BITMAPSET_FIELD(keyparamids);
    4883        2600 :     COPY_SCALAR_FIELD(est_calls);
    4884        2600 :     COPY_SCALAR_FIELD(est_unique_keys);
    4885        2600 :     COPY_SCALAR_FIELD(est_hit_ratio);
    4886             : 
    4887        2600 :     return newnode;
    4888             : }
    4889             : 
    4890             : static Sort *
    4891       83104 : _copySort(const Sort *from)
    4892             : {
    4893       83104 :     Sort *newnode = makeNode(Sort);
    4894             : 
    4895       83104 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    4896       83104 :     COPY_SCALAR_FIELD(plan.startup_cost);
    4897       83104 :     COPY_SCALAR_FIELD(plan.total_cost);
    4898       83104 :     COPY_SCALAR_FIELD(plan.plan_rows);
    4899       83104 :     COPY_SCALAR_FIELD(plan.plan_width);
    4900       83104 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    4901       83104 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    4902       83104 :     COPY_SCALAR_FIELD(plan.async_capable);
    4903       83104 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    4904       83104 :     COPY_NODE_FIELD(plan.targetlist);
    4905       83104 :     COPY_NODE_FIELD(plan.qual);
    4906       83104 :     COPY_NODE_FIELD(plan.lefttree);
    4907       83104 :     COPY_NODE_FIELD(plan.righttree);
    4908       83104 :     COPY_NODE_FIELD(plan.initPlan);
    4909       83104 :     COPY_BITMAPSET_FIELD(plan.extParam);
    4910       83104 :     COPY_BITMAPSET_FIELD(plan.allParam);
    4911       83104 :     COPY_SCALAR_FIELD(numCols);
    4912       83104 :     COPY_POINTER_FIELD(sortColIdx, from->numCols * sizeof(AttrNumber));
    4913       83104 :     COPY_POINTER_FIELD(sortOperators, from->numCols * sizeof(Oid));
    4914       83104 :     COPY_POINTER_FIELD(collations, from->numCols * sizeof(Oid));
    4915       83104 :     COPY_POINTER_FIELD(nullsFirst, from->numCols * sizeof(bool));
    4916             : 
    4917       83104 :     return newnode;
    4918             : }
    4919             : 
    4920             : static IncrementalSort *
    4921        1244 : _copyIncrementalSort(const IncrementalSort *from)
    4922             : {
    4923        1244 :     IncrementalSort *newnode = makeNode(IncrementalSort);
    4924             : 
    4925        1244 :     COPY_SCALAR_FIELD(sort.plan.disabled_nodes);
    4926        1244 :     COPY_SCALAR_FIELD(sort.plan.startup_cost);
    4927        1244 :     COPY_SCALAR_FIELD(sort.plan.total_cost);
    4928        1244 :     COPY_SCALAR_FIELD(sort.plan.plan_rows);
    4929        1244 :     COPY_SCALAR_FIELD(sort.plan.plan_width);
    4930        1244 :     COPY_SCALAR_FIELD(sort.plan.parallel_aware);
    4931        1244 :     COPY_SCALAR_FIELD(sort.plan.parallel_safe);
    4932        1244 :     COPY_SCALAR_FIELD(sort.plan.async_capable);
    4933        1244 :     COPY_SCALAR_FIELD(sort.plan.plan_node_id);
    4934        1244 :     COPY_NODE_FIELD(sort.plan.targetlist);
    4935        1244 :     COPY_NODE_FIELD(sort.plan.qual);
    4936        1244 :     COPY_NODE_FIELD(sort.plan.lefttree);
    4937        1244 :     COPY_NODE_FIELD(sort.plan.righttree);
    4938        1244 :     COPY_NODE_FIELD(sort.plan.initPlan);
    4939        1244 :     COPY_BITMAPSET_FIELD(sort.plan.extParam);
    4940        1244 :     COPY_BITMAPSET_FIELD(sort.plan.allParam);
    4941        1244 :     COPY_SCALAR_FIELD(sort.numCols);
    4942        1244 :     COPY_POINTER_FIELD(sort.sortColIdx, from->sort.numCols * sizeof(AttrNumber));
    4943        1244 :     COPY_POINTER_FIELD(sort.sortOperators, from->sort.numCols * sizeof(Oid));
    4944        1244 :     COPY_POINTER_FIELD(sort.collations, from->sort.numCols * sizeof(Oid));
    4945        1244 :     COPY_POINTER_FIELD(sort.nullsFirst, from->sort.numCols * sizeof(bool));
    4946        1244 :     COPY_SCALAR_FIELD(nPresortedCols);
    4947             : 
    4948        1244 :     return newnode;
    4949             : }
    4950             : 
    4951             : static Group *
    4952         252 : _copyGroup(const Group *from)
    4953             : {
    4954         252 :     Group *newnode = makeNode(Group);
    4955             : 
    4956         252 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    4957         252 :     COPY_SCALAR_FIELD(plan.startup_cost);
    4958         252 :     COPY_SCALAR_FIELD(plan.total_cost);
    4959         252 :     COPY_SCALAR_FIELD(plan.plan_rows);
    4960         252 :     COPY_SCALAR_FIELD(plan.plan_width);
    4961         252 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    4962         252 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    4963         252 :     COPY_SCALAR_FIELD(plan.async_capable);
    4964         252 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    4965         252 :     COPY_NODE_FIELD(plan.targetlist);
    4966         252 :     COPY_NODE_FIELD(plan.qual);
    4967         252 :     COPY_NODE_FIELD(plan.lefttree);
    4968         252 :     COPY_NODE_FIELD(plan.righttree);
    4969         252 :     COPY_NODE_FIELD(plan.initPlan);
    4970         252 :     COPY_BITMAPSET_FIELD(plan.extParam);
    4971         252 :     COPY_BITMAPSET_FIELD(plan.allParam);
    4972         252 :     COPY_SCALAR_FIELD(numCols);
    4973         252 :     COPY_POINTER_FIELD(grpColIdx, from->numCols * sizeof(AttrNumber));
    4974         252 :     COPY_POINTER_FIELD(grpOperators, from->numCols * sizeof(Oid));
    4975         252 :     COPY_POINTER_FIELD(grpCollations, from->numCols * sizeof(Oid));
    4976             : 
    4977         252 :     return newnode;
    4978             : }
    4979             : 
    4980             : static Agg *
    4981       48254 : _copyAgg(const Agg *from)
    4982             : {
    4983       48254 :     Agg *newnode = makeNode(Agg);
    4984             : 
    4985       48254 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    4986       48254 :     COPY_SCALAR_FIELD(plan.startup_cost);
    4987       48254 :     COPY_SCALAR_FIELD(plan.total_cost);
    4988       48254 :     COPY_SCALAR_FIELD(plan.plan_rows);
    4989       48254 :     COPY_SCALAR_FIELD(plan.plan_width);
    4990       48254 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    4991       48254 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    4992       48254 :     COPY_SCALAR_FIELD(plan.async_capable);
    4993       48254 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    4994       48254 :     COPY_NODE_FIELD(plan.targetlist);
    4995       48254 :     COPY_NODE_FIELD(plan.qual);
    4996       48254 :     COPY_NODE_FIELD(plan.lefttree);
    4997       48254 :     COPY_NODE_FIELD(plan.righttree);
    4998       48254 :     COPY_NODE_FIELD(plan.initPlan);
    4999       48254 :     COPY_BITMAPSET_FIELD(plan.extParam);
    5000       48254 :     COPY_BITMAPSET_FIELD(plan.allParam);
    5001       48254 :     COPY_SCALAR_FIELD(aggstrategy);
    5002       48254 :     COPY_SCALAR_FIELD(aggsplit);
    5003       48254 :     COPY_SCALAR_FIELD(numCols);
    5004       48254 :     COPY_POINTER_FIELD(grpColIdx, from->numCols * sizeof(AttrNumber));
    5005       48254 :     COPY_POINTER_FIELD(grpOperators, from->numCols * sizeof(Oid));
    5006       48254 :     COPY_POINTER_FIELD(grpCollations, from->numCols * sizeof(Oid));
    5007       48254 :     COPY_SCALAR_FIELD(numGroups);
    5008       48254 :     COPY_SCALAR_FIELD(transitionSpace);
    5009       48254 :     COPY_BITMAPSET_FIELD(aggParams);
    5010       48254 :     COPY_NODE_FIELD(groupingSets);
    5011       48254 :     COPY_NODE_FIELD(chain);
    5012             : 
    5013       48254 :     return newnode;
    5014             : }
    5015             : 
    5016             : static WindowAgg *
    5017        2806 : _copyWindowAgg(const WindowAgg *from)
    5018             : {
    5019        2806 :     WindowAgg *newnode = makeNode(WindowAgg);
    5020             : 
    5021        2806 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    5022        2806 :     COPY_SCALAR_FIELD(plan.startup_cost);
    5023        2806 :     COPY_SCALAR_FIELD(plan.total_cost);
    5024        2806 :     COPY_SCALAR_FIELD(plan.plan_rows);
    5025        2806 :     COPY_SCALAR_FIELD(plan.plan_width);
    5026        2806 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    5027        2806 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    5028        2806 :     COPY_SCALAR_FIELD(plan.async_capable);
    5029        2806 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    5030        2806 :     COPY_NODE_FIELD(plan.targetlist);
    5031        2806 :     COPY_NODE_FIELD(plan.qual);
    5032        2806 :     COPY_NODE_FIELD(plan.lefttree);
    5033        2806 :     COPY_NODE_FIELD(plan.righttree);
    5034        2806 :     COPY_NODE_FIELD(plan.initPlan);
    5035        2806 :     COPY_BITMAPSET_FIELD(plan.extParam);
    5036        2806 :     COPY_BITMAPSET_FIELD(plan.allParam);
    5037        2806 :     COPY_STRING_FIELD(winname);
    5038        2806 :     COPY_SCALAR_FIELD(winref);
    5039        2806 :     COPY_SCALAR_FIELD(partNumCols);
    5040        2806 :     COPY_POINTER_FIELD(partColIdx, from->partNumCols * sizeof(AttrNumber));
    5041        2806 :     COPY_POINTER_FIELD(partOperators, from->partNumCols * sizeof(Oid));
    5042        2806 :     COPY_POINTER_FIELD(partCollations, from->partNumCols * sizeof(Oid));
    5043        2806 :     COPY_SCALAR_FIELD(ordNumCols);
    5044        2806 :     COPY_POINTER_FIELD(ordColIdx, from->ordNumCols * sizeof(AttrNumber));
    5045        2806 :     COPY_POINTER_FIELD(ordOperators, from->ordNumCols * sizeof(Oid));
    5046        2806 :     COPY_POINTER_FIELD(ordCollations, from->ordNumCols * sizeof(Oid));
    5047        2806 :     COPY_SCALAR_FIELD(frameOptions);
    5048        2806 :     COPY_NODE_FIELD(startOffset);
    5049        2806 :     COPY_NODE_FIELD(endOffset);
    5050        2806 :     COPY_NODE_FIELD(runCondition);
    5051        2806 :     COPY_NODE_FIELD(runConditionOrig);
    5052        2806 :     COPY_SCALAR_FIELD(startInRangeFunc);
    5053        2806 :     COPY_SCALAR_FIELD(endInRangeFunc);
    5054        2806 :     COPY_SCALAR_FIELD(inRangeColl);
    5055        2806 :     COPY_SCALAR_FIELD(inRangeAsc);
    5056        2806 :     COPY_SCALAR_FIELD(inRangeNullsFirst);
    5057        2806 :     COPY_SCALAR_FIELD(topWindow);
    5058             : 
    5059        2806 :     return newnode;
    5060             : }
    5061             : 
    5062             : static Unique *
    5063        5720 : _copyUnique(const Unique *from)
    5064             : {
    5065        5720 :     Unique *newnode = makeNode(Unique);
    5066             : 
    5067        5720 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    5068        5720 :     COPY_SCALAR_FIELD(plan.startup_cost);
    5069        5720 :     COPY_SCALAR_FIELD(plan.total_cost);
    5070        5720 :     COPY_SCALAR_FIELD(plan.plan_rows);
    5071        5720 :     COPY_SCALAR_FIELD(plan.plan_width);
    5072        5720 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    5073        5720 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    5074        5720 :     COPY_SCALAR_FIELD(plan.async_capable);
    5075        5720 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    5076        5720 :     COPY_NODE_FIELD(plan.targetlist);
    5077        5720 :     COPY_NODE_FIELD(plan.qual);
    5078        5720 :     COPY_NODE_FIELD(plan.lefttree);
    5079        5720 :     COPY_NODE_FIELD(plan.righttree);
    5080        5720 :     COPY_NODE_FIELD(plan.initPlan);
    5081        5720 :     COPY_BITMAPSET_FIELD(plan.extParam);
    5082        5720 :     COPY_BITMAPSET_FIELD(plan.allParam);
    5083        5720 :     COPY_SCALAR_FIELD(numCols);
    5084        5720 :     COPY_POINTER_FIELD(uniqColIdx, from->numCols * sizeof(AttrNumber));
    5085        5720 :     COPY_POINTER_FIELD(uniqOperators, from->numCols * sizeof(Oid));
    5086        5720 :     COPY_POINTER_FIELD(uniqCollations, from->numCols * sizeof(Oid));
    5087             : 
    5088        5720 :     return newnode;
    5089             : }
    5090             : 
    5091             : static Gather *
    5092        1168 : _copyGather(const Gather *from)
    5093             : {
    5094        1168 :     Gather *newnode = makeNode(Gather);
    5095             : 
    5096        1168 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    5097        1168 :     COPY_SCALAR_FIELD(plan.startup_cost);
    5098        1168 :     COPY_SCALAR_FIELD(plan.total_cost);
    5099        1168 :     COPY_SCALAR_FIELD(plan.plan_rows);
    5100        1168 :     COPY_SCALAR_FIELD(plan.plan_width);
    5101        1168 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    5102        1168 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    5103        1168 :     COPY_SCALAR_FIELD(plan.async_capable);
    5104        1168 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    5105        1168 :     COPY_NODE_FIELD(plan.targetlist);
    5106        1168 :     COPY_NODE_FIELD(plan.qual);
    5107        1168 :     COPY_NODE_FIELD(plan.lefttree);
    5108        1168 :     COPY_NODE_FIELD(plan.righttree);
    5109        1168 :     COPY_NODE_FIELD(plan.initPlan);
    5110        1168 :     COPY_BITMAPSET_FIELD(plan.extParam);
    5111        1168 :     COPY_BITMAPSET_FIELD(plan.allParam);
    5112        1168 :     COPY_SCALAR_FIELD(num_workers);
    5113        1168 :     COPY_SCALAR_FIELD(rescan_param);
    5114        1168 :     COPY_SCALAR_FIELD(single_copy);
    5115        1168 :     COPY_SCALAR_FIELD(invisible);
    5116        1168 :     COPY_BITMAPSET_FIELD(initParam);
    5117             : 
    5118        1168 :     return newnode;
    5119             : }
    5120             : 
    5121             : static GatherMerge *
    5122         354 : _copyGatherMerge(const GatherMerge *from)
    5123             : {
    5124         354 :     GatherMerge *newnode = makeNode(GatherMerge);
    5125             : 
    5126         354 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    5127         354 :     COPY_SCALAR_FIELD(plan.startup_cost);
    5128         354 :     COPY_SCALAR_FIELD(plan.total_cost);
    5129         354 :     COPY_SCALAR_FIELD(plan.plan_rows);
    5130         354 :     COPY_SCALAR_FIELD(plan.plan_width);
    5131         354 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    5132         354 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    5133         354 :     COPY_SCALAR_FIELD(plan.async_capable);
    5134         354 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    5135         354 :     COPY_NODE_FIELD(plan.targetlist);
    5136         354 :     COPY_NODE_FIELD(plan.qual);
    5137         354 :     COPY_NODE_FIELD(plan.lefttree);
    5138         354 :     COPY_NODE_FIELD(plan.righttree);
    5139         354 :     COPY_NODE_FIELD(plan.initPlan);
    5140         354 :     COPY_BITMAPSET_FIELD(plan.extParam);
    5141         354 :     COPY_BITMAPSET_FIELD(plan.allParam);
    5142         354 :     COPY_SCALAR_FIELD(num_workers);
    5143         354 :     COPY_SCALAR_FIELD(rescan_param);
    5144         354 :     COPY_SCALAR_FIELD(numCols);
    5145         354 :     COPY_POINTER_FIELD(sortColIdx, from->numCols * sizeof(AttrNumber));
    5146         354 :     COPY_POINTER_FIELD(sortOperators, from->numCols * sizeof(Oid));
    5147         354 :     COPY_POINTER_FIELD(collations, from->numCols * sizeof(Oid));
    5148         354 :     COPY_POINTER_FIELD(nullsFirst, from->numCols * sizeof(bool));
    5149         354 :     COPY_BITMAPSET_FIELD(initParam);
    5150             : 
    5151         354 :     return newnode;
    5152             : }
    5153             : 
    5154             : static Hash *
    5155       37474 : _copyHash(const Hash *from)
    5156             : {
    5157       37474 :     Hash *newnode = makeNode(Hash);
    5158             : 
    5159       37474 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    5160       37474 :     COPY_SCALAR_FIELD(plan.startup_cost);
    5161       37474 :     COPY_SCALAR_FIELD(plan.total_cost);
    5162       37474 :     COPY_SCALAR_FIELD(plan.plan_rows);
    5163       37474 :     COPY_SCALAR_FIELD(plan.plan_width);
    5164       37474 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    5165       37474 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    5166       37474 :     COPY_SCALAR_FIELD(plan.async_capable);
    5167       37474 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    5168       37474 :     COPY_NODE_FIELD(plan.targetlist);
    5169       37474 :     COPY_NODE_FIELD(plan.qual);
    5170       37474 :     COPY_NODE_FIELD(plan.lefttree);
    5171       37474 :     COPY_NODE_FIELD(plan.righttree);
    5172       37474 :     COPY_NODE_FIELD(plan.initPlan);
    5173       37474 :     COPY_BITMAPSET_FIELD(plan.extParam);
    5174       37474 :     COPY_BITMAPSET_FIELD(plan.allParam);
    5175       37474 :     COPY_NODE_FIELD(hashkeys);
    5176       37474 :     COPY_SCALAR_FIELD(skewTable);
    5177       37474 :     COPY_SCALAR_FIELD(skewColumn);
    5178       37474 :     COPY_SCALAR_FIELD(skewInherit);
    5179       37474 :     COPY_SCALAR_FIELD(rows_total);
    5180             : 
    5181       37474 :     return newnode;
    5182             : }
    5183             : 
    5184             : static SetOp *
    5185         662 : _copySetOp(const SetOp *from)
    5186             : {
    5187         662 :     SetOp *newnode = makeNode(SetOp);
    5188             : 
    5189         662 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    5190         662 :     COPY_SCALAR_FIELD(plan.startup_cost);
    5191         662 :     COPY_SCALAR_FIELD(plan.total_cost);
    5192         662 :     COPY_SCALAR_FIELD(plan.plan_rows);
    5193         662 :     COPY_SCALAR_FIELD(plan.plan_width);
    5194         662 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    5195         662 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    5196         662 :     COPY_SCALAR_FIELD(plan.async_capable);
    5197         662 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    5198         662 :     COPY_NODE_FIELD(plan.targetlist);
    5199         662 :     COPY_NODE_FIELD(plan.qual);
    5200         662 :     COPY_NODE_FIELD(plan.lefttree);
    5201         662 :     COPY_NODE_FIELD(plan.righttree);
    5202         662 :     COPY_NODE_FIELD(plan.initPlan);
    5203         662 :     COPY_BITMAPSET_FIELD(plan.extParam);
    5204         662 :     COPY_BITMAPSET_FIELD(plan.allParam);
    5205         662 :     COPY_SCALAR_FIELD(cmd);
    5206         662 :     COPY_SCALAR_FIELD(strategy);
    5207         662 :     COPY_SCALAR_FIELD(numCols);
    5208         662 :     COPY_POINTER_FIELD(cmpColIdx, from->numCols * sizeof(AttrNumber));
    5209         662 :     COPY_POINTER_FIELD(cmpOperators, from->numCols * sizeof(Oid));
    5210         662 :     COPY_POINTER_FIELD(cmpCollations, from->numCols * sizeof(Oid));
    5211         662 :     COPY_POINTER_FIELD(cmpNullsFirst, from->numCols * sizeof(bool));
    5212         662 :     COPY_SCALAR_FIELD(numGroups);
    5213             : 
    5214         662 :     return newnode;
    5215             : }
    5216             : 
    5217             : static LockRows *
    5218       13832 : _copyLockRows(const LockRows *from)
    5219             : {
    5220       13832 :     LockRows *newnode = makeNode(LockRows);
    5221             : 
    5222       13832 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    5223       13832 :     COPY_SCALAR_FIELD(plan.startup_cost);
    5224       13832 :     COPY_SCALAR_FIELD(plan.total_cost);
    5225       13832 :     COPY_SCALAR_FIELD(plan.plan_rows);
    5226       13832 :     COPY_SCALAR_FIELD(plan.plan_width);
    5227       13832 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    5228       13832 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    5229       13832 :     COPY_SCALAR_FIELD(plan.async_capable);
    5230       13832 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    5231       13832 :     COPY_NODE_FIELD(plan.targetlist);
    5232       13832 :     COPY_NODE_FIELD(plan.qual);
    5233       13832 :     COPY_NODE_FIELD(plan.lefttree);
    5234       13832 :     COPY_NODE_FIELD(plan.righttree);
    5235       13832 :     COPY_NODE_FIELD(plan.initPlan);
    5236       13832 :     COPY_BITMAPSET_FIELD(plan.extParam);
    5237       13832 :     COPY_BITMAPSET_FIELD(plan.allParam);
    5238       13832 :     COPY_NODE_FIELD(rowMarks);
    5239       13832 :     COPY_SCALAR_FIELD(epqParam);
    5240             : 
    5241       13832 :     return newnode;
    5242             : }
    5243             : 
    5244             : static Limit *
    5245        5266 : _copyLimit(const Limit *from)
    5246             : {
    5247        5266 :     Limit *newnode = makeNode(Limit);
    5248             : 
    5249        5266 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    5250        5266 :     COPY_SCALAR_FIELD(plan.startup_cost);
    5251        5266 :     COPY_SCALAR_FIELD(plan.total_cost);
    5252        5266 :     COPY_SCALAR_FIELD(plan.plan_rows);
    5253        5266 :     COPY_SCALAR_FIELD(plan.plan_width);
    5254        5266 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    5255        5266 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    5256        5266 :     COPY_SCALAR_FIELD(plan.async_capable);
    5257        5266 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    5258        5266 :     COPY_NODE_FIELD(plan.targetlist);
    5259        5266 :     COPY_NODE_FIELD(plan.qual);
    5260        5266 :     COPY_NODE_FIELD(plan.lefttree);
    5261        5266 :     COPY_NODE_FIELD(plan.righttree);
    5262        5266 :     COPY_NODE_FIELD(plan.initPlan);
    5263        5266 :     COPY_BITMAPSET_FIELD(plan.extParam);
    5264        5266 :     COPY_BITMAPSET_FIELD(plan.allParam);
    5265        5266 :     COPY_NODE_FIELD(limitOffset);
    5266        5266 :     COPY_NODE_FIELD(limitCount);
    5267        5266 :     COPY_SCALAR_FIELD(limitOption);
    5268        5266 :     COPY_SCALAR_FIELD(uniqNumCols);
    5269        5266 :     COPY_POINTER_FIELD(uniqColIdx, from->uniqNumCols * sizeof(AttrNumber));
    5270        5266 :     COPY_POINTER_FIELD(uniqOperators, from->uniqNumCols * sizeof(Oid));
    5271        5266 :     COPY_POINTER_FIELD(uniqCollations, from->uniqNumCols * sizeof(Oid));
    5272             : 
    5273        5266 :     return newnode;
    5274             : }
    5275             : 
    5276             : static PlanRowMark *
    5277       42128 : _copyPlanRowMark(const PlanRowMark *from)
    5278             : {
    5279       42128 :     PlanRowMark *newnode = makeNode(PlanRowMark);
    5280             : 
    5281       42128 :     COPY_SCALAR_FIELD(rti);
    5282       42128 :     COPY_SCALAR_FIELD(prti);
    5283       42128 :     COPY_SCALAR_FIELD(rowmarkId);
    5284       42128 :     COPY_SCALAR_FIELD(markType);
    5285       42128 :     COPY_SCALAR_FIELD(allMarkTypes);
    5286       42128 :     COPY_SCALAR_FIELD(strength);
    5287       42128 :     COPY_SCALAR_FIELD(waitPolicy);
    5288       42128 :     COPY_SCALAR_FIELD(isParent);
    5289             : 
    5290       42128 :     return newnode;
    5291             : }
    5292             : 
    5293             : static PartitionPruneInfo *
    5294         732 : _copyPartitionPruneInfo(const PartitionPruneInfo *from)
    5295             : {
    5296         732 :     PartitionPruneInfo *newnode = makeNode(PartitionPruneInfo);
    5297             : 
    5298         732 :     COPY_BITMAPSET_FIELD(relids);
    5299         732 :     COPY_NODE_FIELD(prune_infos);
    5300         732 :     COPY_BITMAPSET_FIELD(other_subplans);
    5301             : 
    5302         732 :     return newnode;
    5303             : }
    5304             : 
    5305             : static PartitionedRelPruneInfo *
    5306        1344 : _copyPartitionedRelPruneInfo(const PartitionedRelPruneInfo *from)
    5307             : {
    5308        1344 :     PartitionedRelPruneInfo *newnode = makeNode(PartitionedRelPruneInfo);
    5309             : 
    5310        1344 :     COPY_SCALAR_FIELD(rtindex);
    5311        1344 :     COPY_BITMAPSET_FIELD(present_parts);
    5312        1344 :     COPY_SCALAR_FIELD(nparts);
    5313        1344 :     COPY_POINTER_FIELD(subplan_map, from->nparts * sizeof(int));
    5314        1344 :     COPY_POINTER_FIELD(subpart_map, from->nparts * sizeof(int));
    5315        1344 :     COPY_POINTER_FIELD(leafpart_rti_map, from->nparts * sizeof(int));
    5316        1344 :     COPY_POINTER_FIELD(relid_map, from->nparts * sizeof(Oid));
    5317        1344 :     COPY_NODE_FIELD(initial_pruning_steps);
    5318        1344 :     COPY_NODE_FIELD(exec_pruning_steps);
    5319        1344 :     COPY_BITMAPSET_FIELD(execparamids);
    5320             : 
    5321        1344 :     return newnode;
    5322             : }
    5323             : 
    5324             : static PartitionPruneStepOp *
    5325        1362 : _copyPartitionPruneStepOp(const PartitionPruneStepOp *from)
    5326             : {
    5327        1362 :     PartitionPruneStepOp *newnode = makeNode(PartitionPruneStepOp);
    5328             : 
    5329        1362 :     COPY_SCALAR_FIELD(step.step_id);
    5330        1362 :     COPY_SCALAR_FIELD(opstrategy);
    5331        1362 :     COPY_NODE_FIELD(exprs);
    5332        1362 :     COPY_NODE_FIELD(cmpfns);
    5333        1362 :     COPY_BITMAPSET_FIELD(nullkeys);
    5334             : 
    5335        1362 :     return newnode;
    5336             : }
    5337             : 
    5338             : static PartitionPruneStepCombine *
    5339         272 : _copyPartitionPruneStepCombine(const PartitionPruneStepCombine *from)
    5340             : {
    5341         272 :     PartitionPruneStepCombine *newnode = makeNode(PartitionPruneStepCombine);
    5342             : 
    5343         272 :     COPY_SCALAR_FIELD(step.step_id);
    5344         272 :     COPY_SCALAR_FIELD(combineOp);
    5345         272 :     COPY_NODE_FIELD(source_stepids);
    5346             : 
    5347         272 :     return newnode;
    5348             : }
    5349             : 
    5350             : static PlanInvalItem *
    5351       60858 : _copyPlanInvalItem(const PlanInvalItem *from)
    5352             : {
    5353       60858 :     PlanInvalItem *newnode = makeNode(PlanInvalItem);
    5354             : 
    5355       60858 :     COPY_SCALAR_FIELD(cacheId);
    5356       60858 :     COPY_SCALAR_FIELD(hashValue);
    5357             : 
    5358       60858 :     return newnode;
    5359             : }
    5360             : 
    5361             : static Integer *
    5362       40412 : _copyInteger(const Integer *from)
    5363             : {
    5364       40412 :     Integer *newnode = makeNode(Integer);
    5365             : 
    5366       40412 :     COPY_SCALAR_FIELD(ival);
    5367             : 
    5368       40412 :     return newnode;
    5369             : }
    5370             : 
    5371             : static Float *
    5372         272 : _copyFloat(const Float *from)
    5373             : {
    5374         272 :     Float *newnode = makeNode(Float);
    5375             : 
    5376         272 :     COPY_STRING_FIELD(fval);
    5377             : 
    5378         272 :     return newnode;
    5379             : }
    5380             : 
    5381             : static Boolean *
    5382       35930 : _copyBoolean(const Boolean *from)
    5383             : {
    5384       35930 :     Boolean *newnode = makeNode(Boolean);
    5385             : 
    5386       35930 :     COPY_SCALAR_FIELD(boolval);
    5387             : 
    5388       35930 :     return newnode;
    5389             : }
    5390             : 
    5391             : static String *
    5392    32875212 : _copyString(const String *from)
    5393             : {
    5394    32875212 :     String *newnode = makeNode(String);
    5395             : 
    5396    32875212 :     COPY_STRING_FIELD(sval);
    5397             : 
    5398    32875212 :     return newnode;
    5399             : }
    5400             : 
    5401             : static BitString *
    5402           0 : _copyBitString(const BitString *from)
    5403             : {
    5404           0 :     BitString *newnode = makeNode(BitString);
    5405             : 
    5406           0 :     COPY_STRING_FIELD(bsval);
    5407             : 
    5408           0 :     return newnode;
    5409             : }
    5410             : 
    5411             : static ForeignKeyCacheInfo *
    5412        4248 : _copyForeignKeyCacheInfo(const ForeignKeyCacheInfo *from)
    5413             : {
    5414        4248 :     ForeignKeyCacheInfo *newnode = makeNode(ForeignKeyCacheInfo);
    5415             : 
    5416        4248 :     COPY_SCALAR_FIELD(conoid);
    5417        4248 :     COPY_SCALAR_FIELD(conrelid);
    5418        4248 :     COPY_SCALAR_FIELD(confrelid);
    5419        4248 :     COPY_SCALAR_FIELD(nkeys);
    5420        4248 :     COPY_SCALAR_FIELD(conenforced);
    5421        4248 :     COPY_ARRAY_FIELD(conkey);
    5422        4248 :     COPY_ARRAY_FIELD(confkey);
    5423        4248 :     COPY_ARRAY_FIELD(conpfeqop);
    5424             : 
    5425        4248 :     return newnode;
    5426             : }

Generated by: LCOV version 1.16