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

Generated by: LCOV version 1.16