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

Generated by: LCOV version 1.14