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

Generated by: LCOV version 1.16