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

Generated by: LCOV version 1.16