LCOV - code coverage report
Current view: top level - src/backend/nodes - copyfuncs.funcs.c (source / functions) Hit Total Coverage
Test: PostgreSQL 17devel Lines: 3200 3312 96.6 %
Date: 2024-05-09 10:11:15 Functions: 312 320 97.5 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.14