LCOV - code coverage report
Current view: top level - src/backend/nodes - copyfuncs.funcs.c (source / functions) Hit Total Coverage
Test: PostgreSQL 19devel Lines: 3310 3434 96.4 %
Date: 2025-11-06 12:18:21 Functions: 317 327 96.9 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.16