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

Generated by: LCOV version 1.14