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-02-04 15:18:33 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     3576878 : _copyAlias(const Alias *from)
      44             : {
      45     3576878 :     Alias *newnode = makeNode(Alias);
      46             : 
      47     3576878 :     COPY_STRING_FIELD(aliasname);
      48     3576878 :     COPY_NODE_FIELD(colnames);
      49             : 
      50     3576878 :     return newnode;
      51             : }
      52             : 
      53             : static RangeVar *
      54      981522 : _copyRangeVar(const RangeVar *from)
      55             : {
      56      981522 :     RangeVar *newnode = makeNode(RangeVar);
      57             : 
      58      981522 :     COPY_STRING_FIELD(catalogname);
      59      981522 :     COPY_STRING_FIELD(schemaname);
      60      981522 :     COPY_STRING_FIELD(relname);
      61      981522 :     COPY_SCALAR_FIELD(inh);
      62      981522 :     COPY_SCALAR_FIELD(relpersistence);
      63      981522 :     COPY_NODE_FIELD(alias);
      64      981522 :     COPY_LOCATION_FIELD(location);
      65             : 
      66      981522 :     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        4320 : _copyIntoClause(const IntoClause *from)
      97             : {
      98        4320 :     IntoClause *newnode = makeNode(IntoClause);
      99             : 
     100        4320 :     COPY_NODE_FIELD(rel);
     101        4320 :     COPY_NODE_FIELD(colNames);
     102        4320 :     COPY_STRING_FIELD(accessMethod);
     103        4320 :     COPY_NODE_FIELD(options);
     104        4320 :     COPY_SCALAR_FIELD(onCommit);
     105        4320 :     COPY_STRING_FIELD(tableSpaceName);
     106        4320 :     COPY_NODE_FIELD(viewQuery);
     107        4320 :     COPY_SCALAR_FIELD(skipData);
     108             : 
     109        4320 :     return newnode;
     110             : }
     111             : 
     112             : static Var *
     113    20868942 : _copyVar(const Var *from)
     114             : {
     115    20868942 :     Var *newnode = makeNode(Var);
     116             : 
     117    20868942 :     COPY_SCALAR_FIELD(varno);
     118    20868942 :     COPY_SCALAR_FIELD(varattno);
     119    20868942 :     COPY_SCALAR_FIELD(vartype);
     120    20868942 :     COPY_SCALAR_FIELD(vartypmod);
     121    20868942 :     COPY_SCALAR_FIELD(varcollid);
     122    20868942 :     COPY_BITMAPSET_FIELD(varnullingrels);
     123    20868942 :     COPY_SCALAR_FIELD(varlevelsup);
     124    20868942 :     COPY_SCALAR_FIELD(varreturningtype);
     125    20868942 :     COPY_SCALAR_FIELD(varnosyn);
     126    20868942 :     COPY_SCALAR_FIELD(varattnosyn);
     127    20868942 :     COPY_LOCATION_FIELD(location);
     128             : 
     129    20868942 :     return newnode;
     130             : }
     131             : 
     132             : static Param *
     133      738566 : _copyParam(const Param *from)
     134             : {
     135      738566 :     Param *newnode = makeNode(Param);
     136             : 
     137      738566 :     COPY_SCALAR_FIELD(paramkind);
     138      738566 :     COPY_SCALAR_FIELD(paramid);
     139      738566 :     COPY_SCALAR_FIELD(paramtype);
     140      738566 :     COPY_SCALAR_FIELD(paramtypmod);
     141      738566 :     COPY_SCALAR_FIELD(paramcollid);
     142      738566 :     COPY_LOCATION_FIELD(location);
     143             : 
     144      738566 :     return newnode;
     145             : }
     146             : 
     147             : static Aggref *
     148      235622 : _copyAggref(const Aggref *from)
     149             : {
     150      235622 :     Aggref *newnode = makeNode(Aggref);
     151             : 
     152      235622 :     COPY_SCALAR_FIELD(aggfnoid);
     153      235622 :     COPY_SCALAR_FIELD(aggtype);
     154      235622 :     COPY_SCALAR_FIELD(aggcollid);
     155      235622 :     COPY_SCALAR_FIELD(inputcollid);
     156      235622 :     COPY_SCALAR_FIELD(aggtranstype);
     157      235622 :     COPY_NODE_FIELD(aggargtypes);
     158      235622 :     COPY_NODE_FIELD(aggdirectargs);
     159      235622 :     COPY_NODE_FIELD(args);
     160      235622 :     COPY_NODE_FIELD(aggorder);
     161      235622 :     COPY_NODE_FIELD(aggdistinct);
     162      235622 :     COPY_NODE_FIELD(aggfilter);
     163      235622 :     COPY_SCALAR_FIELD(aggstar);
     164      235622 :     COPY_SCALAR_FIELD(aggvariadic);
     165      235622 :     COPY_SCALAR_FIELD(aggkind);
     166      235622 :     COPY_SCALAR_FIELD(aggpresorted);
     167      235622 :     COPY_SCALAR_FIELD(agglevelsup);
     168      235622 :     COPY_SCALAR_FIELD(aggsplit);
     169      235622 :     COPY_SCALAR_FIELD(aggno);
     170      235622 :     COPY_SCALAR_FIELD(aggtransno);
     171      235622 :     COPY_LOCATION_FIELD(location);
     172             : 
     173      235622 :     return newnode;
     174             : }
     175             : 
     176             : static GroupingFunc *
     177        1380 : _copyGroupingFunc(const GroupingFunc *from)
     178             : {
     179        1380 :     GroupingFunc *newnode = makeNode(GroupingFunc);
     180             : 
     181        1380 :     COPY_NODE_FIELD(args);
     182        1380 :     COPY_NODE_FIELD(refs);
     183        1380 :     COPY_NODE_FIELD(cols);
     184        1380 :     COPY_SCALAR_FIELD(agglevelsup);
     185        1380 :     COPY_LOCATION_FIELD(location);
     186             : 
     187        1380 :     return newnode;
     188             : }
     189             : 
     190             : static WindowFunc *
     191        8870 : _copyWindowFunc(const WindowFunc *from)
     192             : {
     193        8870 :     WindowFunc *newnode = makeNode(WindowFunc);
     194             : 
     195        8870 :     COPY_SCALAR_FIELD(winfnoid);
     196        8870 :     COPY_SCALAR_FIELD(wintype);
     197        8870 :     COPY_SCALAR_FIELD(wincollid);
     198        8870 :     COPY_SCALAR_FIELD(inputcollid);
     199        8870 :     COPY_NODE_FIELD(args);
     200        8870 :     COPY_NODE_FIELD(aggfilter);
     201        8870 :     COPY_NODE_FIELD(runCondition);
     202        8870 :     COPY_SCALAR_FIELD(winref);
     203        8870 :     COPY_SCALAR_FIELD(winstar);
     204        8870 :     COPY_SCALAR_FIELD(winagg);
     205        8870 :     COPY_SCALAR_FIELD(ignore_nulls);
     206        8870 :     COPY_LOCATION_FIELD(location);
     207             : 
     208        8870 :     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       58244 : _copySubscriptingRef(const SubscriptingRef *from)
     238             : {
     239       58244 :     SubscriptingRef *newnode = makeNode(SubscriptingRef);
     240             : 
     241       58244 :     COPY_SCALAR_FIELD(refcontainertype);
     242       58244 :     COPY_SCALAR_FIELD(refelemtype);
     243       58244 :     COPY_SCALAR_FIELD(refrestype);
     244       58244 :     COPY_SCALAR_FIELD(reftypmod);
     245       58244 :     COPY_SCALAR_FIELD(refcollid);
     246       58244 :     COPY_NODE_FIELD(refupperindexpr);
     247       58244 :     COPY_NODE_FIELD(reflowerindexpr);
     248       58244 :     COPY_NODE_FIELD(refexpr);
     249       58244 :     COPY_NODE_FIELD(refassgnexpr);
     250             : 
     251       58244 :     return newnode;
     252             : }
     253             : 
     254             : static FuncExpr *
     255     1054278 : _copyFuncExpr(const FuncExpr *from)
     256             : {
     257     1054278 :     FuncExpr *newnode = makeNode(FuncExpr);
     258             : 
     259     1054278 :     COPY_SCALAR_FIELD(funcid);
     260     1054278 :     COPY_SCALAR_FIELD(funcresulttype);
     261     1054278 :     COPY_SCALAR_FIELD(funcretset);
     262     1054278 :     COPY_SCALAR_FIELD(funcvariadic);
     263     1054278 :     COPY_SCALAR_FIELD(funcformat);
     264     1054278 :     COPY_SCALAR_FIELD(funccollid);
     265     1054278 :     COPY_SCALAR_FIELD(inputcollid);
     266     1054278 :     COPY_NODE_FIELD(args);
     267     1054278 :     COPY_LOCATION_FIELD(location);
     268             : 
     269     1054278 :     return newnode;
     270             : }
     271             : 
     272             : static NamedArgExpr *
     273       95510 : _copyNamedArgExpr(const NamedArgExpr *from)
     274             : {
     275       95510 :     NamedArgExpr *newnode = makeNode(NamedArgExpr);
     276             : 
     277       95510 :     COPY_NODE_FIELD(arg);
     278       95510 :     COPY_STRING_FIELD(name);
     279       95510 :     COPY_SCALAR_FIELD(argnumber);
     280       95510 :     COPY_LOCATION_FIELD(location);
     281             : 
     282       95510 :     return newnode;
     283             : }
     284             : 
     285             : static OpExpr *
     286     2097400 : _copyOpExpr(const OpExpr *from)
     287             : {
     288     2097400 :     OpExpr *newnode = makeNode(OpExpr);
     289             : 
     290     2097400 :     COPY_SCALAR_FIELD(opno);
     291     2097400 :     COPY_SCALAR_FIELD(opfuncid);
     292     2097400 :     COPY_SCALAR_FIELD(opresulttype);
     293     2097400 :     COPY_SCALAR_FIELD(opretset);
     294     2097400 :     COPY_SCALAR_FIELD(opcollid);
     295     2097400 :     COPY_SCALAR_FIELD(inputcollid);
     296     2097400 :     COPY_NODE_FIELD(args);
     297     2097400 :     COPY_LOCATION_FIELD(location);
     298             : 
     299     2097400 :     return newnode;
     300             : }
     301             : 
     302             : static DistinctExpr *
     303        2512 : _copyDistinctExpr(const DistinctExpr *from)
     304             : {
     305        2512 :     DistinctExpr *newnode = makeNode(DistinctExpr);
     306             : 
     307        2512 :     COPY_SCALAR_FIELD(opno);
     308        2512 :     COPY_SCALAR_FIELD(opfuncid);
     309        2512 :     COPY_SCALAR_FIELD(opresulttype);
     310        2512 :     COPY_SCALAR_FIELD(opretset);
     311        2512 :     COPY_SCALAR_FIELD(opcollid);
     312        2512 :     COPY_SCALAR_FIELD(inputcollid);
     313        2512 :     COPY_NODE_FIELD(args);
     314        2512 :     COPY_LOCATION_FIELD(location);
     315             : 
     316        2512 :     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       98470 : _copyScalarArrayOpExpr(const ScalarArrayOpExpr *from)
     338             : {
     339       98470 :     ScalarArrayOpExpr *newnode = makeNode(ScalarArrayOpExpr);
     340             : 
     341       98470 :     COPY_SCALAR_FIELD(opno);
     342       98470 :     COPY_SCALAR_FIELD(opfuncid);
     343       98470 :     COPY_SCALAR_FIELD(hashfuncid);
     344       98470 :     COPY_SCALAR_FIELD(negfuncid);
     345       98470 :     COPY_SCALAR_FIELD(useOr);
     346       98470 :     COPY_SCALAR_FIELD(inputcollid);
     347       98470 :     COPY_NODE_FIELD(args);
     348       98470 :     COPY_LOCATION_FIELD(location);
     349             : 
     350       98470 :     return newnode;
     351             : }
     352             : 
     353             : static BoolExpr *
     354      505976 : _copyBoolExpr(const BoolExpr *from)
     355             : {
     356      505976 :     BoolExpr *newnode = makeNode(BoolExpr);
     357             : 
     358      505976 :     COPY_SCALAR_FIELD(boolop);
     359      505976 :     COPY_NODE_FIELD(args);
     360      505976 :     COPY_LOCATION_FIELD(location);
     361             : 
     362      505976 :     return newnode;
     363             : }
     364             : 
     365             : static SubLink *
     366      120074 : _copySubLink(const SubLink *from)
     367             : {
     368      120074 :     SubLink *newnode = makeNode(SubLink);
     369             : 
     370      120074 :     COPY_SCALAR_FIELD(subLinkType);
     371      120074 :     COPY_SCALAR_FIELD(subLinkId);
     372      120074 :     COPY_NODE_FIELD(testexpr);
     373      120074 :     COPY_NODE_FIELD(operName);
     374      120074 :     COPY_NODE_FIELD(subselect);
     375      120074 :     COPY_LOCATION_FIELD(location);
     376             : 
     377      120074 :     return newnode;
     378             : }
     379             : 
     380             : static SubPlan *
     381       49420 : _copySubPlan(const SubPlan *from)
     382             : {
     383       49420 :     SubPlan *newnode = makeNode(SubPlan);
     384             : 
     385       49420 :     COPY_SCALAR_FIELD(subLinkType);
     386       49420 :     COPY_NODE_FIELD(testexpr);
     387       49420 :     COPY_NODE_FIELD(paramIds);
     388       49420 :     COPY_SCALAR_FIELD(plan_id);
     389       49420 :     COPY_STRING_FIELD(plan_name);
     390       49420 :     COPY_SCALAR_FIELD(firstColType);
     391       49420 :     COPY_SCALAR_FIELD(firstColTypmod);
     392       49420 :     COPY_SCALAR_FIELD(firstColCollation);
     393       49420 :     COPY_SCALAR_FIELD(isInitPlan);
     394       49420 :     COPY_SCALAR_FIELD(useHashTable);
     395       49420 :     COPY_SCALAR_FIELD(unknownEqFalse);
     396       49420 :     COPY_SCALAR_FIELD(parallel_safe);
     397       49420 :     COPY_NODE_FIELD(setParam);
     398       49420 :     COPY_NODE_FIELD(parParam);
     399       49420 :     COPY_NODE_FIELD(args);
     400       49420 :     COPY_SCALAR_FIELD(startup_cost);
     401       49420 :     COPY_SCALAR_FIELD(per_call_cost);
     402             : 
     403       49420 :     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       22134 : _copyFieldSelect(const FieldSelect *from)
     418             : {
     419       22134 :     FieldSelect *newnode = makeNode(FieldSelect);
     420             : 
     421       22134 :     COPY_NODE_FIELD(arg);
     422       22134 :     COPY_SCALAR_FIELD(fieldnum);
     423       22134 :     COPY_SCALAR_FIELD(resulttype);
     424       22134 :     COPY_SCALAR_FIELD(resulttypmod);
     425       22134 :     COPY_SCALAR_FIELD(resultcollid);
     426             : 
     427       22134 :     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      366202 : _copyRelabelType(const RelabelType *from)
     445             : {
     446      366202 :     RelabelType *newnode = makeNode(RelabelType);
     447             : 
     448      366202 :     COPY_NODE_FIELD(arg);
     449      366202 :     COPY_SCALAR_FIELD(resulttype);
     450      366202 :     COPY_SCALAR_FIELD(resulttypmod);
     451      366202 :     COPY_SCALAR_FIELD(resultcollid);
     452      366202 :     COPY_SCALAR_FIELD(relabelformat);
     453      366202 :     COPY_LOCATION_FIELD(location);
     454             : 
     455      366202 :     return newnode;
     456             : }
     457             : 
     458             : static CoerceViaIO *
     459       76888 : _copyCoerceViaIO(const CoerceViaIO *from)
     460             : {
     461       76888 :     CoerceViaIO *newnode = makeNode(CoerceViaIO);
     462             : 
     463       76888 :     COPY_NODE_FIELD(arg);
     464       76888 :     COPY_SCALAR_FIELD(resulttype);
     465       76888 :     COPY_SCALAR_FIELD(resultcollid);
     466       76888 :     COPY_SCALAR_FIELD(coerceformat);
     467       76888 :     COPY_LOCATION_FIELD(location);
     468             : 
     469       76888 :     return newnode;
     470             : }
     471             : 
     472             : static ArrayCoerceExpr *
     473       14850 : _copyArrayCoerceExpr(const ArrayCoerceExpr *from)
     474             : {
     475       14850 :     ArrayCoerceExpr *newnode = makeNode(ArrayCoerceExpr);
     476             : 
     477       14850 :     COPY_NODE_FIELD(arg);
     478       14850 :     COPY_NODE_FIELD(elemexpr);
     479       14850 :     COPY_SCALAR_FIELD(resulttype);
     480       14850 :     COPY_SCALAR_FIELD(resulttypmod);
     481       14850 :     COPY_SCALAR_FIELD(resultcollid);
     482       14850 :     COPY_SCALAR_FIELD(coerceformat);
     483       14850 :     COPY_LOCATION_FIELD(location);
     484             : 
     485       14850 :     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       10064 : _copyCollateExpr(const CollateExpr *from)
     503             : {
     504       10064 :     CollateExpr *newnode = makeNode(CollateExpr);
     505             : 
     506       10064 :     COPY_NODE_FIELD(arg);
     507       10064 :     COPY_SCALAR_FIELD(collOid);
     508       10064 :     COPY_LOCATION_FIELD(location);
     509             : 
     510       10064 :     return newnode;
     511             : }
     512             : 
     513             : static CaseExpr *
     514      168086 : _copyCaseExpr(const CaseExpr *from)
     515             : {
     516      168086 :     CaseExpr *newnode = makeNode(CaseExpr);
     517             : 
     518      168086 :     COPY_SCALAR_FIELD(casetype);
     519      168086 :     COPY_SCALAR_FIELD(casecollid);
     520      168086 :     COPY_NODE_FIELD(arg);
     521      168086 :     COPY_NODE_FIELD(args);
     522      168086 :     COPY_NODE_FIELD(defresult);
     523      168086 :     COPY_LOCATION_FIELD(location);
     524             : 
     525      168086 :     return newnode;
     526             : }
     527             : 
     528             : static CaseWhen *
     529      341380 : _copyCaseWhen(const CaseWhen *from)
     530             : {
     531      341380 :     CaseWhen *newnode = makeNode(CaseWhen);
     532             : 
     533      341380 :     COPY_NODE_FIELD(expr);
     534      341380 :     COPY_NODE_FIELD(result);
     535      341380 :     COPY_LOCATION_FIELD(location);
     536             : 
     537      341380 :     return newnode;
     538             : }
     539             : 
     540             : static CaseTestExpr *
     541      133508 : _copyCaseTestExpr(const CaseTestExpr *from)
     542             : {
     543      133508 :     CaseTestExpr *newnode = makeNode(CaseTestExpr);
     544             : 
     545      133508 :     COPY_SCALAR_FIELD(typeId);
     546      133508 :     COPY_SCALAR_FIELD(typeMod);
     547      133508 :     COPY_SCALAR_FIELD(collation);
     548             : 
     549      133508 :     return newnode;
     550             : }
     551             : 
     552             : static ArrayExpr *
     553       53382 : _copyArrayExpr(const ArrayExpr *from)
     554             : {
     555       53382 :     ArrayExpr *newnode = makeNode(ArrayExpr);
     556             : 
     557       53382 :     COPY_SCALAR_FIELD(array_typeid);
     558       53382 :     COPY_SCALAR_FIELD(array_collid);
     559       53382 :     COPY_SCALAR_FIELD(element_typeid);
     560       53382 :     COPY_NODE_FIELD(elements);
     561       53382 :     COPY_SCALAR_FIELD(multidims);
     562       53382 :     COPY_LOCATION_FIELD(list_start);
     563       53382 :     COPY_LOCATION_FIELD(list_end);
     564       53382 :     COPY_LOCATION_FIELD(location);
     565             : 
     566       53382 :     return newnode;
     567             : }
     568             : 
     569             : static RowExpr *
     570       17602 : _copyRowExpr(const RowExpr *from)
     571             : {
     572       17602 :     RowExpr *newnode = makeNode(RowExpr);
     573             : 
     574       17602 :     COPY_NODE_FIELD(args);
     575       17602 :     COPY_SCALAR_FIELD(row_typeid);
     576       17602 :     COPY_SCALAR_FIELD(row_format);
     577       17602 :     COPY_NODE_FIELD(colnames);
     578       17602 :     COPY_LOCATION_FIELD(location);
     579             : 
     580       17602 :     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       22632 : _copyCoalesceExpr(const CoalesceExpr *from)
     600             : {
     601       22632 :     CoalesceExpr *newnode = makeNode(CoalesceExpr);
     602             : 
     603       22632 :     COPY_SCALAR_FIELD(coalescetype);
     604       22632 :     COPY_SCALAR_FIELD(coalescecollid);
     605       22632 :     COPY_NODE_FIELD(args);
     606       22632 :     COPY_LOCATION_FIELD(location);
     607             : 
     608       22632 :     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       30320 : _copySQLValueFunction(const SQLValueFunction *from)
     628             : {
     629       30320 :     SQLValueFunction *newnode = makeNode(SQLValueFunction);
     630             : 
     631       30320 :     COPY_SCALAR_FIELD(op);
     632       30320 :     COPY_SCALAR_FIELD(type);
     633       30320 :     COPY_SCALAR_FIELD(typmod);
     634       30320 :     COPY_LOCATION_FIELD(location);
     635             : 
     636       30320 :     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       91726 : _copyNullTest(const NullTest *from)
     801             : {
     802       91726 :     NullTest *newnode = makeNode(NullTest);
     803             : 
     804       91726 :     COPY_NODE_FIELD(arg);
     805       91726 :     COPY_SCALAR_FIELD(nulltesttype);
     806       91726 :     COPY_SCALAR_FIELD(argisrow);
     807       91726 :     COPY_LOCATION_FIELD(location);
     808             : 
     809       91726 :     return newnode;
     810             : }
     811             : 
     812             : static BooleanTest *
     813        4360 : _copyBooleanTest(const BooleanTest *from)
     814             : {
     815        4360 :     BooleanTest *newnode = makeNode(BooleanTest);
     816             : 
     817        4360 :     COPY_NODE_FIELD(arg);
     818        4360 :     COPY_SCALAR_FIELD(booltesttype);
     819        4360 :     COPY_LOCATION_FIELD(location);
     820             : 
     821        4360 :     return newnode;
     822             : }
     823             : 
     824             : static MergeAction *
     825        9200 : _copyMergeAction(const MergeAction *from)
     826             : {
     827        9200 :     MergeAction *newnode = makeNode(MergeAction);
     828             : 
     829        9200 :     COPY_SCALAR_FIELD(matchKind);
     830        9200 :     COPY_SCALAR_FIELD(commandType);
     831        9200 :     COPY_SCALAR_FIELD(override);
     832        9200 :     COPY_NODE_FIELD(qual);
     833        9200 :     COPY_NODE_FIELD(targetList);
     834        9200 :     COPY_NODE_FIELD(updateColnos);
     835             : 
     836        9200 :     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        3618 : _copyCoerceToDomainValue(const CoerceToDomainValue *from)
     856             : {
     857        3618 :     CoerceToDomainValue *newnode = makeNode(CoerceToDomainValue);
     858             : 
     859        3618 :     COPY_SCALAR_FIELD(typeId);
     860        3618 :     COPY_SCALAR_FIELD(typeMod);
     861        3618 :     COPY_SCALAR_FIELD(collation);
     862        3618 :     COPY_LOCATION_FIELD(location);
     863             : 
     864        3618 :     return newnode;
     865             : }
     866             : 
     867             : static SetToDefault *
     868        2022 : _copySetToDefault(const SetToDefault *from)
     869             : {
     870        2022 :     SetToDefault *newnode = makeNode(SetToDefault);
     871             : 
     872        2022 :     COPY_SCALAR_FIELD(typeId);
     873        2022 :     COPY_SCALAR_FIELD(typeMod);
     874        2022 :     COPY_SCALAR_FIELD(collation);
     875        2022 :     COPY_LOCATION_FIELD(location);
     876             : 
     877        2022 :     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        1528 : _copyNextValueExpr(const NextValueExpr *from)
     894             : {
     895        1528 :     NextValueExpr *newnode = makeNode(NextValueExpr);
     896             : 
     897        1528 :     COPY_SCALAR_FIELD(seqid);
     898        1528 :     COPY_SCALAR_FIELD(typeId);
     899             : 
     900        1528 :     return newnode;
     901             : }
     902             : 
     903             : static InferenceElem *
     904        2004 : _copyInferenceElem(const InferenceElem *from)
     905             : {
     906        2004 :     InferenceElem *newnode = makeNode(InferenceElem);
     907             : 
     908        2004 :     COPY_NODE_FIELD(expr);
     909        2004 :     COPY_SCALAR_FIELD(infercollid);
     910        2004 :     COPY_SCALAR_FIELD(inferopclass);
     911             : 
     912        2004 :     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     9162828 : _copyTargetEntry(const TargetEntry *from)
     929             : {
     930     9162828 :     TargetEntry *newnode = makeNode(TargetEntry);
     931             : 
     932     9162828 :     COPY_NODE_FIELD(expr);
     933     9162828 :     COPY_SCALAR_FIELD(resno);
     934     9162828 :     COPY_STRING_FIELD(resname);
     935     9162828 :     COPY_SCALAR_FIELD(ressortgroupref);
     936     9162828 :     COPY_SCALAR_FIELD(resorigtbl);
     937     9162828 :     COPY_SCALAR_FIELD(resorigcol);
     938     9162828 :     COPY_SCALAR_FIELD(resjunk);
     939             : 
     940     9162828 :     return newnode;
     941             : }
     942             : 
     943             : static RangeTblRef *
     944      960684 : _copyRangeTblRef(const RangeTblRef *from)
     945             : {
     946      960684 :     RangeTblRef *newnode = makeNode(RangeTblRef);
     947             : 
     948      960684 :     COPY_SCALAR_FIELD(rtindex);
     949             : 
     950      960684 :     return newnode;
     951             : }
     952             : 
     953             : static JoinExpr *
     954      274602 : _copyJoinExpr(const JoinExpr *from)
     955             : {
     956      274602 :     JoinExpr *newnode = makeNode(JoinExpr);
     957             : 
     958      274602 :     COPY_SCALAR_FIELD(jointype);
     959      274602 :     COPY_SCALAR_FIELD(isNatural);
     960      274602 :     COPY_NODE_FIELD(larg);
     961      274602 :     COPY_NODE_FIELD(rarg);
     962      274602 :     COPY_NODE_FIELD(usingClause);
     963      274602 :     COPY_NODE_FIELD(join_using_alias);
     964      274602 :     COPY_NODE_FIELD(quals);
     965      274602 :     COPY_NODE_FIELD(alias);
     966      274602 :     COPY_SCALAR_FIELD(rtindex);
     967             : 
     968      274602 :     return newnode;
     969             : }
     970             : 
     971             : static FromExpr *
     972      946596 : _copyFromExpr(const FromExpr *from)
     973             : {
     974      946596 :     FromExpr *newnode = makeNode(FromExpr);
     975             : 
     976      946596 :     COPY_NODE_FIELD(fromlist);
     977      946596 :     COPY_NODE_FIELD(quals);
     978             : 
     979      946596 :     return newnode;
     980             : }
     981             : 
     982             : static OnConflictExpr *
     983        2000 : _copyOnConflictExpr(const OnConflictExpr *from)
     984             : {
     985        2000 :     OnConflictExpr *newnode = makeNode(OnConflictExpr);
     986             : 
     987        2000 :     COPY_SCALAR_FIELD(action);
     988        2000 :     COPY_NODE_FIELD(arbiterElems);
     989        2000 :     COPY_NODE_FIELD(arbiterWhere);
     990        2000 :     COPY_SCALAR_FIELD(constraint);
     991        2000 :     COPY_NODE_FIELD(onConflictSet);
     992        2000 :     COPY_NODE_FIELD(onConflictWhere);
     993        2000 :     COPY_SCALAR_FIELD(exclRelIndex);
     994        2000 :     COPY_NODE_FIELD(exclRelTlist);
     995             : 
     996        2000 :     return newnode;
     997             : }
     998             : 
     999             : static Query *
    1000     1377650 : _copyQuery(const Query *from)
    1001             : {
    1002     1377650 :     Query *newnode = makeNode(Query);
    1003             : 
    1004     1377650 :     COPY_SCALAR_FIELD(commandType);
    1005     1377650 :     COPY_SCALAR_FIELD(querySource);
    1006     1377650 :     COPY_SCALAR_FIELD(queryId);
    1007     1377650 :     COPY_SCALAR_FIELD(canSetTag);
    1008     1377650 :     COPY_NODE_FIELD(utilityStmt);
    1009     1377650 :     COPY_SCALAR_FIELD(resultRelation);
    1010     1377650 :     COPY_SCALAR_FIELD(hasAggs);
    1011     1377650 :     COPY_SCALAR_FIELD(hasWindowFuncs);
    1012     1377650 :     COPY_SCALAR_FIELD(hasTargetSRFs);
    1013     1377650 :     COPY_SCALAR_FIELD(hasSubLinks);
    1014     1377650 :     COPY_SCALAR_FIELD(hasDistinctOn);
    1015     1377650 :     COPY_SCALAR_FIELD(hasRecursive);
    1016     1377650 :     COPY_SCALAR_FIELD(hasModifyingCTE);
    1017     1377650 :     COPY_SCALAR_FIELD(hasForUpdate);
    1018     1377650 :     COPY_SCALAR_FIELD(hasRowSecurity);
    1019     1377650 :     COPY_SCALAR_FIELD(hasGroupRTE);
    1020     1377650 :     COPY_SCALAR_FIELD(isReturn);
    1021     1377650 :     COPY_NODE_FIELD(cteList);
    1022     1377650 :     COPY_NODE_FIELD(rtable);
    1023     1377650 :     COPY_NODE_FIELD(rteperminfos);
    1024     1377650 :     COPY_NODE_FIELD(jointree);
    1025     1377650 :     COPY_NODE_FIELD(mergeActionList);
    1026     1377650 :     COPY_SCALAR_FIELD(mergeTargetRelation);
    1027     1377650 :     COPY_NODE_FIELD(mergeJoinCondition);
    1028     1377650 :     COPY_NODE_FIELD(targetList);
    1029     1377650 :     COPY_SCALAR_FIELD(override);
    1030     1377650 :     COPY_NODE_FIELD(onConflict);
    1031     1377650 :     COPY_STRING_FIELD(returningOldAlias);
    1032     1377650 :     COPY_STRING_FIELD(returningNewAlias);
    1033     1377650 :     COPY_NODE_FIELD(returningList);
    1034     1377650 :     COPY_NODE_FIELD(groupClause);
    1035     1377650 :     COPY_SCALAR_FIELD(groupDistinct);
    1036     1377650 :     COPY_SCALAR_FIELD(groupByAll);
    1037     1377650 :     COPY_NODE_FIELD(groupingSets);
    1038     1377650 :     COPY_NODE_FIELD(havingQual);
    1039     1377650 :     COPY_NODE_FIELD(windowClause);
    1040     1377650 :     COPY_NODE_FIELD(distinctClause);
    1041     1377650 :     COPY_NODE_FIELD(sortClause);
    1042     1377650 :     COPY_NODE_FIELD(limitOffset);
    1043     1377650 :     COPY_NODE_FIELD(limitCount);
    1044     1377650 :     COPY_SCALAR_FIELD(limitOption);
    1045     1377650 :     COPY_NODE_FIELD(rowMarks);
    1046     1377650 :     COPY_NODE_FIELD(setOperations);
    1047     1377650 :     COPY_NODE_FIELD(constraintDeps);
    1048     1377650 :     COPY_NODE_FIELD(withCheckOptions);
    1049     1377650 :     COPY_LOCATION_FIELD(stmt_location);
    1050     1377650 :     COPY_LOCATION_FIELD(stmt_len);
    1051             : 
    1052     1377650 :     return newnode;
    1053             : }
    1054             : 
    1055             : static TypeName *
    1056      880580 : _copyTypeName(const TypeName *from)
    1057             : {
    1058      880580 :     TypeName *newnode = makeNode(TypeName);
    1059             : 
    1060      880580 :     COPY_NODE_FIELD(names);
    1061      880580 :     COPY_SCALAR_FIELD(typeOid);
    1062      880580 :     COPY_SCALAR_FIELD(setof);
    1063      880580 :     COPY_SCALAR_FIELD(pct_type);
    1064      880580 :     COPY_NODE_FIELD(typmods);
    1065      880580 :     COPY_SCALAR_FIELD(typemod);
    1066      880580 :     COPY_NODE_FIELD(arrayBounds);
    1067      880580 :     COPY_LOCATION_FIELD(location);
    1068             : 
    1069      880580 :     return newnode;
    1070             : }
    1071             : 
    1072             : static ColumnRef *
    1073     2248106 : _copyColumnRef(const ColumnRef *from)
    1074             : {
    1075     2248106 :     ColumnRef *newnode = makeNode(ColumnRef);
    1076             : 
    1077     2248106 :     COPY_NODE_FIELD(fields);
    1078     2248106 :     COPY_LOCATION_FIELD(location);
    1079             : 
    1080     2248106 :     return newnode;
    1081             : }
    1082             : 
    1083             : static ParamRef *
    1084       82534 : _copyParamRef(const ParamRef *from)
    1085             : {
    1086       82534 :     ParamRef *newnode = makeNode(ParamRef);
    1087             : 
    1088       82534 :     COPY_SCALAR_FIELD(number);
    1089       82534 :     COPY_LOCATION_FIELD(location);
    1090             : 
    1091       82534 :     return newnode;
    1092             : }
    1093             : 
    1094             : static A_Expr *
    1095      722778 : _copyA_Expr(const A_Expr *from)
    1096             : {
    1097      722778 :     A_Expr *newnode = makeNode(A_Expr);
    1098             : 
    1099      722778 :     COPY_SCALAR_FIELD(kind);
    1100      722778 :     COPY_NODE_FIELD(name);
    1101      722778 :     COPY_NODE_FIELD(lexpr);
    1102      722778 :     COPY_NODE_FIELD(rexpr);
    1103      722778 :     COPY_LOCATION_FIELD(rexpr_list_start);
    1104      722778 :     COPY_LOCATION_FIELD(rexpr_list_end);
    1105      722778 :     COPY_LOCATION_FIELD(location);
    1106             : 
    1107      722778 :     return newnode;
    1108             : }
    1109             : 
    1110             : static TypeCast *
    1111      397754 : _copyTypeCast(const TypeCast *from)
    1112             : {
    1113      397754 :     TypeCast *newnode = makeNode(TypeCast);
    1114             : 
    1115      397754 :     COPY_NODE_FIELD(arg);
    1116      397754 :     COPY_NODE_FIELD(typeName);
    1117      397754 :     COPY_LOCATION_FIELD(location);
    1118             : 
    1119      397754 :     return newnode;
    1120             : }
    1121             : 
    1122             : static CollateClause *
    1123       11290 : _copyCollateClause(const CollateClause *from)
    1124             : {
    1125       11290 :     CollateClause *newnode = makeNode(CollateClause);
    1126             : 
    1127       11290 :     COPY_NODE_FIELD(arg);
    1128       11290 :     COPY_NODE_FIELD(collname);
    1129       11290 :     COPY_LOCATION_FIELD(location);
    1130             : 
    1131       11290 :     return newnode;
    1132             : }
    1133             : 
    1134             : static RoleSpec *
    1135       76558 : _copyRoleSpec(const RoleSpec *from)
    1136             : {
    1137       76558 :     RoleSpec *newnode = makeNode(RoleSpec);
    1138             : 
    1139       76558 :     COPY_SCALAR_FIELD(roletype);
    1140       76558 :     COPY_STRING_FIELD(rolename);
    1141       76558 :     COPY_LOCATION_FIELD(location);
    1142             : 
    1143       76558 :     return newnode;
    1144             : }
    1145             : 
    1146             : static FuncCall *
    1147      452560 : _copyFuncCall(const FuncCall *from)
    1148             : {
    1149      452560 :     FuncCall *newnode = makeNode(FuncCall);
    1150             : 
    1151      452560 :     COPY_NODE_FIELD(funcname);
    1152      452560 :     COPY_NODE_FIELD(args);
    1153      452560 :     COPY_NODE_FIELD(agg_order);
    1154      452560 :     COPY_NODE_FIELD(agg_filter);
    1155      452560 :     COPY_NODE_FIELD(over);
    1156      452560 :     COPY_SCALAR_FIELD(ignore_nulls);
    1157      452560 :     COPY_SCALAR_FIELD(agg_within_group);
    1158      452560 :     COPY_SCALAR_FIELD(agg_star);
    1159      452560 :     COPY_SCALAR_FIELD(agg_distinct);
    1160      452560 :     COPY_SCALAR_FIELD(func_variadic);
    1161      452560 :     COPY_SCALAR_FIELD(funcformat);
    1162      452560 :     COPY_LOCATION_FIELD(location);
    1163             : 
    1164      452560 :     return newnode;
    1165             : }
    1166             : 
    1167             : static A_Star *
    1168       79156 : _copyA_Star(const A_Star *from)
    1169             : {
    1170       79156 :     A_Star *newnode = makeNode(A_Star);
    1171             : 
    1172             : 
    1173       79156 :     return newnode;
    1174             : }
    1175             : 
    1176             : static A_Indices *
    1177       16740 : _copyA_Indices(const A_Indices *from)
    1178             : {
    1179       16740 :     A_Indices *newnode = makeNode(A_Indices);
    1180             : 
    1181       16740 :     COPY_SCALAR_FIELD(is_slice);
    1182       16740 :     COPY_NODE_FIELD(lidx);
    1183       16740 :     COPY_NODE_FIELD(uidx);
    1184             : 
    1185       16740 :     return newnode;
    1186             : }
    1187             : 
    1188             : static A_Indirection *
    1189       39394 : _copyA_Indirection(const A_Indirection *from)
    1190             : {
    1191       39394 :     A_Indirection *newnode = makeNode(A_Indirection);
    1192             : 
    1193       39394 :     COPY_NODE_FIELD(arg);
    1194       39394 :     COPY_NODE_FIELD(indirection);
    1195             : 
    1196       39394 :     return newnode;
    1197             : }
    1198             : 
    1199             : static A_ArrayExpr *
    1200        8584 : _copyA_ArrayExpr(const A_ArrayExpr *from)
    1201             : {
    1202        8584 :     A_ArrayExpr *newnode = makeNode(A_ArrayExpr);
    1203             : 
    1204        8584 :     COPY_NODE_FIELD(elements);
    1205        8584 :     COPY_LOCATION_FIELD(list_start);
    1206        8584 :     COPY_LOCATION_FIELD(list_end);
    1207        8584 :     COPY_LOCATION_FIELD(location);
    1208             : 
    1209        8584 :     return newnode;
    1210             : }
    1211             : 
    1212             : static ResTarget *
    1213     1439268 : _copyResTarget(const ResTarget *from)
    1214             : {
    1215     1439268 :     ResTarget *newnode = makeNode(ResTarget);
    1216             : 
    1217     1439268 :     COPY_STRING_FIELD(name);
    1218     1439268 :     COPY_NODE_FIELD(indirection);
    1219     1439268 :     COPY_NODE_FIELD(val);
    1220     1439268 :     COPY_LOCATION_FIELD(location);
    1221             : 
    1222     1439268 :     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      114800 : _copySortBy(const SortBy *from)
    1239             : {
    1240      114800 :     SortBy *newnode = makeNode(SortBy);
    1241             : 
    1242      114800 :     COPY_NODE_FIELD(node);
    1243      114800 :     COPY_SCALAR_FIELD(sortby_dir);
    1244      114800 :     COPY_SCALAR_FIELD(sortby_nulls);
    1245      114800 :     COPY_NODE_FIELD(useOp);
    1246      114800 :     COPY_LOCATION_FIELD(location);
    1247             : 
    1248      114800 :     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       25640 : _copyRangeSubselect(const RangeSubselect *from)
    1270             : {
    1271       25640 :     RangeSubselect *newnode = makeNode(RangeSubselect);
    1272             : 
    1273       25640 :     COPY_SCALAR_FIELD(lateral);
    1274       25640 :     COPY_NODE_FIELD(subquery);
    1275       25640 :     COPY_NODE_FIELD(alias);
    1276             : 
    1277       25640 :     return newnode;
    1278             : }
    1279             : 
    1280             : static RangeFunction *
    1281       55544 : _copyRangeFunction(const RangeFunction *from)
    1282             : {
    1283       55544 :     RangeFunction *newnode = makeNode(RangeFunction);
    1284             : 
    1285       55544 :     COPY_SCALAR_FIELD(lateral);
    1286       55544 :     COPY_SCALAR_FIELD(ordinality);
    1287       55544 :     COPY_SCALAR_FIELD(is_rowsfrom);
    1288       55544 :     COPY_NODE_FIELD(functions);
    1289       55544 :     COPY_NODE_FIELD(alias);
    1290       55544 :     COPY_NODE_FIELD(coldeflist);
    1291             : 
    1292       55544 :     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      157058 : _copyColumnDef(const ColumnDef *from)
    1343             : {
    1344      157058 :     ColumnDef *newnode = makeNode(ColumnDef);
    1345             : 
    1346      157058 :     COPY_STRING_FIELD(colname);
    1347      157058 :     COPY_NODE_FIELD(typeName);
    1348      157058 :     COPY_STRING_FIELD(compression);
    1349      157058 :     COPY_SCALAR_FIELD(inhcount);
    1350      157058 :     COPY_SCALAR_FIELD(is_local);
    1351      157058 :     COPY_SCALAR_FIELD(is_not_null);
    1352      157058 :     COPY_SCALAR_FIELD(is_from_type);
    1353      157058 :     COPY_SCALAR_FIELD(storage);
    1354      157058 :     COPY_STRING_FIELD(storage_name);
    1355      157058 :     COPY_NODE_FIELD(raw_default);
    1356      157058 :     COPY_NODE_FIELD(cooked_default);
    1357      157058 :     COPY_SCALAR_FIELD(identity);
    1358      157058 :     COPY_NODE_FIELD(identitySequence);
    1359      157058 :     COPY_SCALAR_FIELD(generated);
    1360      157058 :     COPY_NODE_FIELD(collClause);
    1361      157058 :     COPY_SCALAR_FIELD(collOid);
    1362      157058 :     COPY_NODE_FIELD(constraints);
    1363      157058 :     COPY_NODE_FIELD(fdwoptions);
    1364      157058 :     COPY_LOCATION_FIELD(location);
    1365             : 
    1366      157058 :     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       20854 : _copyIndexElem(const IndexElem *from)
    1383             : {
    1384       20854 :     IndexElem *newnode = makeNode(IndexElem);
    1385             : 
    1386       20854 :     COPY_STRING_FIELD(name);
    1387       20854 :     COPY_NODE_FIELD(expr);
    1388       20854 :     COPY_STRING_FIELD(indexcolname);
    1389       20854 :     COPY_NODE_FIELD(collation);
    1390       20854 :     COPY_NODE_FIELD(opclass);
    1391       20854 :     COPY_NODE_FIELD(opclassopts);
    1392       20854 :     COPY_SCALAR_FIELD(ordering);
    1393       20854 :     COPY_SCALAR_FIELD(nulls_ordering);
    1394       20854 :     COPY_LOCATION_FIELD(location);
    1395             : 
    1396       20854 :     return newnode;
    1397             : }
    1398             : 
    1399             : static DefElem *
    1400      400442 : _copyDefElem(const DefElem *from)
    1401             : {
    1402      400442 :     DefElem *newnode = makeNode(DefElem);
    1403             : 
    1404      400442 :     COPY_STRING_FIELD(defnamespace);
    1405      400442 :     COPY_STRING_FIELD(defname);
    1406      400442 :     COPY_NODE_FIELD(arg);
    1407      400442 :     COPY_SCALAR_FIELD(defaction);
    1408      400442 :     COPY_LOCATION_FIELD(location);
    1409             : 
    1410      400442 :     return newnode;
    1411             : }
    1412             : 
    1413             : static LockingClause *
    1414       11188 : _copyLockingClause(const LockingClause *from)
    1415             : {
    1416       11188 :     LockingClause *newnode = makeNode(LockingClause);
    1417             : 
    1418       11188 :     COPY_NODE_FIELD(lockedRels);
    1419       11188 :     COPY_SCALAR_FIELD(strength);
    1420       11188 :     COPY_SCALAR_FIELD(waitPolicy);
    1421             : 
    1422       11188 :     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       12630 : _copyPartitionElem(const PartitionElem *from)
    1441             : {
    1442       12630 :     PartitionElem *newnode = makeNode(PartitionElem);
    1443             : 
    1444       12630 :     COPY_STRING_FIELD(name);
    1445       12630 :     COPY_NODE_FIELD(expr);
    1446       12630 :     COPY_NODE_FIELD(collation);
    1447       12630 :     COPY_NODE_FIELD(opclass);
    1448       12630 :     COPY_LOCATION_FIELD(location);
    1449             : 
    1450       12630 :     return newnode;
    1451             : }
    1452             : 
    1453             : static PartitionSpec *
    1454       11306 : _copyPartitionSpec(const PartitionSpec *from)
    1455             : {
    1456       11306 :     PartitionSpec *newnode = makeNode(PartitionSpec);
    1457             : 
    1458       11306 :     COPY_SCALAR_FIELD(strategy);
    1459       11306 :     COPY_NODE_FIELD(partParams);
    1460       11306 :     COPY_LOCATION_FIELD(location);
    1461             : 
    1462       11306 :     return newnode;
    1463             : }
    1464             : 
    1465             : static PartitionBoundSpec *
    1466       42136 : _copyPartitionBoundSpec(const PartitionBoundSpec *from)
    1467             : {
    1468       42136 :     PartitionBoundSpec *newnode = makeNode(PartitionBoundSpec);
    1469             : 
    1470       42136 :     COPY_SCALAR_FIELD(strategy);
    1471       42136 :     COPY_SCALAR_FIELD(is_default);
    1472       42136 :     COPY_SCALAR_FIELD(modulus);
    1473       42136 :     COPY_SCALAR_FIELD(remainder);
    1474       42136 :     COPY_NODE_FIELD(listdatums);
    1475       42136 :     COPY_NODE_FIELD(lowerdatums);
    1476       42136 :     COPY_NODE_FIELD(upperdatums);
    1477       42136 :     COPY_LOCATION_FIELD(location);
    1478             : 
    1479       42136 :     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     2319036 : _copyRangeTblEntry(const RangeTblEntry *from)
    1520             : {
    1521     2319036 :     RangeTblEntry *newnode = makeNode(RangeTblEntry);
    1522             : 
    1523     2319036 :     COPY_NODE_FIELD(alias);
    1524     2319036 :     COPY_NODE_FIELD(eref);
    1525     2319036 :     COPY_SCALAR_FIELD(rtekind);
    1526     2319036 :     COPY_SCALAR_FIELD(relid);
    1527     2319036 :     COPY_SCALAR_FIELD(inh);
    1528     2319036 :     COPY_SCALAR_FIELD(relkind);
    1529     2319036 :     COPY_SCALAR_FIELD(rellockmode);
    1530     2319036 :     COPY_SCALAR_FIELD(perminfoindex);
    1531     2319036 :     COPY_NODE_FIELD(tablesample);
    1532     2319036 :     COPY_NODE_FIELD(subquery);
    1533     2319036 :     COPY_SCALAR_FIELD(security_barrier);
    1534     2319036 :     COPY_SCALAR_FIELD(jointype);
    1535     2319036 :     COPY_SCALAR_FIELD(joinmergedcols);
    1536     2319036 :     COPY_NODE_FIELD(joinaliasvars);
    1537     2319036 :     COPY_NODE_FIELD(joinleftcols);
    1538     2319036 :     COPY_NODE_FIELD(joinrightcols);
    1539     2319036 :     COPY_NODE_FIELD(join_using_alias);
    1540     2319036 :     COPY_NODE_FIELD(functions);
    1541     2319036 :     COPY_SCALAR_FIELD(funcordinality);
    1542     2319036 :     COPY_NODE_FIELD(tablefunc);
    1543     2319036 :     COPY_NODE_FIELD(values_lists);
    1544     2319036 :     COPY_STRING_FIELD(ctename);
    1545     2319036 :     COPY_SCALAR_FIELD(ctelevelsup);
    1546     2319036 :     COPY_SCALAR_FIELD(self_reference);
    1547     2319036 :     COPY_NODE_FIELD(coltypes);
    1548     2319036 :     COPY_NODE_FIELD(coltypmods);
    1549     2319036 :     COPY_NODE_FIELD(colcollations);
    1550     2319036 :     COPY_STRING_FIELD(enrname);
    1551     2319036 :     COPY_SCALAR_FIELD(enrtuples);
    1552     2319036 :     COPY_NODE_FIELD(groupexprs);
    1553     2319036 :     COPY_SCALAR_FIELD(lateral);
    1554     2319036 :     COPY_SCALAR_FIELD(inFromCl);
    1555     2319036 :     COPY_NODE_FIELD(securityQuals);
    1556             : 
    1557     2319036 :     return newnode;
    1558             : }
    1559             : 
    1560             : static RTEPermissionInfo *
    1561     1351184 : _copyRTEPermissionInfo(const RTEPermissionInfo *from)
    1562             : {
    1563     1351184 :     RTEPermissionInfo *newnode = makeNode(RTEPermissionInfo);
    1564             : 
    1565     1351184 :     COPY_SCALAR_FIELD(relid);
    1566     1351184 :     COPY_SCALAR_FIELD(inh);
    1567     1351184 :     COPY_SCALAR_FIELD(requiredPerms);
    1568     1351184 :     COPY_SCALAR_FIELD(checkAsUser);
    1569     1351184 :     COPY_BITMAPSET_FIELD(selectedCols);
    1570     1351184 :     COPY_BITMAPSET_FIELD(insertedCols);
    1571     1351184 :     COPY_BITMAPSET_FIELD(updatedCols);
    1572             : 
    1573     1351184 :     return newnode;
    1574             : }
    1575             : 
    1576             : static RangeTblFunction *
    1577      149712 : _copyRangeTblFunction(const RangeTblFunction *from)
    1578             : {
    1579      149712 :     RangeTblFunction *newnode = makeNode(RangeTblFunction);
    1580             : 
    1581      149712 :     COPY_NODE_FIELD(funcexpr);
    1582      149712 :     COPY_SCALAR_FIELD(funccolcount);
    1583      149712 :     COPY_NODE_FIELD(funccolnames);
    1584      149712 :     COPY_NODE_FIELD(funccoltypes);
    1585      149712 :     COPY_NODE_FIELD(funccoltypmods);
    1586      149712 :     COPY_NODE_FIELD(funccolcollations);
    1587      149712 :     COPY_BITMAPSET_FIELD(funcparams);
    1588             : 
    1589      149712 :     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      262590 : _copySortGroupClause(const SortGroupClause *from)
    1620             : {
    1621      262590 :     SortGroupClause *newnode = makeNode(SortGroupClause);
    1622             : 
    1623      262590 :     COPY_SCALAR_FIELD(tleSortGroupRef);
    1624      262590 :     COPY_SCALAR_FIELD(eqop);
    1625      262590 :     COPY_SCALAR_FIELD(sortop);
    1626      262590 :     COPY_SCALAR_FIELD(reverse_sort);
    1627      262590 :     COPY_SCALAR_FIELD(nulls_first);
    1628      262590 :     COPY_SCALAR_FIELD(hashable);
    1629             : 
    1630      262590 :     return newnode;
    1631             : }
    1632             : 
    1633             : static GroupingSet *
    1634        5208 : _copyGroupingSet(const GroupingSet *from)
    1635             : {
    1636        5208 :     GroupingSet *newnode = makeNode(GroupingSet);
    1637             : 
    1638        5208 :     COPY_SCALAR_FIELD(kind);
    1639        5208 :     COPY_NODE_FIELD(content);
    1640        5208 :     COPY_LOCATION_FIELD(location);
    1641             : 
    1642        5208 :     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       27418 : _copyRowMarkClause(const RowMarkClause *from)
    1670             : {
    1671       27418 :     RowMarkClause *newnode = makeNode(RowMarkClause);
    1672             : 
    1673       27418 :     COPY_SCALAR_FIELD(rti);
    1674       27418 :     COPY_SCALAR_FIELD(strength);
    1675       27418 :     COPY_SCALAR_FIELD(waitPolicy);
    1676       27418 :     COPY_SCALAR_FIELD(pushedDown);
    1677             : 
    1678       27418 :     return newnode;
    1679             : }
    1680             : 
    1681             : static WithClause *
    1682        3536 : _copyWithClause(const WithClause *from)
    1683             : {
    1684        3536 :     WithClause *newnode = makeNode(WithClause);
    1685             : 
    1686        3536 :     COPY_NODE_FIELD(ctes);
    1687        3536 :     COPY_SCALAR_FIELD(recursive);
    1688        3536 :     COPY_LOCATION_FIELD(location);
    1689             : 
    1690        3536 :     return newnode;
    1691             : }
    1692             : 
    1693             : static InferClause *
    1694        1752 : _copyInferClause(const InferClause *from)
    1695             : {
    1696        1752 :     InferClause *newnode = makeNode(InferClause);
    1697             : 
    1698        1752 :     COPY_NODE_FIELD(indexElems);
    1699        1752 :     COPY_NODE_FIELD(whereClause);
    1700        1752 :     COPY_STRING_FIELD(conname);
    1701        1752 :     COPY_LOCATION_FIELD(location);
    1702             : 
    1703        1752 :     return newnode;
    1704             : }
    1705             : 
    1706             : static OnConflictClause *
    1707        2016 : _copyOnConflictClause(const OnConflictClause *from)
    1708             : {
    1709        2016 :     OnConflictClause *newnode = makeNode(OnConflictClause);
    1710             : 
    1711        2016 :     COPY_SCALAR_FIELD(action);
    1712        2016 :     COPY_NODE_FIELD(infer);
    1713        2016 :     COPY_NODE_FIELD(targetList);
    1714        2016 :     COPY_NODE_FIELD(whereClause);
    1715        2016 :     COPY_LOCATION_FIELD(location);
    1716             : 
    1717        2016 :     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       10718 : _copyCommonTableExpr(const CommonTableExpr *from)
    1754             : {
    1755       10718 :     CommonTableExpr *newnode = makeNode(CommonTableExpr);
    1756             : 
    1757       10718 :     COPY_STRING_FIELD(ctename);
    1758       10718 :     COPY_NODE_FIELD(aliascolnames);
    1759       10718 :     COPY_SCALAR_FIELD(ctematerialized);
    1760       10718 :     COPY_NODE_FIELD(ctequery);
    1761       10718 :     COPY_NODE_FIELD(search_clause);
    1762       10718 :     COPY_NODE_FIELD(cycle_clause);
    1763       10718 :     COPY_LOCATION_FIELD(location);
    1764       10718 :     COPY_SCALAR_FIELD(cterecursive);
    1765       10718 :     COPY_SCALAR_FIELD(cterefcount);
    1766       10718 :     COPY_NODE_FIELD(ctecolnames);
    1767       10718 :     COPY_NODE_FIELD(ctecoltypes);
    1768       10718 :     COPY_NODE_FIELD(ctecoltypmods);
    1769       10718 :     COPY_NODE_FIELD(ctecolcollations);
    1770             : 
    1771       10718 :     return newnode;
    1772             : }
    1773             : 
    1774             : static MergeWhenClause *
    1775        3502 : _copyMergeWhenClause(const MergeWhenClause *from)
    1776             : {
    1777        3502 :     MergeWhenClause *newnode = makeNode(MergeWhenClause);
    1778             : 
    1779        3502 :     COPY_SCALAR_FIELD(matchKind);
    1780        3502 :     COPY_SCALAR_FIELD(commandType);
    1781        3502 :     COPY_SCALAR_FIELD(override);
    1782        3502 :     COPY_NODE_FIELD(condition);
    1783        3502 :     COPY_NODE_FIELD(targetList);
    1784        3502 :     COPY_NODE_FIELD(values);
    1785             : 
    1786        3502 :     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        3830 : _copyReturningClause(const ReturningClause *from)
    1803             : {
    1804        3830 :     ReturningClause *newnode = makeNode(ReturningClause);
    1805             : 
    1806        3830 :     COPY_NODE_FIELD(options);
    1807        3830 :     COPY_NODE_FIELD(exprs);
    1808             : 
    1809        3830 :     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      835738 : _copyRawStmt(const RawStmt *from)
    2046             : {
    2047      835738 :     RawStmt *newnode = makeNode(RawStmt);
    2048             : 
    2049      835738 :     COPY_NODE_FIELD(stmt);
    2050      835738 :     COPY_LOCATION_FIELD(stmt_location);
    2051      835738 :     COPY_LOCATION_FIELD(stmt_len);
    2052             : 
    2053      835738 :     return newnode;
    2054             : }
    2055             : 
    2056             : static InsertStmt *
    2057       78542 : _copyInsertStmt(const InsertStmt *from)
    2058             : {
    2059       78542 :     InsertStmt *newnode = makeNode(InsertStmt);
    2060             : 
    2061       78542 :     COPY_NODE_FIELD(relation);
    2062       78542 :     COPY_NODE_FIELD(cols);
    2063       78542 :     COPY_NODE_FIELD(selectStmt);
    2064       78542 :     COPY_NODE_FIELD(onConflictClause);
    2065       78542 :     COPY_NODE_FIELD(returningClause);
    2066       78542 :     COPY_NODE_FIELD(withClause);
    2067       78542 :     COPY_SCALAR_FIELD(override);
    2068             : 
    2069       78542 :     return newnode;
    2070             : }
    2071             : 
    2072             : static DeleteStmt *
    2073        4838 : _copyDeleteStmt(const DeleteStmt *from)
    2074             : {
    2075        4838 :     DeleteStmt *newnode = makeNode(DeleteStmt);
    2076             : 
    2077        4838 :     COPY_NODE_FIELD(relation);
    2078        4838 :     COPY_NODE_FIELD(usingClause);
    2079        4838 :     COPY_NODE_FIELD(whereClause);
    2080        4838 :     COPY_NODE_FIELD(returningClause);
    2081        4838 :     COPY_NODE_FIELD(withClause);
    2082             : 
    2083        4838 :     return newnode;
    2084             : }
    2085             : 
    2086             : static UpdateStmt *
    2087       15386 : _copyUpdateStmt(const UpdateStmt *from)
    2088             : {
    2089       15386 :     UpdateStmt *newnode = makeNode(UpdateStmt);
    2090             : 
    2091       15386 :     COPY_NODE_FIELD(relation);
    2092       15386 :     COPY_NODE_FIELD(targetList);
    2093       15386 :     COPY_NODE_FIELD(whereClause);
    2094       15386 :     COPY_NODE_FIELD(fromClause);
    2095       15386 :     COPY_NODE_FIELD(returningClause);
    2096       15386 :     COPY_NODE_FIELD(withClause);
    2097             : 
    2098       15386 :     return newnode;
    2099             : }
    2100             : 
    2101             : static MergeStmt *
    2102        2212 : _copyMergeStmt(const MergeStmt *from)
    2103             : {
    2104        2212 :     MergeStmt *newnode = makeNode(MergeStmt);
    2105             : 
    2106        2212 :     COPY_NODE_FIELD(relation);
    2107        2212 :     COPY_NODE_FIELD(sourceRelation);
    2108        2212 :     COPY_NODE_FIELD(joinCondition);
    2109        2212 :     COPY_NODE_FIELD(mergeWhenClauses);
    2110        2212 :     COPY_NODE_FIELD(returningClause);
    2111        2212 :     COPY_NODE_FIELD(withClause);
    2112             : 
    2113        2212 :     return newnode;
    2114             : }
    2115             : 
    2116             : static SelectStmt *
    2117      605530 : _copySelectStmt(const SelectStmt *from)
    2118             : {
    2119      605530 :     SelectStmt *newnode = makeNode(SelectStmt);
    2120             : 
    2121      605530 :     COPY_NODE_FIELD(distinctClause);
    2122      605530 :     COPY_NODE_FIELD(intoClause);
    2123      605530 :     COPY_NODE_FIELD(targetList);
    2124      605530 :     COPY_NODE_FIELD(fromClause);
    2125      605530 :     COPY_NODE_FIELD(whereClause);
    2126      605530 :     COPY_NODE_FIELD(groupClause);
    2127      605530 :     COPY_SCALAR_FIELD(groupDistinct);
    2128      605530 :     COPY_SCALAR_FIELD(groupByAll);
    2129      605530 :     COPY_NODE_FIELD(havingClause);
    2130      605530 :     COPY_NODE_FIELD(windowClause);
    2131      605530 :     COPY_NODE_FIELD(valuesLists);
    2132      605530 :     COPY_NODE_FIELD(sortClause);
    2133      605530 :     COPY_NODE_FIELD(limitOffset);
    2134      605530 :     COPY_NODE_FIELD(limitCount);
    2135      605530 :     COPY_SCALAR_FIELD(limitOption);
    2136      605530 :     COPY_NODE_FIELD(lockingClause);
    2137      605530 :     COPY_NODE_FIELD(withClause);
    2138      605530 :     COPY_SCALAR_FIELD(op);
    2139      605530 :     COPY_SCALAR_FIELD(all);
    2140      605530 :     COPY_NODE_FIELD(larg);
    2141      605530 :     COPY_NODE_FIELD(rarg);
    2142             : 
    2143      605530 :     return newnode;
    2144             : }
    2145             : 
    2146             : static SetOperationStmt *
    2147       31492 : _copySetOperationStmt(const SetOperationStmt *from)
    2148             : {
    2149       31492 :     SetOperationStmt *newnode = makeNode(SetOperationStmt);
    2150             : 
    2151       31492 :     COPY_SCALAR_FIELD(op);
    2152       31492 :     COPY_SCALAR_FIELD(all);
    2153       31492 :     COPY_NODE_FIELD(larg);
    2154       31492 :     COPY_NODE_FIELD(rarg);
    2155       31492 :     COPY_NODE_FIELD(colTypes);
    2156       31492 :     COPY_NODE_FIELD(colTypmods);
    2157       31492 :     COPY_NODE_FIELD(colCollations);
    2158       31492 :     COPY_NODE_FIELD(groupClauses);
    2159             : 
    2160       31492 :     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        5252 : _copyPLAssignStmt(const PLAssignStmt *from)
    2175             : {
    2176        5252 :     PLAssignStmt *newnode = makeNode(PLAssignStmt);
    2177             : 
    2178        5252 :     COPY_STRING_FIELD(name);
    2179        5252 :     COPY_NODE_FIELD(indirection);
    2180        5252 :     COPY_SCALAR_FIELD(nnames);
    2181        5252 :     COPY_NODE_FIELD(val);
    2182        5252 :     COPY_LOCATION_FIELD(location);
    2183             : 
    2184        5252 :     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       64982 : _copyAlterTableStmt(const AlterTableStmt *from)
    2202             : {
    2203       64982 :     AlterTableStmt *newnode = makeNode(AlterTableStmt);
    2204             : 
    2205       64982 :     COPY_NODE_FIELD(relation);
    2206       64982 :     COPY_NODE_FIELD(cmds);
    2207       64982 :     COPY_SCALAR_FIELD(objtype);
    2208       64982 :     COPY_SCALAR_FIELD(missing_ok);
    2209             : 
    2210       64982 :     return newnode;
    2211             : }
    2212             : 
    2213             : static AlterTableCmd *
    2214      106716 : _copyAlterTableCmd(const AlterTableCmd *from)
    2215             : {
    2216      106716 :     AlterTableCmd *newnode = makeNode(AlterTableCmd);
    2217             : 
    2218      106716 :     COPY_SCALAR_FIELD(subtype);
    2219      106716 :     COPY_STRING_FIELD(name);
    2220      106716 :     COPY_SCALAR_FIELD(num);
    2221      106716 :     COPY_NODE_FIELD(newowner);
    2222      106716 :     COPY_NODE_FIELD(def);
    2223      106716 :     COPY_SCALAR_FIELD(behavior);
    2224      106716 :     COPY_SCALAR_FIELD(missing_ok);
    2225      106716 :     COPY_SCALAR_FIELD(recurse);
    2226             : 
    2227      106716 :     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       55256 : _copyGrantStmt(const GrantStmt *from)
    2285             : {
    2286       55256 :     GrantStmt *newnode = makeNode(GrantStmt);
    2287             : 
    2288       55256 :     COPY_SCALAR_FIELD(is_grant);
    2289       55256 :     COPY_SCALAR_FIELD(targtype);
    2290       55256 :     COPY_SCALAR_FIELD(objtype);
    2291       55256 :     COPY_NODE_FIELD(objects);
    2292       55256 :     COPY_NODE_FIELD(privileges);
    2293       55256 :     COPY_NODE_FIELD(grantees);
    2294       55256 :     COPY_SCALAR_FIELD(grant_option);
    2295       55256 :     COPY_NODE_FIELD(grantor);
    2296       55256 :     COPY_SCALAR_FIELD(behavior);
    2297             : 
    2298       55256 :     return newnode;
    2299             : }
    2300             : 
    2301             : static ObjectWithArgs *
    2302       44798 : _copyObjectWithArgs(const ObjectWithArgs *from)
    2303             : {
    2304       44798 :     ObjectWithArgs *newnode = makeNode(ObjectWithArgs);
    2305             : 
    2306       44798 :     COPY_NODE_FIELD(objname);
    2307       44798 :     COPY_NODE_FIELD(objargs);
    2308       44798 :     COPY_NODE_FIELD(objfuncargs);
    2309       44798 :     COPY_SCALAR_FIELD(args_unspecified);
    2310             : 
    2311       44798 :     return newnode;
    2312             : }
    2313             : 
    2314             : static AccessPriv *
    2315       52612 : _copyAccessPriv(const AccessPriv *from)
    2316             : {
    2317       52612 :     AccessPriv *newnode = makeNode(AccessPriv);
    2318             : 
    2319       52612 :     COPY_STRING_FIELD(priv_name);
    2320       52612 :     COPY_NODE_FIELD(cols);
    2321             : 
    2322       52612 :     return newnode;
    2323             : }
    2324             : 
    2325             : static GrantRoleStmt *
    2326        1998 : _copyGrantRoleStmt(const GrantRoleStmt *from)
    2327             : {
    2328        1998 :     GrantRoleStmt *newnode = makeNode(GrantRoleStmt);
    2329             : 
    2330        1998 :     COPY_NODE_FIELD(granted_roles);
    2331        1998 :     COPY_NODE_FIELD(grantee_roles);
    2332        1998 :     COPY_SCALAR_FIELD(is_grant);
    2333        1998 :     COPY_NODE_FIELD(opt);
    2334        1998 :     COPY_NODE_FIELD(grantor);
    2335        1998 :     COPY_SCALAR_FIELD(behavior);
    2336             : 
    2337        1998 :     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       22954 : _copyCopyStmt(const CopyStmt *from)
    2353             : {
    2354       22954 :     CopyStmt *newnode = makeNode(CopyStmt);
    2355             : 
    2356       22954 :     COPY_NODE_FIELD(relation);
    2357       22954 :     COPY_NODE_FIELD(query);
    2358       22954 :     COPY_NODE_FIELD(attlist);
    2359       22954 :     COPY_SCALAR_FIELD(is_from);
    2360       22954 :     COPY_SCALAR_FIELD(is_program);
    2361       22954 :     COPY_STRING_FIELD(filename);
    2362       22954 :     COPY_NODE_FIELD(options);
    2363       22954 :     COPY_NODE_FIELD(whereClause);
    2364             : 
    2365       22954 :     return newnode;
    2366             : }
    2367             : 
    2368             : static VariableSetStmt *
    2369       72578 : _copyVariableSetStmt(const VariableSetStmt *from)
    2370             : {
    2371       72578 :     VariableSetStmt *newnode = makeNode(VariableSetStmt);
    2372             : 
    2373       72578 :     COPY_SCALAR_FIELD(kind);
    2374       72578 :     COPY_STRING_FIELD(name);
    2375       72578 :     COPY_NODE_FIELD(args);
    2376       72578 :     COPY_SCALAR_FIELD(jumble_args);
    2377       72578 :     COPY_SCALAR_FIELD(is_local);
    2378       72578 :     COPY_LOCATION_FIELD(location);
    2379             : 
    2380       72578 :     return newnode;
    2381             : }
    2382             : 
    2383             : static VariableShowStmt *
    2384        1860 : _copyVariableShowStmt(const VariableShowStmt *from)
    2385             : {
    2386        1860 :     VariableShowStmt *newnode = makeNode(VariableShowStmt);
    2387             : 
    2388        1860 :     COPY_STRING_FIELD(name);
    2389             : 
    2390        1860 :     return newnode;
    2391             : }
    2392             : 
    2393             : static CreateStmt *
    2394       80950 : _copyCreateStmt(const CreateStmt *from)
    2395             : {
    2396       80950 :     CreateStmt *newnode = makeNode(CreateStmt);
    2397             : 
    2398       80950 :     COPY_NODE_FIELD(relation);
    2399       80950 :     COPY_NODE_FIELD(tableElts);
    2400       80950 :     COPY_NODE_FIELD(inhRelations);
    2401       80950 :     COPY_NODE_FIELD(partbound);
    2402       80950 :     COPY_NODE_FIELD(partspec);
    2403       80950 :     COPY_NODE_FIELD(ofTypename);
    2404       80950 :     COPY_NODE_FIELD(constraints);
    2405       80950 :     COPY_NODE_FIELD(nnconstraints);
    2406       80950 :     COPY_NODE_FIELD(options);
    2407       80950 :     COPY_SCALAR_FIELD(oncommit);
    2408       80950 :     COPY_STRING_FIELD(tablespacename);
    2409       80950 :     COPY_STRING_FIELD(accessMethod);
    2410       80950 :     COPY_SCALAR_FIELD(if_not_exists);
    2411             : 
    2412       80950 :     return newnode;
    2413             : }
    2414             : 
    2415             : static Constraint *
    2416      104724 : _copyConstraint(const Constraint *from)
    2417             : {
    2418      104724 :     Constraint *newnode = makeNode(Constraint);
    2419             : 
    2420      104724 :     COPY_SCALAR_FIELD(contype);
    2421      104724 :     COPY_STRING_FIELD(conname);
    2422      104724 :     COPY_SCALAR_FIELD(deferrable);
    2423      104724 :     COPY_SCALAR_FIELD(initdeferred);
    2424      104724 :     COPY_SCALAR_FIELD(is_enforced);
    2425      104724 :     COPY_SCALAR_FIELD(skip_validation);
    2426      104724 :     COPY_SCALAR_FIELD(initially_valid);
    2427      104724 :     COPY_SCALAR_FIELD(is_no_inherit);
    2428      104724 :     COPY_NODE_FIELD(raw_expr);
    2429      104724 :     COPY_STRING_FIELD(cooked_expr);
    2430      104724 :     COPY_SCALAR_FIELD(generated_when);
    2431      104724 :     COPY_SCALAR_FIELD(generated_kind);
    2432      104724 :     COPY_SCALAR_FIELD(nulls_not_distinct);
    2433      104724 :     COPY_NODE_FIELD(keys);
    2434      104724 :     COPY_SCALAR_FIELD(without_overlaps);
    2435      104724 :     COPY_NODE_FIELD(including);
    2436      104724 :     COPY_NODE_FIELD(exclusions);
    2437      104724 :     COPY_NODE_FIELD(options);
    2438      104724 :     COPY_STRING_FIELD(indexname);
    2439      104724 :     COPY_STRING_FIELD(indexspace);
    2440      104724 :     COPY_SCALAR_FIELD(reset_default_tblspc);
    2441      104724 :     COPY_STRING_FIELD(access_method);
    2442      104724 :     COPY_NODE_FIELD(where_clause);
    2443      104724 :     COPY_NODE_FIELD(pktable);
    2444      104724 :     COPY_NODE_FIELD(fk_attrs);
    2445      104724 :     COPY_NODE_FIELD(pk_attrs);
    2446      104724 :     COPY_SCALAR_FIELD(fk_with_period);
    2447      104724 :     COPY_SCALAR_FIELD(pk_with_period);
    2448      104724 :     COPY_SCALAR_FIELD(fk_matchtype);
    2449      104724 :     COPY_SCALAR_FIELD(fk_upd_action);
    2450      104724 :     COPY_SCALAR_FIELD(fk_del_action);
    2451      104724 :     COPY_NODE_FIELD(fk_del_set_cols);
    2452      104724 :     COPY_NODE_FIELD(old_conpfeqop);
    2453      104724 :     COPY_SCALAR_FIELD(old_pktable_oid);
    2454      104724 :     COPY_LOCATION_FIELD(location);
    2455             : 
    2456      104724 :     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        1174 : _copyCreateExtensionStmt(const CreateExtensionStmt *from)
    2511             : {
    2512        1174 :     CreateExtensionStmt *newnode = makeNode(CreateExtensionStmt);
    2513             : 
    2514        1174 :     COPY_STRING_FIELD(extname);
    2515        1174 :     COPY_SCALAR_FIELD(if_not_exists);
    2516        1174 :     COPY_NODE_FIELD(options);
    2517             : 
    2518        1174 :     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         530 : _copyAlterExtensionContentsStmt(const AlterExtensionContentsStmt *from)
    2534             : {
    2535         530 :     AlterExtensionContentsStmt *newnode = makeNode(AlterExtensionContentsStmt);
    2536             : 
    2537         530 :     COPY_STRING_FIELD(extname);
    2538         530 :     COPY_SCALAR_FIELD(action);
    2539         530 :     COPY_SCALAR_FIELD(objtype);
    2540         530 :     COPY_NODE_FIELD(object);
    2541             : 
    2542         530 :     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         982 : _copyCreateForeignTableStmt(const CreateForeignTableStmt *from)
    2599             : {
    2600         982 :     CreateForeignTableStmt *newnode = makeNode(CreateForeignTableStmt);
    2601             : 
    2602         982 :     COPY_NODE_FIELD(base.relation);
    2603         982 :     COPY_NODE_FIELD(base.tableElts);
    2604         982 :     COPY_NODE_FIELD(base.inhRelations);
    2605         982 :     COPY_NODE_FIELD(base.partbound);
    2606         982 :     COPY_NODE_FIELD(base.partspec);
    2607         982 :     COPY_NODE_FIELD(base.ofTypename);
    2608         982 :     COPY_NODE_FIELD(base.constraints);
    2609         982 :     COPY_NODE_FIELD(base.nnconstraints);
    2610         982 :     COPY_NODE_FIELD(base.options);
    2611         982 :     COPY_SCALAR_FIELD(base.oncommit);
    2612         982 :     COPY_STRING_FIELD(base.tablespacename);
    2613         982 :     COPY_STRING_FIELD(base.accessMethod);
    2614         982 :     COPY_SCALAR_FIELD(base.if_not_exists);
    2615         982 :     COPY_STRING_FIELD(servername);
    2616         982 :     COPY_NODE_FIELD(options);
    2617             : 
    2618         982 :     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        7360 : _copyCreateTrigStmt(const CreateTrigStmt *from)
    2717             : {
    2718        7360 :     CreateTrigStmt *newnode = makeNode(CreateTrigStmt);
    2719             : 
    2720        7360 :     COPY_SCALAR_FIELD(replace);
    2721        7360 :     COPY_SCALAR_FIELD(isconstraint);
    2722        7360 :     COPY_STRING_FIELD(trigname);
    2723        7360 :     COPY_NODE_FIELD(relation);
    2724        7360 :     COPY_NODE_FIELD(funcname);
    2725        7360 :     COPY_NODE_FIELD(args);
    2726        7360 :     COPY_SCALAR_FIELD(row);
    2727        7360 :     COPY_SCALAR_FIELD(timing);
    2728        7360 :     COPY_SCALAR_FIELD(events);
    2729        7360 :     COPY_NODE_FIELD(columns);
    2730        7360 :     COPY_NODE_FIELD(whenClause);
    2731        7360 :     COPY_NODE_FIELD(transitionRels);
    2732        7360 :     COPY_SCALAR_FIELD(deferrable);
    2733        7360 :     COPY_SCALAR_FIELD(initdeferred);
    2734        7360 :     COPY_NODE_FIELD(constrrel);
    2735             : 
    2736        7360 :     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        3824 : _copyCreateRoleStmt(const CreateRoleStmt *from)
    2780             : {
    2781        3824 :     CreateRoleStmt *newnode = makeNode(CreateRoleStmt);
    2782             : 
    2783        3824 :     COPY_SCALAR_FIELD(stmt_type);
    2784        3824 :     COPY_STRING_FIELD(role);
    2785        3824 :     COPY_NODE_FIELD(options);
    2786             : 
    2787        3824 :     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        3532 : _copyDropRoleStmt(const DropRoleStmt *from)
    2816             : {
    2817        3532 :     DropRoleStmt *newnode = makeNode(DropRoleStmt);
    2818             : 
    2819        3532 :     COPY_NODE_FIELD(roles);
    2820        3532 :     COPY_SCALAR_FIELD(missing_ok);
    2821             : 
    2822        3532 :     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       54104 : _copyDropStmt(const DropStmt *from)
    2937             : {
    2938       54104 :     DropStmt *newnode = makeNode(DropStmt);
    2939             : 
    2940       54104 :     COPY_NODE_FIELD(objects);
    2941       54104 :     COPY_SCALAR_FIELD(removeType);
    2942       54104 :     COPY_SCALAR_FIELD(behavior);
    2943       54104 :     COPY_SCALAR_FIELD(missing_ok);
    2944       54104 :     COPY_SCALAR_FIELD(concurrent);
    2945             : 
    2946       54104 :     return newnode;
    2947             : }
    2948             : 
    2949             : static TruncateStmt *
    2950        3672 : _copyTruncateStmt(const TruncateStmt *from)
    2951             : {
    2952        3672 :     TruncateStmt *newnode = makeNode(TruncateStmt);
    2953             : 
    2954        3672 :     COPY_NODE_FIELD(relations);
    2955        3672 :     COPY_SCALAR_FIELD(restart_seqs);
    2956        3672 :     COPY_SCALAR_FIELD(behavior);
    2957             : 
    2958        3672 :     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       16144 : _copyDeclareCursorStmt(const DeclareCursorStmt *from)
    2988             : {
    2989       16144 :     DeclareCursorStmt *newnode = makeNode(DeclareCursorStmt);
    2990             : 
    2991       16144 :     COPY_STRING_FIELD(portalname);
    2992       16144 :     COPY_SCALAR_FIELD(options);
    2993       16144 :     COPY_NODE_FIELD(query);
    2994             : 
    2995       16144 :     return newnode;
    2996             : }
    2997             : 
    2998             : static ClosePortalStmt *
    2999        4504 : _copyClosePortalStmt(const ClosePortalStmt *from)
    3000             : {
    3001        4504 :     ClosePortalStmt *newnode = makeNode(ClosePortalStmt);
    3002             : 
    3003        4504 :     COPY_STRING_FIELD(portalname);
    3004             : 
    3005        4504 :     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       13996 : _copyIndexStmt(const IndexStmt *from)
    3025             : {
    3026       13996 :     IndexStmt *newnode = makeNode(IndexStmt);
    3027             : 
    3028       13996 :     COPY_STRING_FIELD(idxname);
    3029       13996 :     COPY_NODE_FIELD(relation);
    3030       13996 :     COPY_STRING_FIELD(accessMethod);
    3031       13996 :     COPY_STRING_FIELD(tableSpace);
    3032       13996 :     COPY_NODE_FIELD(indexParams);
    3033       13996 :     COPY_NODE_FIELD(indexIncludingParams);
    3034       13996 :     COPY_NODE_FIELD(options);
    3035       13996 :     COPY_NODE_FIELD(whereClause);
    3036       13996 :     COPY_NODE_FIELD(excludeOpNames);
    3037       13996 :     COPY_STRING_FIELD(idxcomment);
    3038       13996 :     COPY_SCALAR_FIELD(indexOid);
    3039       13996 :     COPY_SCALAR_FIELD(oldNumber);
    3040       13996 :     COPY_SCALAR_FIELD(oldCreateSubid);
    3041       13996 :     COPY_SCALAR_FIELD(oldFirstRelfilelocatorSubid);
    3042       13996 :     COPY_SCALAR_FIELD(unique);
    3043       13996 :     COPY_SCALAR_FIELD(nulls_not_distinct);
    3044       13996 :     COPY_SCALAR_FIELD(primary);
    3045       13996 :     COPY_SCALAR_FIELD(isconstraint);
    3046       13996 :     COPY_SCALAR_FIELD(iswithoutoverlaps);
    3047       13996 :     COPY_SCALAR_FIELD(deferrable);
    3048       13996 :     COPY_SCALAR_FIELD(initdeferred);
    3049       13996 :     COPY_SCALAR_FIELD(transformed);
    3050       13996 :     COPY_SCALAR_FIELD(concurrent);
    3051       13996 :     COPY_SCALAR_FIELD(if_not_exists);
    3052       13996 :     COPY_SCALAR_FIELD(reset_default_tblspc);
    3053             : 
    3054       13996 :     return newnode;
    3055             : }
    3056             : 
    3057             : static CreateStatsStmt *
    3058        1728 : _copyCreateStatsStmt(const CreateStatsStmt *from)
    3059             : {
    3060        1728 :     CreateStatsStmt *newnode = makeNode(CreateStatsStmt);
    3061             : 
    3062        1728 :     COPY_NODE_FIELD(defnames);
    3063        1728 :     COPY_NODE_FIELD(stat_types);
    3064        1728 :     COPY_NODE_FIELD(exprs);
    3065        1728 :     COPY_NODE_FIELD(relations);
    3066        1728 :     COPY_STRING_FIELD(stxcomment);
    3067        1728 :     COPY_SCALAR_FIELD(transformed);
    3068        1728 :     COPY_SCALAR_FIELD(if_not_exists);
    3069             : 
    3070        1728 :     return newnode;
    3071             : }
    3072             : 
    3073             : static StatsElem *
    3074        4048 : _copyStatsElem(const StatsElem *from)
    3075             : {
    3076        4048 :     StatsElem *newnode = makeNode(StatsElem);
    3077             : 
    3078        4048 :     COPY_STRING_FIELD(name);
    3079        4048 :     COPY_NODE_FIELD(expr);
    3080             : 
    3081        4048 :     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       52256 : _copyCreateFunctionStmt(const CreateFunctionStmt *from)
    3098             : {
    3099       52256 :     CreateFunctionStmt *newnode = makeNode(CreateFunctionStmt);
    3100             : 
    3101       52256 :     COPY_SCALAR_FIELD(is_procedure);
    3102       52256 :     COPY_SCALAR_FIELD(replace);
    3103       52256 :     COPY_NODE_FIELD(funcname);
    3104       52256 :     COPY_NODE_FIELD(parameters);
    3105       52256 :     COPY_NODE_FIELD(returnType);
    3106       52256 :     COPY_NODE_FIELD(options);
    3107       52256 :     COPY_NODE_FIELD(sql_body);
    3108             : 
    3109       52256 :     return newnode;
    3110             : }
    3111             : 
    3112             : static FunctionParameter *
    3113      161482 : _copyFunctionParameter(const FunctionParameter *from)
    3114             : {
    3115      161482 :     FunctionParameter *newnode = makeNode(FunctionParameter);
    3116             : 
    3117      161482 :     COPY_STRING_FIELD(name);
    3118      161482 :     COPY_NODE_FIELD(argType);
    3119      161482 :     COPY_SCALAR_FIELD(mode);
    3120      161482 :     COPY_NODE_FIELD(defexpr);
    3121      161482 :     COPY_LOCATION_FIELD(location);
    3122             : 
    3123      161482 :     return newnode;
    3124             : }
    3125             : 
    3126             : static AlterFunctionStmt *
    3127         724 : _copyAlterFunctionStmt(const AlterFunctionStmt *from)
    3128             : {
    3129         724 :     AlterFunctionStmt *newnode = makeNode(AlterFunctionStmt);
    3130             : 
    3131         724 :     COPY_SCALAR_FIELD(objtype);
    3132         724 :     COPY_NODE_FIELD(func);
    3133         724 :     COPY_NODE_FIELD(actions);
    3134             : 
    3135         724 :     return newnode;
    3136             : }
    3137             : 
    3138             : static DoStmt *
    3139        2794 : _copyDoStmt(const DoStmt *from)
    3140             : {
    3141        2794 :     DoStmt *newnode = makeNode(DoStmt);
    3142             : 
    3143        2794 :     COPY_NODE_FIELD(args);
    3144             : 
    3145        2794 :     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         360 : _copyNotifyStmt(const NotifyStmt *from)
    3258             : {
    3259         360 :     NotifyStmt *newnode = makeNode(NotifyStmt);
    3260             : 
    3261         360 :     COPY_STRING_FIELD(conditionname);
    3262         360 :     COPY_STRING_FIELD(payload);
    3263             : 
    3264         360 :     return newnode;
    3265             : }
    3266             : 
    3267             : static ListenStmt *
    3268         232 : _copyListenStmt(const ListenStmt *from)
    3269             : {
    3270         232 :     ListenStmt *newnode = makeNode(ListenStmt);
    3271             : 
    3272         232 :     COPY_STRING_FIELD(conditionname);
    3273             : 
    3274         232 :     return newnode;
    3275             : }
    3276             : 
    3277             : static UnlistenStmt *
    3278         312 : _copyUnlistenStmt(const UnlistenStmt *from)
    3279             : {
    3280         312 :     UnlistenStmt *newnode = makeNode(UnlistenStmt);
    3281             : 
    3282         312 :     COPY_STRING_FIELD(conditionname);
    3283             : 
    3284         312 :     return newnode;
    3285             : }
    3286             : 
    3287             : static TransactionStmt *
    3288      100072 : _copyTransactionStmt(const TransactionStmt *from)
    3289             : {
    3290      100072 :     TransactionStmt *newnode = makeNode(TransactionStmt);
    3291             : 
    3292      100072 :     COPY_SCALAR_FIELD(kind);
    3293      100072 :     COPY_NODE_FIELD(options);
    3294      100072 :     COPY_STRING_FIELD(savepoint_name);
    3295      100072 :     COPY_STRING_FIELD(gid);
    3296      100072 :     COPY_SCALAR_FIELD(chain);
    3297      100072 :     COPY_LOCATION_FIELD(location);
    3298             : 
    3299      100072 :     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       34806 : _copyViewStmt(const ViewStmt *from)
    3352             : {
    3353       34806 :     ViewStmt *newnode = makeNode(ViewStmt);
    3354             : 
    3355       34806 :     COPY_NODE_FIELD(view);
    3356       34806 :     COPY_NODE_FIELD(aliases);
    3357       34806 :     COPY_NODE_FIELD(query);
    3358       34806 :     COPY_SCALAR_FIELD(replace);
    3359       34806 :     COPY_NODE_FIELD(options);
    3360       34806 :     COPY_SCALAR_FIELD(withCheckOption);
    3361             : 
    3362       34806 :     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        1636 : _copyCreatedbStmt(const CreatedbStmt *from)
    3377             : {
    3378        1636 :     CreatedbStmt *newnode = makeNode(CreatedbStmt);
    3379             : 
    3380        1636 :     COPY_STRING_FIELD(dbname);
    3381        1636 :     COPY_NODE_FIELD(options);
    3382             : 
    3383        1636 :     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        2532 : _copyAlterDatabaseSetStmt(const AlterDatabaseSetStmt *from)
    3409             : {
    3410        2532 :     AlterDatabaseSetStmt *newnode = makeNode(AlterDatabaseSetStmt);
    3411             : 
    3412        2532 :     COPY_STRING_FIELD(dbname);
    3413        2532 :     COPY_NODE_FIELD(setstmt);
    3414             : 
    3415        2532 :     return newnode;
    3416             : }
    3417             : 
    3418             : static DropdbStmt *
    3419         256 : _copyDropdbStmt(const DropdbStmt *from)
    3420             : {
    3421         256 :     DropdbStmt *newnode = makeNode(DropdbStmt);
    3422             : 
    3423         256 :     COPY_STRING_FIELD(dbname);
    3424         256 :     COPY_SCALAR_FIELD(missing_ok);
    3425         256 :     COPY_NODE_FIELD(options);
    3426             : 
    3427         256 :     return newnode;
    3428             : }
    3429             : 
    3430             : static AlterSystemStmt *
    3431         416 : _copyAlterSystemStmt(const AlterSystemStmt *from)
    3432             : {
    3433         416 :     AlterSystemStmt *newnode = makeNode(AlterSystemStmt);
    3434             : 
    3435         416 :     COPY_NODE_FIELD(setstmt);
    3436             : 
    3437         416 :     return newnode;
    3438             : }
    3439             : 
    3440             : static ClusterStmt *
    3441         464 : _copyClusterStmt(const ClusterStmt *from)
    3442             : {
    3443         464 :     ClusterStmt *newnode = makeNode(ClusterStmt);
    3444             : 
    3445         464 :     COPY_NODE_FIELD(relation);
    3446         464 :     COPY_STRING_FIELD(indexname);
    3447         464 :     COPY_NODE_FIELD(params);
    3448             : 
    3449         464 :     return newnode;
    3450             : }
    3451             : 
    3452             : static VacuumStmt *
    3453       29838 : _copyVacuumStmt(const VacuumStmt *from)
    3454             : {
    3455       29838 :     VacuumStmt *newnode = makeNode(VacuumStmt);
    3456             : 
    3457       29838 :     COPY_NODE_FIELD(options);
    3458       29838 :     COPY_NODE_FIELD(rels);
    3459       29838 :     COPY_SCALAR_FIELD(is_vacuumcmd);
    3460             : 
    3461       29838 :     return newnode;
    3462             : }
    3463             : 
    3464             : static VacuumRelation *
    3465       29482 : _copyVacuumRelation(const VacuumRelation *from)
    3466             : {
    3467       29482 :     VacuumRelation *newnode = makeNode(VacuumRelation);
    3468             : 
    3469       29482 :     COPY_NODE_FIELD(relation);
    3470       29482 :     COPY_SCALAR_FIELD(oid);
    3471       29482 :     COPY_NODE_FIELD(va_cols);
    3472             : 
    3473       29482 :     return newnode;
    3474             : }
    3475             : 
    3476             : static ExplainStmt *
    3477       82064 : _copyExplainStmt(const ExplainStmt *from)
    3478             : {
    3479       82064 :     ExplainStmt *newnode = makeNode(ExplainStmt);
    3480             : 
    3481       82064 :     COPY_NODE_FIELD(query);
    3482       82064 :     COPY_NODE_FIELD(options);
    3483             : 
    3484       82064 :     return newnode;
    3485             : }
    3486             : 
    3487             : static CreateTableAsStmt *
    3488        4188 : _copyCreateTableAsStmt(const CreateTableAsStmt *from)
    3489             : {
    3490        4188 :     CreateTableAsStmt *newnode = makeNode(CreateTableAsStmt);
    3491             : 
    3492        4188 :     COPY_NODE_FIELD(query);
    3493        4188 :     COPY_NODE_FIELD(into);
    3494        4188 :     COPY_SCALAR_FIELD(objtype);
    3495        4188 :     COPY_SCALAR_FIELD(is_select_into);
    3496        4188 :     COPY_SCALAR_FIELD(if_not_exists);
    3497             : 
    3498        4188 :     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        1158 : _copyCheckPointStmt(const CheckPointStmt *from)
    3515             : {
    3516        1158 :     CheckPointStmt *newnode = makeNode(CheckPointStmt);
    3517             : 
    3518        1158 :     COPY_NODE_FIELD(options);
    3519             : 
    3520        1158 :     return newnode;
    3521             : }
    3522             : 
    3523             : static DiscardStmt *
    3524          76 : _copyDiscardStmt(const DiscardStmt *from)
    3525             : {
    3526          76 :     DiscardStmt *newnode = makeNode(DiscardStmt);
    3527             : 
    3528          76 :     COPY_SCALAR_FIELD(target);
    3529             : 
    3530          76 :     return newnode;
    3531             : }
    3532             : 
    3533             : static LockStmt *
    3534        2168 : _copyLockStmt(const LockStmt *from)
    3535             : {
    3536        2168 :     LockStmt *newnode = makeNode(LockStmt);
    3537             : 
    3538        2168 :     COPY_NODE_FIELD(relations);
    3539        2168 :     COPY_SCALAR_FIELD(mode);
    3540        2168 :     COPY_SCALAR_FIELD(nowait);
    3541             : 
    3542        2168 :     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        2470 : _copyReindexStmt(const ReindexStmt *from)
    3558             : {
    3559        2470 :     ReindexStmt *newnode = makeNode(ReindexStmt);
    3560             : 
    3561        2470 :     COPY_SCALAR_FIELD(kind);
    3562        2470 :     COPY_NODE_FIELD(relation);
    3563        2470 :     COPY_STRING_FIELD(name);
    3564        2470 :     COPY_NODE_FIELD(params);
    3565             : 
    3566        2470 :     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        4028 : _copyPrepareStmt(const PrepareStmt *from)
    3613             : {
    3614        4028 :     PrepareStmt *newnode = makeNode(PrepareStmt);
    3615             : 
    3616        4028 :     COPY_STRING_FIELD(name);
    3617        4028 :     COPY_NODE_FIELD(argtypes);
    3618        4028 :     COPY_NODE_FIELD(query);
    3619             : 
    3620        4028 :     return newnode;
    3621             : }
    3622             : 
    3623             : static ExecuteStmt *
    3624       33448 : _copyExecuteStmt(const ExecuteStmt *from)
    3625             : {
    3626       33448 :     ExecuteStmt *newnode = makeNode(ExecuteStmt);
    3627             : 
    3628       33448 :     COPY_STRING_FIELD(name);
    3629       33448 :     COPY_NODE_FIELD(params);
    3630             : 
    3631       33448 :     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         296 : _copyDropOwnedStmt(const DropOwnedStmt *from)
    3648             : {
    3649         296 :     DropOwnedStmt *newnode = makeNode(DropOwnedStmt);
    3650             : 
    3651         296 :     COPY_NODE_FIELD(roles);
    3652         296 :     COPY_SCALAR_FIELD(behavior);
    3653             : 
    3654         296 :     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         500 : _copyDropSubscriptionStmt(const DropSubscriptionStmt *from)
    3787             : {
    3788         500 :     DropSubscriptionStmt *newnode = makeNode(DropSubscriptionStmt);
    3789             : 
    3790         500 :     COPY_STRING_FIELD(subname);
    3791         500 :     COPY_SCALAR_FIELD(missing_ok);
    3792         500 :     COPY_SCALAR_FIELD(behavior);
    3793             : 
    3794         500 :     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       15986 : _copyPlaceHolderVar(const PlaceHolderVar *from)
    3879             : {
    3880       15986 :     PlaceHolderVar *newnode = makeNode(PlaceHolderVar);
    3881             : 
    3882       15986 :     COPY_NODE_FIELD(phexpr);
    3883       15986 :     COPY_BITMAPSET_FIELD(phrels);
    3884       15986 :     COPY_BITMAPSET_FIELD(phnullingrels);
    3885       15986 :     COPY_SCALAR_FIELD(phid);
    3886       15986 :     COPY_SCALAR_FIELD(phlevelsup);
    3887             : 
    3888       15986 :     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       65758 : _copyAppendRelInfo(const AppendRelInfo *from)
    3917             : {
    3918       65758 :     AppendRelInfo *newnode = makeNode(AppendRelInfo);
    3919             : 
    3920       65758 :     COPY_SCALAR_FIELD(parent_relid);
    3921       65758 :     COPY_SCALAR_FIELD(child_relid);
    3922       65758 :     COPY_SCALAR_FIELD(parent_reltype);
    3923       65758 :     COPY_SCALAR_FIELD(child_reltype);
    3924       65758 :     COPY_NODE_FIELD(translated_vars);
    3925       65758 :     COPY_SCALAR_FIELD(num_child_cols);
    3926       65758 :     COPY_POINTER_FIELD(parent_colnos, from->num_child_cols * sizeof(AttrNumber));
    3927       65758 :     COPY_SCALAR_FIELD(parent_reloid);
    3928             : 
    3929       65758 :     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      589420 : _copyPlannedStmt(const PlannedStmt *from)
    3972             : {
    3973      589420 :     PlannedStmt *newnode = makeNode(PlannedStmt);
    3974             : 
    3975      589420 :     COPY_SCALAR_FIELD(commandType);
    3976      589420 :     COPY_SCALAR_FIELD(queryId);
    3977      589420 :     COPY_SCALAR_FIELD(planId);
    3978      589420 :     COPY_SCALAR_FIELD(planOrigin);
    3979      589420 :     COPY_SCALAR_FIELD(hasReturning);
    3980      589420 :     COPY_SCALAR_FIELD(hasModifyingCTE);
    3981      589420 :     COPY_SCALAR_FIELD(canSetTag);
    3982      589420 :     COPY_SCALAR_FIELD(transientPlan);
    3983      589420 :     COPY_SCALAR_FIELD(dependsOnRole);
    3984      589420 :     COPY_SCALAR_FIELD(parallelModeNeeded);
    3985      589420 :     COPY_SCALAR_FIELD(jitFlags);
    3986      589420 :     COPY_NODE_FIELD(planTree);
    3987      589420 :     COPY_NODE_FIELD(partPruneInfos);
    3988      589420 :     COPY_NODE_FIELD(rtable);
    3989      589420 :     COPY_BITMAPSET_FIELD(unprunableRelids);
    3990      589420 :     COPY_NODE_FIELD(permInfos);
    3991      589420 :     COPY_NODE_FIELD(resultRelations);
    3992      589420 :     COPY_NODE_FIELD(appendRelations);
    3993      589420 :     COPY_NODE_FIELD(subplans);
    3994      589420 :     COPY_BITMAPSET_FIELD(rewindPlanIDs);
    3995      589420 :     COPY_NODE_FIELD(rowMarks);
    3996      589420 :     COPY_NODE_FIELD(relationOids);
    3997      589420 :     COPY_NODE_FIELD(invalItems);
    3998      589420 :     COPY_NODE_FIELD(paramExecTypes);
    3999      589420 :     COPY_NODE_FIELD(utilityStmt);
    4000      589420 :     COPY_NODE_FIELD(extension_state);
    4001      589420 :     COPY_LOCATION_FIELD(stmt_location);
    4002      589420 :     COPY_LOCATION_FIELD(stmt_len);
    4003             : 
    4004      589420 :     return newnode;
    4005             : }
    4006             : 
    4007             : static Result *
    4008      258264 : _copyResult(const Result *from)
    4009             : {
    4010      258264 :     Result *newnode = makeNode(Result);
    4011             : 
    4012      258264 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    4013      258264 :     COPY_SCALAR_FIELD(plan.startup_cost);
    4014      258264 :     COPY_SCALAR_FIELD(plan.total_cost);
    4015      258264 :     COPY_SCALAR_FIELD(plan.plan_rows);
    4016      258264 :     COPY_SCALAR_FIELD(plan.plan_width);
    4017      258264 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    4018      258264 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    4019      258264 :     COPY_SCALAR_FIELD(plan.async_capable);
    4020      258264 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    4021      258264 :     COPY_NODE_FIELD(plan.targetlist);
    4022      258264 :     COPY_NODE_FIELD(plan.qual);
    4023      258264 :     COPY_NODE_FIELD(plan.lefttree);
    4024      258264 :     COPY_NODE_FIELD(plan.righttree);
    4025      258264 :     COPY_NODE_FIELD(plan.initPlan);
    4026      258264 :     COPY_BITMAPSET_FIELD(plan.extParam);
    4027      258264 :     COPY_BITMAPSET_FIELD(plan.allParam);
    4028      258264 :     COPY_SCALAR_FIELD(result_type);
    4029      258264 :     COPY_NODE_FIELD(resconstantqual);
    4030      258264 :     COPY_BITMAPSET_FIELD(relids);
    4031             : 
    4032      258264 :     return newnode;
    4033             : }
    4034             : 
    4035             : static ProjectSet *
    4036       12514 : _copyProjectSet(const ProjectSet *from)
    4037             : {
    4038       12514 :     ProjectSet *newnode = makeNode(ProjectSet);
    4039             : 
    4040       12514 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    4041       12514 :     COPY_SCALAR_FIELD(plan.startup_cost);
    4042       12514 :     COPY_SCALAR_FIELD(plan.total_cost);
    4043       12514 :     COPY_SCALAR_FIELD(plan.plan_rows);
    4044       12514 :     COPY_SCALAR_FIELD(plan.plan_width);
    4045       12514 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    4046       12514 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    4047       12514 :     COPY_SCALAR_FIELD(plan.async_capable);
    4048       12514 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    4049       12514 :     COPY_NODE_FIELD(plan.targetlist);
    4050       12514 :     COPY_NODE_FIELD(plan.qual);
    4051       12514 :     COPY_NODE_FIELD(plan.lefttree);
    4052       12514 :     COPY_NODE_FIELD(plan.righttree);
    4053       12514 :     COPY_NODE_FIELD(plan.initPlan);
    4054       12514 :     COPY_BITMAPSET_FIELD(plan.extParam);
    4055       12514 :     COPY_BITMAPSET_FIELD(plan.allParam);
    4056             : 
    4057       12514 :     return newnode;
    4058             : }
    4059             : 
    4060             : static ModifyTable *
    4061      100600 : _copyModifyTable(const ModifyTable *from)
    4062             : {
    4063      100600 :     ModifyTable *newnode = makeNode(ModifyTable);
    4064             : 
    4065      100600 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    4066      100600 :     COPY_SCALAR_FIELD(plan.startup_cost);
    4067      100600 :     COPY_SCALAR_FIELD(plan.total_cost);
    4068      100600 :     COPY_SCALAR_FIELD(plan.plan_rows);
    4069      100600 :     COPY_SCALAR_FIELD(plan.plan_width);
    4070      100600 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    4071      100600 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    4072      100600 :     COPY_SCALAR_FIELD(plan.async_capable);
    4073      100600 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    4074      100600 :     COPY_NODE_FIELD(plan.targetlist);
    4075      100600 :     COPY_NODE_FIELD(plan.qual);
    4076      100600 :     COPY_NODE_FIELD(plan.lefttree);
    4077      100600 :     COPY_NODE_FIELD(plan.righttree);
    4078      100600 :     COPY_NODE_FIELD(plan.initPlan);
    4079      100600 :     COPY_BITMAPSET_FIELD(plan.extParam);
    4080      100600 :     COPY_BITMAPSET_FIELD(plan.allParam);
    4081      100600 :     COPY_SCALAR_FIELD(operation);
    4082      100600 :     COPY_SCALAR_FIELD(canSetTag);
    4083      100600 :     COPY_SCALAR_FIELD(nominalRelation);
    4084      100600 :     COPY_SCALAR_FIELD(rootRelation);
    4085      100600 :     COPY_NODE_FIELD(resultRelations);
    4086      100600 :     COPY_NODE_FIELD(updateColnosLists);
    4087      100600 :     COPY_NODE_FIELD(withCheckOptionLists);
    4088      100600 :     COPY_STRING_FIELD(returningOldAlias);
    4089      100600 :     COPY_STRING_FIELD(returningNewAlias);
    4090      100600 :     COPY_NODE_FIELD(returningLists);
    4091      100600 :     COPY_NODE_FIELD(fdwPrivLists);
    4092      100600 :     COPY_BITMAPSET_FIELD(fdwDirectModifyPlans);
    4093      100600 :     COPY_NODE_FIELD(rowMarks);
    4094      100600 :     COPY_SCALAR_FIELD(epqParam);
    4095      100600 :     COPY_SCALAR_FIELD(onConflictAction);
    4096      100600 :     COPY_NODE_FIELD(arbiterIndexes);
    4097      100600 :     COPY_NODE_FIELD(onConflictSet);
    4098      100600 :     COPY_NODE_FIELD(onConflictCols);
    4099      100600 :     COPY_NODE_FIELD(onConflictWhere);
    4100      100600 :     COPY_SCALAR_FIELD(exclRelRTI);
    4101      100600 :     COPY_NODE_FIELD(exclRelTlist);
    4102      100600 :     COPY_NODE_FIELD(mergeActionLists);
    4103      100600 :     COPY_NODE_FIELD(mergeJoinConditions);
    4104             : 
    4105      100600 :     return newnode;
    4106             : }
    4107             : 
    4108             : static Append *
    4109       19066 : _copyAppend(const Append *from)
    4110             : {
    4111       19066 :     Append *newnode = makeNode(Append);
    4112             : 
    4113       19066 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    4114       19066 :     COPY_SCALAR_FIELD(plan.startup_cost);
    4115       19066 :     COPY_SCALAR_FIELD(plan.total_cost);
    4116       19066 :     COPY_SCALAR_FIELD(plan.plan_rows);
    4117       19066 :     COPY_SCALAR_FIELD(plan.plan_width);
    4118       19066 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    4119       19066 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    4120       19066 :     COPY_SCALAR_FIELD(plan.async_capable);
    4121       19066 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    4122       19066 :     COPY_NODE_FIELD(plan.targetlist);
    4123       19066 :     COPY_NODE_FIELD(plan.qual);
    4124       19066 :     COPY_NODE_FIELD(plan.lefttree);
    4125       19066 :     COPY_NODE_FIELD(plan.righttree);
    4126       19066 :     COPY_NODE_FIELD(plan.initPlan);
    4127       19066 :     COPY_BITMAPSET_FIELD(plan.extParam);
    4128       19066 :     COPY_BITMAPSET_FIELD(plan.allParam);
    4129       19066 :     COPY_BITMAPSET_FIELD(apprelids);
    4130       19066 :     COPY_NODE_FIELD(appendplans);
    4131       19066 :     COPY_SCALAR_FIELD(nasyncplans);
    4132       19066 :     COPY_SCALAR_FIELD(first_partial_plan);
    4133       19066 :     COPY_SCALAR_FIELD(part_prune_index);
    4134             : 
    4135       19066 :     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         936 : _copyRecursiveUnion(const RecursiveUnion *from)
    4173             : {
    4174         936 :     RecursiveUnion *newnode = makeNode(RecursiveUnion);
    4175             : 
    4176         936 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    4177         936 :     COPY_SCALAR_FIELD(plan.startup_cost);
    4178         936 :     COPY_SCALAR_FIELD(plan.total_cost);
    4179         936 :     COPY_SCALAR_FIELD(plan.plan_rows);
    4180         936 :     COPY_SCALAR_FIELD(plan.plan_width);
    4181         936 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    4182         936 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    4183         936 :     COPY_SCALAR_FIELD(plan.async_capable);
    4184         936 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    4185         936 :     COPY_NODE_FIELD(plan.targetlist);
    4186         936 :     COPY_NODE_FIELD(plan.qual);
    4187         936 :     COPY_NODE_FIELD(plan.lefttree);
    4188         936 :     COPY_NODE_FIELD(plan.righttree);
    4189         936 :     COPY_NODE_FIELD(plan.initPlan);
    4190         936 :     COPY_BITMAPSET_FIELD(plan.extParam);
    4191         936 :     COPY_BITMAPSET_FIELD(plan.allParam);
    4192         936 :     COPY_SCALAR_FIELD(wtParam);
    4193         936 :     COPY_SCALAR_FIELD(numCols);
    4194         936 :     COPY_POINTER_FIELD(dupColIdx, from->numCols * sizeof(AttrNumber));
    4195         936 :     COPY_POINTER_FIELD(dupOperators, from->numCols * sizeof(Oid));
    4196         936 :     COPY_POINTER_FIELD(dupCollations, from->numCols * sizeof(Oid));
    4197         936 :     COPY_SCALAR_FIELD(numGroups);
    4198             : 
    4199         936 :     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         436 : _copyBitmapOr(const BitmapOr *from)
    4230             : {
    4231         436 :     BitmapOr *newnode = makeNode(BitmapOr);
    4232             : 
    4233         436 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    4234         436 :     COPY_SCALAR_FIELD(plan.startup_cost);
    4235         436 :     COPY_SCALAR_FIELD(plan.total_cost);
    4236         436 :     COPY_SCALAR_FIELD(plan.plan_rows);
    4237         436 :     COPY_SCALAR_FIELD(plan.plan_width);
    4238         436 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    4239         436 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    4240         436 :     COPY_SCALAR_FIELD(plan.async_capable);
    4241         436 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    4242         436 :     COPY_NODE_FIELD(plan.targetlist);
    4243         436 :     COPY_NODE_FIELD(plan.qual);
    4244         436 :     COPY_NODE_FIELD(plan.lefttree);
    4245         436 :     COPY_NODE_FIELD(plan.righttree);
    4246         436 :     COPY_NODE_FIELD(plan.initPlan);
    4247         436 :     COPY_BITMAPSET_FIELD(plan.extParam);
    4248         436 :     COPY_BITMAPSET_FIELD(plan.allParam);
    4249         436 :     COPY_SCALAR_FIELD(isshared);
    4250         436 :     COPY_NODE_FIELD(bitmapplans);
    4251             : 
    4252         436 :     return newnode;
    4253             : }
    4254             : 
    4255             : static SeqScan *
    4256      242010 : _copySeqScan(const SeqScan *from)
    4257             : {
    4258      242010 :     SeqScan *newnode = makeNode(SeqScan);
    4259             : 
    4260      242010 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4261      242010 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4262      242010 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4263      242010 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4264      242010 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4265      242010 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4266      242010 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4267      242010 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4268      242010 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4269      242010 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4270      242010 :     COPY_NODE_FIELD(scan.plan.qual);
    4271      242010 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4272      242010 :     COPY_NODE_FIELD(scan.plan.righttree);
    4273      242010 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4274      242010 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4275      242010 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4276      242010 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4277             : 
    4278      242010 :     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      161256 : _copyIndexScan(const IndexScan *from)
    4310             : {
    4311      161256 :     IndexScan *newnode = makeNode(IndexScan);
    4312             : 
    4313      161256 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4314      161256 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4315      161256 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4316      161256 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4317      161256 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4318      161256 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4319      161256 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4320      161256 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4321      161256 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4322      161256 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4323      161256 :     COPY_NODE_FIELD(scan.plan.qual);
    4324      161256 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4325      161256 :     COPY_NODE_FIELD(scan.plan.righttree);
    4326      161256 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4327      161256 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4328      161256 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4329      161256 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4330      161256 :     COPY_SCALAR_FIELD(indexid);
    4331      161256 :     COPY_NODE_FIELD(indexqual);
    4332      161256 :     COPY_NODE_FIELD(indexqualorig);
    4333      161256 :     COPY_NODE_FIELD(indexorderby);
    4334      161256 :     COPY_NODE_FIELD(indexorderbyorig);
    4335      161256 :     COPY_NODE_FIELD(indexorderbyops);
    4336      161256 :     COPY_SCALAR_FIELD(indexorderdir);
    4337             : 
    4338      161256 :     return newnode;
    4339             : }
    4340             : 
    4341             : static IndexOnlyScan *
    4342       21264 : _copyIndexOnlyScan(const IndexOnlyScan *from)
    4343             : {
    4344       21264 :     IndexOnlyScan *newnode = makeNode(IndexOnlyScan);
    4345             : 
    4346       21264 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4347       21264 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4348       21264 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4349       21264 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4350       21264 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4351       21264 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4352       21264 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4353       21264 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4354       21264 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4355       21264 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4356       21264 :     COPY_NODE_FIELD(scan.plan.qual);
    4357       21264 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4358       21264 :     COPY_NODE_FIELD(scan.plan.righttree);
    4359       21264 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4360       21264 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4361       21264 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4362       21264 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4363       21264 :     COPY_SCALAR_FIELD(indexid);
    4364       21264 :     COPY_NODE_FIELD(indexqual);
    4365       21264 :     COPY_NODE_FIELD(recheckqual);
    4366       21264 :     COPY_NODE_FIELD(indexorderby);
    4367       21264 :     COPY_NODE_FIELD(indextlist);
    4368       21264 :     COPY_SCALAR_FIELD(indexorderdir);
    4369             : 
    4370       21264 :     return newnode;
    4371             : }
    4372             : 
    4373             : static BitmapIndexScan *
    4374       27412 : _copyBitmapIndexScan(const BitmapIndexScan *from)
    4375             : {
    4376       27412 :     BitmapIndexScan *newnode = makeNode(BitmapIndexScan);
    4377             : 
    4378       27412 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4379       27412 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4380       27412 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4381       27412 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4382       27412 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4383       27412 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4384       27412 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4385       27412 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4386       27412 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4387       27412 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4388       27412 :     COPY_NODE_FIELD(scan.plan.qual);
    4389       27412 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4390       27412 :     COPY_NODE_FIELD(scan.plan.righttree);
    4391       27412 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4392       27412 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4393       27412 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4394       27412 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4395       27412 :     COPY_SCALAR_FIELD(indexid);
    4396       27412 :     COPY_SCALAR_FIELD(isshared);
    4397       27412 :     COPY_NODE_FIELD(indexqual);
    4398       27412 :     COPY_NODE_FIELD(indexqualorig);
    4399             : 
    4400       27412 :     return newnode;
    4401             : }
    4402             : 
    4403             : static BitmapHeapScan *
    4404       26720 : _copyBitmapHeapScan(const BitmapHeapScan *from)
    4405             : {
    4406       26720 :     BitmapHeapScan *newnode = makeNode(BitmapHeapScan);
    4407             : 
    4408       26720 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4409       26720 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4410       26720 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4411       26720 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4412       26720 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4413       26720 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4414       26720 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4415       26720 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4416       26720 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4417       26720 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4418       26720 :     COPY_NODE_FIELD(scan.plan.qual);
    4419       26720 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4420       26720 :     COPY_NODE_FIELD(scan.plan.righttree);
    4421       26720 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4422       26720 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4423       26720 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4424       26720 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4425       26720 :     COPY_NODE_FIELD(bitmapqualorig);
    4426             : 
    4427       26720 :     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       22768 : _copySubqueryScan(const SubqueryScan *from)
    4486             : {
    4487       22768 :     SubqueryScan *newnode = makeNode(SubqueryScan);
    4488             : 
    4489       22768 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4490       22768 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4491       22768 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4492       22768 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4493       22768 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4494       22768 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4495       22768 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4496       22768 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4497       22768 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4498       22768 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4499       22768 :     COPY_NODE_FIELD(scan.plan.qual);
    4500       22768 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4501       22768 :     COPY_NODE_FIELD(scan.plan.righttree);
    4502       22768 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4503       22768 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4504       22768 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4505       22768 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4506       22768 :     COPY_NODE_FIELD(subplan);
    4507       22768 :     COPY_SCALAR_FIELD(scanstatus);
    4508             : 
    4509       22768 :     return newnode;
    4510             : }
    4511             : 
    4512             : static FunctionScan *
    4513       57282 : _copyFunctionScan(const FunctionScan *from)
    4514             : {
    4515       57282 :     FunctionScan *newnode = makeNode(FunctionScan);
    4516             : 
    4517       57282 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4518       57282 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4519       57282 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4520       57282 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4521       57282 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4522       57282 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4523       57282 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4524       57282 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4525       57282 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4526       57282 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4527       57282 :     COPY_NODE_FIELD(scan.plan.qual);
    4528       57282 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4529       57282 :     COPY_NODE_FIELD(scan.plan.righttree);
    4530       57282 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4531       57282 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4532       57282 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4533       57282 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4534       57282 :     COPY_NODE_FIELD(functions);
    4535       57282 :     COPY_SCALAR_FIELD(funcordinality);
    4536             : 
    4537       57282 :     return newnode;
    4538             : }
    4539             : 
    4540             : static ValuesScan *
    4541        8740 : _copyValuesScan(const ValuesScan *from)
    4542             : {
    4543        8740 :     ValuesScan *newnode = makeNode(ValuesScan);
    4544             : 
    4545        8740 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4546        8740 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4547        8740 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4548        8740 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4549        8740 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4550        8740 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4551        8740 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4552        8740 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4553        8740 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4554        8740 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4555        8740 :     COPY_NODE_FIELD(scan.plan.qual);
    4556        8740 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4557        8740 :     COPY_NODE_FIELD(scan.plan.righttree);
    4558        8740 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4559        8740 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4560        8740 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4561        8740 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4562        8740 :     COPY_NODE_FIELD(values_lists);
    4563             : 
    4564        8740 :     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        4422 : _copyCteScan(const CteScan *from)
    4596             : {
    4597        4422 :     CteScan *newnode = makeNode(CteScan);
    4598             : 
    4599        4422 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4600        4422 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4601        4422 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4602        4422 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4603        4422 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4604        4422 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4605        4422 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4606        4422 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4607        4422 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4608        4422 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4609        4422 :     COPY_NODE_FIELD(scan.plan.qual);
    4610        4422 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4611        4422 :     COPY_NODE_FIELD(scan.plan.righttree);
    4612        4422 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4613        4422 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4614        4422 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4615        4422 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4616        4422 :     COPY_SCALAR_FIELD(ctePlanId);
    4617        4422 :     COPY_SCALAR_FIELD(cteParam);
    4618             : 
    4619        4422 :     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         936 : _copyWorkTableScan(const WorkTableScan *from)
    4651             : {
    4652         936 :     WorkTableScan *newnode = makeNode(WorkTableScan);
    4653             : 
    4654         936 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4655         936 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4656         936 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4657         936 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4658         936 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4659         936 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4660         936 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4661         936 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4662         936 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4663         936 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4664         936 :     COPY_NODE_FIELD(scan.plan.qual);
    4665         936 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4666         936 :     COPY_NODE_FIELD(scan.plan.righttree);
    4667         936 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4668         936 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4669         936 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4670         936 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4671         936 :     COPY_SCALAR_FIELD(wtParam);
    4672             : 
    4673         936 :     return newnode;
    4674             : }
    4675             : 
    4676             : static ForeignScan *
    4677        2128 : _copyForeignScan(const ForeignScan *from)
    4678             : {
    4679        2128 :     ForeignScan *newnode = makeNode(ForeignScan);
    4680             : 
    4681        2128 :     COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
    4682        2128 :     COPY_SCALAR_FIELD(scan.plan.startup_cost);
    4683        2128 :     COPY_SCALAR_FIELD(scan.plan.total_cost);
    4684        2128 :     COPY_SCALAR_FIELD(scan.plan.plan_rows);
    4685        2128 :     COPY_SCALAR_FIELD(scan.plan.plan_width);
    4686        2128 :     COPY_SCALAR_FIELD(scan.plan.parallel_aware);
    4687        2128 :     COPY_SCALAR_FIELD(scan.plan.parallel_safe);
    4688        2128 :     COPY_SCALAR_FIELD(scan.plan.async_capable);
    4689        2128 :     COPY_SCALAR_FIELD(scan.plan.plan_node_id);
    4690        2128 :     COPY_NODE_FIELD(scan.plan.targetlist);
    4691        2128 :     COPY_NODE_FIELD(scan.plan.qual);
    4692        2128 :     COPY_NODE_FIELD(scan.plan.lefttree);
    4693        2128 :     COPY_NODE_FIELD(scan.plan.righttree);
    4694        2128 :     COPY_NODE_FIELD(scan.plan.initPlan);
    4695        2128 :     COPY_BITMAPSET_FIELD(scan.plan.extParam);
    4696        2128 :     COPY_BITMAPSET_FIELD(scan.plan.allParam);
    4697        2128 :     COPY_SCALAR_FIELD(scan.scanrelid);
    4698        2128 :     COPY_SCALAR_FIELD(operation);
    4699        2128 :     COPY_SCALAR_FIELD(resultRelation);
    4700        2128 :     COPY_SCALAR_FIELD(checkAsUser);
    4701        2128 :     COPY_SCALAR_FIELD(fs_server);
    4702        2128 :     COPY_NODE_FIELD(fdw_exprs);
    4703        2128 :     COPY_NODE_FIELD(fdw_private);
    4704        2128 :     COPY_NODE_FIELD(fdw_scan_tlist);
    4705        2128 :     COPY_NODE_FIELD(fdw_recheck_quals);
    4706        2128 :     COPY_BITMAPSET_FIELD(fs_relids);
    4707        2128 :     COPY_BITMAPSET_FIELD(fs_base_relids);
    4708        2128 :     COPY_SCALAR_FIELD(fsSystemCol);
    4709             : 
    4710        2128 :     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      105768 : _copyNestLoop(const NestLoop *from)
    4748             : {
    4749      105768 :     NestLoop *newnode = makeNode(NestLoop);
    4750             : 
    4751      105768 :     COPY_SCALAR_FIELD(join.plan.disabled_nodes);
    4752      105768 :     COPY_SCALAR_FIELD(join.plan.startup_cost);
    4753      105768 :     COPY_SCALAR_FIELD(join.plan.total_cost);
    4754      105768 :     COPY_SCALAR_FIELD(join.plan.plan_rows);
    4755      105768 :     COPY_SCALAR_FIELD(join.plan.plan_width);
    4756      105768 :     COPY_SCALAR_FIELD(join.plan.parallel_aware);
    4757      105768 :     COPY_SCALAR_FIELD(join.plan.parallel_safe);
    4758      105768 :     COPY_SCALAR_FIELD(join.plan.async_capable);
    4759      105768 :     COPY_SCALAR_FIELD(join.plan.plan_node_id);
    4760      105768 :     COPY_NODE_FIELD(join.plan.targetlist);
    4761      105768 :     COPY_NODE_FIELD(join.plan.qual);
    4762      105768 :     COPY_NODE_FIELD(join.plan.lefttree);
    4763      105768 :     COPY_NODE_FIELD(join.plan.righttree);
    4764      105768 :     COPY_NODE_FIELD(join.plan.initPlan);
    4765      105768 :     COPY_BITMAPSET_FIELD(join.plan.extParam);
    4766      105768 :     COPY_BITMAPSET_FIELD(join.plan.allParam);
    4767      105768 :     COPY_SCALAR_FIELD(join.jointype);
    4768      105768 :     COPY_SCALAR_FIELD(join.inner_unique);
    4769      105768 :     COPY_NODE_FIELD(join.joinqual);
    4770      105768 :     COPY_NODE_FIELD(nestParams);
    4771             : 
    4772      105768 :     return newnode;
    4773             : }
    4774             : 
    4775             : static NestLoopParam *
    4776       59172 : _copyNestLoopParam(const NestLoopParam *from)
    4777             : {
    4778       59172 :     NestLoopParam *newnode = makeNode(NestLoopParam);
    4779             : 
    4780       59172 :     COPY_SCALAR_FIELD(paramno);
    4781       59172 :     COPY_NODE_FIELD(paramval);
    4782             : 
    4783       59172 :     return newnode;
    4784             : }
    4785             : 
    4786             : static MergeJoin *
    4787        9428 : _copyMergeJoin(const MergeJoin *from)
    4788             : {
    4789        9428 :     MergeJoin *newnode = makeNode(MergeJoin);
    4790             : 
    4791        9428 :     COPY_SCALAR_FIELD(join.plan.disabled_nodes);
    4792        9428 :     COPY_SCALAR_FIELD(join.plan.startup_cost);
    4793        9428 :     COPY_SCALAR_FIELD(join.plan.total_cost);
    4794        9428 :     COPY_SCALAR_FIELD(join.plan.plan_rows);
    4795        9428 :     COPY_SCALAR_FIELD(join.plan.plan_width);
    4796        9428 :     COPY_SCALAR_FIELD(join.plan.parallel_aware);
    4797        9428 :     COPY_SCALAR_FIELD(join.plan.parallel_safe);
    4798        9428 :     COPY_SCALAR_FIELD(join.plan.async_capable);
    4799        9428 :     COPY_SCALAR_FIELD(join.plan.plan_node_id);
    4800        9428 :     COPY_NODE_FIELD(join.plan.targetlist);
    4801        9428 :     COPY_NODE_FIELD(join.plan.qual);
    4802        9428 :     COPY_NODE_FIELD(join.plan.lefttree);
    4803        9428 :     COPY_NODE_FIELD(join.plan.righttree);
    4804        9428 :     COPY_NODE_FIELD(join.plan.initPlan);
    4805        9428 :     COPY_BITMAPSET_FIELD(join.plan.extParam);
    4806        9428 :     COPY_BITMAPSET_FIELD(join.plan.allParam);
    4807        9428 :     COPY_SCALAR_FIELD(join.jointype);
    4808        9428 :     COPY_SCALAR_FIELD(join.inner_unique);
    4809        9428 :     COPY_NODE_FIELD(join.joinqual);
    4810        9428 :     COPY_SCALAR_FIELD(skip_mark_restore);
    4811        9428 :     COPY_NODE_FIELD(mergeclauses);
    4812        9428 :     COPY_POINTER_FIELD(mergeFamilies, list_length(from->mergeclauses) * sizeof(Oid));
    4813        9428 :     COPY_POINTER_FIELD(mergeCollations, list_length(from->mergeclauses) * sizeof(Oid));
    4814        9428 :     COPY_POINTER_FIELD(mergeReversals, list_length(from->mergeclauses) * sizeof(bool));
    4815        9428 :     COPY_POINTER_FIELD(mergeNullsFirst, list_length(from->mergeclauses) * sizeof(bool));
    4816             : 
    4817        9428 :     return newnode;
    4818             : }
    4819             : 
    4820             : static HashJoin *
    4821       38376 : _copyHashJoin(const HashJoin *from)
    4822             : {
    4823       38376 :     HashJoin *newnode = makeNode(HashJoin);
    4824             : 
    4825       38376 :     COPY_SCALAR_FIELD(join.plan.disabled_nodes);
    4826       38376 :     COPY_SCALAR_FIELD(join.plan.startup_cost);
    4827       38376 :     COPY_SCALAR_FIELD(join.plan.total_cost);
    4828       38376 :     COPY_SCALAR_FIELD(join.plan.plan_rows);
    4829       38376 :     COPY_SCALAR_FIELD(join.plan.plan_width);
    4830       38376 :     COPY_SCALAR_FIELD(join.plan.parallel_aware);
    4831       38376 :     COPY_SCALAR_FIELD(join.plan.parallel_safe);
    4832       38376 :     COPY_SCALAR_FIELD(join.plan.async_capable);
    4833       38376 :     COPY_SCALAR_FIELD(join.plan.plan_node_id);
    4834       38376 :     COPY_NODE_FIELD(join.plan.targetlist);
    4835       38376 :     COPY_NODE_FIELD(join.plan.qual);
    4836       38376 :     COPY_NODE_FIELD(join.plan.lefttree);
    4837       38376 :     COPY_NODE_FIELD(join.plan.righttree);
    4838       38376 :     COPY_NODE_FIELD(join.plan.initPlan);
    4839       38376 :     COPY_BITMAPSET_FIELD(join.plan.extParam);
    4840       38376 :     COPY_BITMAPSET_FIELD(join.plan.allParam);
    4841       38376 :     COPY_SCALAR_FIELD(join.jointype);
    4842       38376 :     COPY_SCALAR_FIELD(join.inner_unique);
    4843       38376 :     COPY_NODE_FIELD(join.joinqual);
    4844       38376 :     COPY_NODE_FIELD(hashclauses);
    4845       38376 :     COPY_NODE_FIELD(hashoperators);
    4846       38376 :     COPY_NODE_FIELD(hashcollations);
    4847       38376 :     COPY_NODE_FIELD(hashkeys);
    4848             : 
    4849       38376 :     return newnode;
    4850             : }
    4851             : 
    4852             : static Material *
    4853        5164 : _copyMaterial(const Material *from)
    4854             : {
    4855        5164 :     Material *newnode = makeNode(Material);
    4856             : 
    4857        5164 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    4858        5164 :     COPY_SCALAR_FIELD(plan.startup_cost);
    4859        5164 :     COPY_SCALAR_FIELD(plan.total_cost);
    4860        5164 :     COPY_SCALAR_FIELD(plan.plan_rows);
    4861        5164 :     COPY_SCALAR_FIELD(plan.plan_width);
    4862        5164 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    4863        5164 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    4864        5164 :     COPY_SCALAR_FIELD(plan.async_capable);
    4865        5164 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    4866        5164 :     COPY_NODE_FIELD(plan.targetlist);
    4867        5164 :     COPY_NODE_FIELD(plan.qual);
    4868        5164 :     COPY_NODE_FIELD(plan.lefttree);
    4869        5164 :     COPY_NODE_FIELD(plan.righttree);
    4870        5164 :     COPY_NODE_FIELD(plan.initPlan);
    4871        5164 :     COPY_BITMAPSET_FIELD(plan.extParam);
    4872        5164 :     COPY_BITMAPSET_FIELD(plan.allParam);
    4873             : 
    4874        5164 :     return newnode;
    4875             : }
    4876             : 
    4877             : static Memoize *
    4878        2754 : _copyMemoize(const Memoize *from)
    4879             : {
    4880        2754 :     Memoize *newnode = makeNode(Memoize);
    4881             : 
    4882        2754 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    4883        2754 :     COPY_SCALAR_FIELD(plan.startup_cost);
    4884        2754 :     COPY_SCALAR_FIELD(plan.total_cost);
    4885        2754 :     COPY_SCALAR_FIELD(plan.plan_rows);
    4886        2754 :     COPY_SCALAR_FIELD(plan.plan_width);
    4887        2754 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    4888        2754 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    4889        2754 :     COPY_SCALAR_FIELD(plan.async_capable);
    4890        2754 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    4891        2754 :     COPY_NODE_FIELD(plan.targetlist);
    4892        2754 :     COPY_NODE_FIELD(plan.qual);
    4893        2754 :     COPY_NODE_FIELD(plan.lefttree);
    4894        2754 :     COPY_NODE_FIELD(plan.righttree);
    4895        2754 :     COPY_NODE_FIELD(plan.initPlan);
    4896        2754 :     COPY_BITMAPSET_FIELD(plan.extParam);
    4897        2754 :     COPY_BITMAPSET_FIELD(plan.allParam);
    4898        2754 :     COPY_SCALAR_FIELD(numKeys);
    4899        2754 :     COPY_POINTER_FIELD(hashOperators, from->numKeys * sizeof(Oid));
    4900        2754 :     COPY_POINTER_FIELD(collations, from->numKeys * sizeof(Oid));
    4901        2754 :     COPY_NODE_FIELD(param_exprs);
    4902        2754 :     COPY_SCALAR_FIELD(singlerow);
    4903        2754 :     COPY_SCALAR_FIELD(binary_mode);
    4904        2754 :     COPY_SCALAR_FIELD(est_entries);
    4905        2754 :     COPY_BITMAPSET_FIELD(keyparamids);
    4906        2754 :     COPY_SCALAR_FIELD(est_calls);
    4907        2754 :     COPY_SCALAR_FIELD(est_unique_keys);
    4908        2754 :     COPY_SCALAR_FIELD(est_hit_ratio);
    4909             : 
    4910        2754 :     return newnode;
    4911             : }
    4912             : 
    4913             : static Sort *
    4914       84778 : _copySort(const Sort *from)
    4915             : {
    4916       84778 :     Sort *newnode = makeNode(Sort);
    4917             : 
    4918       84778 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    4919       84778 :     COPY_SCALAR_FIELD(plan.startup_cost);
    4920       84778 :     COPY_SCALAR_FIELD(plan.total_cost);
    4921       84778 :     COPY_SCALAR_FIELD(plan.plan_rows);
    4922       84778 :     COPY_SCALAR_FIELD(plan.plan_width);
    4923       84778 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    4924       84778 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    4925       84778 :     COPY_SCALAR_FIELD(plan.async_capable);
    4926       84778 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    4927       84778 :     COPY_NODE_FIELD(plan.targetlist);
    4928       84778 :     COPY_NODE_FIELD(plan.qual);
    4929       84778 :     COPY_NODE_FIELD(plan.lefttree);
    4930       84778 :     COPY_NODE_FIELD(plan.righttree);
    4931       84778 :     COPY_NODE_FIELD(plan.initPlan);
    4932       84778 :     COPY_BITMAPSET_FIELD(plan.extParam);
    4933       84778 :     COPY_BITMAPSET_FIELD(plan.allParam);
    4934       84778 :     COPY_SCALAR_FIELD(numCols);
    4935       84778 :     COPY_POINTER_FIELD(sortColIdx, from->numCols * sizeof(AttrNumber));
    4936       84778 :     COPY_POINTER_FIELD(sortOperators, from->numCols * sizeof(Oid));
    4937       84778 :     COPY_POINTER_FIELD(collations, from->numCols * sizeof(Oid));
    4938       84778 :     COPY_POINTER_FIELD(nullsFirst, from->numCols * sizeof(bool));
    4939             : 
    4940       84778 :     return newnode;
    4941             : }
    4942             : 
    4943             : static IncrementalSort *
    4944        1218 : _copyIncrementalSort(const IncrementalSort *from)
    4945             : {
    4946        1218 :     IncrementalSort *newnode = makeNode(IncrementalSort);
    4947             : 
    4948        1218 :     COPY_SCALAR_FIELD(sort.plan.disabled_nodes);
    4949        1218 :     COPY_SCALAR_FIELD(sort.plan.startup_cost);
    4950        1218 :     COPY_SCALAR_FIELD(sort.plan.total_cost);
    4951        1218 :     COPY_SCALAR_FIELD(sort.plan.plan_rows);
    4952        1218 :     COPY_SCALAR_FIELD(sort.plan.plan_width);
    4953        1218 :     COPY_SCALAR_FIELD(sort.plan.parallel_aware);
    4954        1218 :     COPY_SCALAR_FIELD(sort.plan.parallel_safe);
    4955        1218 :     COPY_SCALAR_FIELD(sort.plan.async_capable);
    4956        1218 :     COPY_SCALAR_FIELD(sort.plan.plan_node_id);
    4957        1218 :     COPY_NODE_FIELD(sort.plan.targetlist);
    4958        1218 :     COPY_NODE_FIELD(sort.plan.qual);
    4959        1218 :     COPY_NODE_FIELD(sort.plan.lefttree);
    4960        1218 :     COPY_NODE_FIELD(sort.plan.righttree);
    4961        1218 :     COPY_NODE_FIELD(sort.plan.initPlan);
    4962        1218 :     COPY_BITMAPSET_FIELD(sort.plan.extParam);
    4963        1218 :     COPY_BITMAPSET_FIELD(sort.plan.allParam);
    4964        1218 :     COPY_SCALAR_FIELD(sort.numCols);
    4965        1218 :     COPY_POINTER_FIELD(sort.sortColIdx, from->sort.numCols * sizeof(AttrNumber));
    4966        1218 :     COPY_POINTER_FIELD(sort.sortOperators, from->sort.numCols * sizeof(Oid));
    4967        1218 :     COPY_POINTER_FIELD(sort.collations, from->sort.numCols * sizeof(Oid));
    4968        1218 :     COPY_POINTER_FIELD(sort.nullsFirst, from->sort.numCols * sizeof(bool));
    4969        1218 :     COPY_SCALAR_FIELD(nPresortedCols);
    4970             : 
    4971        1218 :     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       55750 : _copyAgg(const Agg *from)
    5005             : {
    5006       55750 :     Agg *newnode = makeNode(Agg);
    5007             : 
    5008       55750 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    5009       55750 :     COPY_SCALAR_FIELD(plan.startup_cost);
    5010       55750 :     COPY_SCALAR_FIELD(plan.total_cost);
    5011       55750 :     COPY_SCALAR_FIELD(plan.plan_rows);
    5012       55750 :     COPY_SCALAR_FIELD(plan.plan_width);
    5013       55750 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    5014       55750 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    5015       55750 :     COPY_SCALAR_FIELD(plan.async_capable);
    5016       55750 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    5017       55750 :     COPY_NODE_FIELD(plan.targetlist);
    5018       55750 :     COPY_NODE_FIELD(plan.qual);
    5019       55750 :     COPY_NODE_FIELD(plan.lefttree);
    5020       55750 :     COPY_NODE_FIELD(plan.righttree);
    5021       55750 :     COPY_NODE_FIELD(plan.initPlan);
    5022       55750 :     COPY_BITMAPSET_FIELD(plan.extParam);
    5023       55750 :     COPY_BITMAPSET_FIELD(plan.allParam);
    5024       55750 :     COPY_SCALAR_FIELD(aggstrategy);
    5025       55750 :     COPY_SCALAR_FIELD(aggsplit);
    5026       55750 :     COPY_SCALAR_FIELD(numCols);
    5027       55750 :     COPY_POINTER_FIELD(grpColIdx, from->numCols * sizeof(AttrNumber));
    5028       55750 :     COPY_POINTER_FIELD(grpOperators, from->numCols * sizeof(Oid));
    5029       55750 :     COPY_POINTER_FIELD(grpCollations, from->numCols * sizeof(Oid));
    5030       55750 :     COPY_SCALAR_FIELD(numGroups);
    5031       55750 :     COPY_SCALAR_FIELD(transitionSpace);
    5032       55750 :     COPY_BITMAPSET_FIELD(aggParams);
    5033       55750 :     COPY_NODE_FIELD(groupingSets);
    5034       55750 :     COPY_NODE_FIELD(chain);
    5035             : 
    5036       55750 :     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        5818 : _copyUnique(const Unique *from)
    5087             : {
    5088        5818 :     Unique *newnode = makeNode(Unique);
    5089             : 
    5090        5818 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    5091        5818 :     COPY_SCALAR_FIELD(plan.startup_cost);
    5092        5818 :     COPY_SCALAR_FIELD(plan.total_cost);
    5093        5818 :     COPY_SCALAR_FIELD(plan.plan_rows);
    5094        5818 :     COPY_SCALAR_FIELD(plan.plan_width);
    5095        5818 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    5096        5818 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    5097        5818 :     COPY_SCALAR_FIELD(plan.async_capable);
    5098        5818 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    5099        5818 :     COPY_NODE_FIELD(plan.targetlist);
    5100        5818 :     COPY_NODE_FIELD(plan.qual);
    5101        5818 :     COPY_NODE_FIELD(plan.lefttree);
    5102        5818 :     COPY_NODE_FIELD(plan.righttree);
    5103        5818 :     COPY_NODE_FIELD(plan.initPlan);
    5104        5818 :     COPY_BITMAPSET_FIELD(plan.extParam);
    5105        5818 :     COPY_BITMAPSET_FIELD(plan.allParam);
    5106        5818 :     COPY_SCALAR_FIELD(numCols);
    5107        5818 :     COPY_POINTER_FIELD(uniqColIdx, from->numCols * sizeof(AttrNumber));
    5108        5818 :     COPY_POINTER_FIELD(uniqOperators, from->numCols * sizeof(Oid));
    5109        5818 :     COPY_POINTER_FIELD(uniqCollations, from->numCols * sizeof(Oid));
    5110             : 
    5111        5818 :     return newnode;
    5112             : }
    5113             : 
    5114             : static Gather *
    5115        1250 : _copyGather(const Gather *from)
    5116             : {
    5117        1250 :     Gather *newnode = makeNode(Gather);
    5118             : 
    5119        1250 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    5120        1250 :     COPY_SCALAR_FIELD(plan.startup_cost);
    5121        1250 :     COPY_SCALAR_FIELD(plan.total_cost);
    5122        1250 :     COPY_SCALAR_FIELD(plan.plan_rows);
    5123        1250 :     COPY_SCALAR_FIELD(plan.plan_width);
    5124        1250 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    5125        1250 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    5126        1250 :     COPY_SCALAR_FIELD(plan.async_capable);
    5127        1250 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    5128        1250 :     COPY_NODE_FIELD(plan.targetlist);
    5129        1250 :     COPY_NODE_FIELD(plan.qual);
    5130        1250 :     COPY_NODE_FIELD(plan.lefttree);
    5131        1250 :     COPY_NODE_FIELD(plan.righttree);
    5132        1250 :     COPY_NODE_FIELD(plan.initPlan);
    5133        1250 :     COPY_BITMAPSET_FIELD(plan.extParam);
    5134        1250 :     COPY_BITMAPSET_FIELD(plan.allParam);
    5135        1250 :     COPY_SCALAR_FIELD(num_workers);
    5136        1250 :     COPY_SCALAR_FIELD(rescan_param);
    5137        1250 :     COPY_SCALAR_FIELD(single_copy);
    5138        1250 :     COPY_SCALAR_FIELD(invisible);
    5139        1250 :     COPY_BITMAPSET_FIELD(initParam);
    5140             : 
    5141        1250 :     return newnode;
    5142             : }
    5143             : 
    5144             : static GatherMerge *
    5145         360 : _copyGatherMerge(const GatherMerge *from)
    5146             : {
    5147         360 :     GatherMerge *newnode = makeNode(GatherMerge);
    5148             : 
    5149         360 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    5150         360 :     COPY_SCALAR_FIELD(plan.startup_cost);
    5151         360 :     COPY_SCALAR_FIELD(plan.total_cost);
    5152         360 :     COPY_SCALAR_FIELD(plan.plan_rows);
    5153         360 :     COPY_SCALAR_FIELD(plan.plan_width);
    5154         360 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    5155         360 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    5156         360 :     COPY_SCALAR_FIELD(plan.async_capable);
    5157         360 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    5158         360 :     COPY_NODE_FIELD(plan.targetlist);
    5159         360 :     COPY_NODE_FIELD(plan.qual);
    5160         360 :     COPY_NODE_FIELD(plan.lefttree);
    5161         360 :     COPY_NODE_FIELD(plan.righttree);
    5162         360 :     COPY_NODE_FIELD(plan.initPlan);
    5163         360 :     COPY_BITMAPSET_FIELD(plan.extParam);
    5164         360 :     COPY_BITMAPSET_FIELD(plan.allParam);
    5165         360 :     COPY_SCALAR_FIELD(num_workers);
    5166         360 :     COPY_SCALAR_FIELD(rescan_param);
    5167         360 :     COPY_SCALAR_FIELD(numCols);
    5168         360 :     COPY_POINTER_FIELD(sortColIdx, from->numCols * sizeof(AttrNumber));
    5169         360 :     COPY_POINTER_FIELD(sortOperators, from->numCols * sizeof(Oid));
    5170         360 :     COPY_POINTER_FIELD(collations, from->numCols * sizeof(Oid));
    5171         360 :     COPY_POINTER_FIELD(nullsFirst, from->numCols * sizeof(bool));
    5172         360 :     COPY_BITMAPSET_FIELD(initParam);
    5173             : 
    5174         360 :     return newnode;
    5175             : }
    5176             : 
    5177             : static Hash *
    5178       38376 : _copyHash(const Hash *from)
    5179             : {
    5180       38376 :     Hash *newnode = makeNode(Hash);
    5181             : 
    5182       38376 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    5183       38376 :     COPY_SCALAR_FIELD(plan.startup_cost);
    5184       38376 :     COPY_SCALAR_FIELD(plan.total_cost);
    5185       38376 :     COPY_SCALAR_FIELD(plan.plan_rows);
    5186       38376 :     COPY_SCALAR_FIELD(plan.plan_width);
    5187       38376 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    5188       38376 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    5189       38376 :     COPY_SCALAR_FIELD(plan.async_capable);
    5190       38376 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    5191       38376 :     COPY_NODE_FIELD(plan.targetlist);
    5192       38376 :     COPY_NODE_FIELD(plan.qual);
    5193       38376 :     COPY_NODE_FIELD(plan.lefttree);
    5194       38376 :     COPY_NODE_FIELD(plan.righttree);
    5195       38376 :     COPY_NODE_FIELD(plan.initPlan);
    5196       38376 :     COPY_BITMAPSET_FIELD(plan.extParam);
    5197       38376 :     COPY_BITMAPSET_FIELD(plan.allParam);
    5198       38376 :     COPY_NODE_FIELD(hashkeys);
    5199       38376 :     COPY_SCALAR_FIELD(skewTable);
    5200       38376 :     COPY_SCALAR_FIELD(skewColumn);
    5201       38376 :     COPY_SCALAR_FIELD(skewInherit);
    5202       38376 :     COPY_SCALAR_FIELD(rows_total);
    5203             : 
    5204       38376 :     return newnode;
    5205             : }
    5206             : 
    5207             : static SetOp *
    5208         680 : _copySetOp(const SetOp *from)
    5209             : {
    5210         680 :     SetOp *newnode = makeNode(SetOp);
    5211             : 
    5212         680 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    5213         680 :     COPY_SCALAR_FIELD(plan.startup_cost);
    5214         680 :     COPY_SCALAR_FIELD(plan.total_cost);
    5215         680 :     COPY_SCALAR_FIELD(plan.plan_rows);
    5216         680 :     COPY_SCALAR_FIELD(plan.plan_width);
    5217         680 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    5218         680 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    5219         680 :     COPY_SCALAR_FIELD(plan.async_capable);
    5220         680 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    5221         680 :     COPY_NODE_FIELD(plan.targetlist);
    5222         680 :     COPY_NODE_FIELD(plan.qual);
    5223         680 :     COPY_NODE_FIELD(plan.lefttree);
    5224         680 :     COPY_NODE_FIELD(plan.righttree);
    5225         680 :     COPY_NODE_FIELD(plan.initPlan);
    5226         680 :     COPY_BITMAPSET_FIELD(plan.extParam);
    5227         680 :     COPY_BITMAPSET_FIELD(plan.allParam);
    5228         680 :     COPY_SCALAR_FIELD(cmd);
    5229         680 :     COPY_SCALAR_FIELD(strategy);
    5230         680 :     COPY_SCALAR_FIELD(numCols);
    5231         680 :     COPY_POINTER_FIELD(cmpColIdx, from->numCols * sizeof(AttrNumber));
    5232         680 :     COPY_POINTER_FIELD(cmpOperators, from->numCols * sizeof(Oid));
    5233         680 :     COPY_POINTER_FIELD(cmpCollations, from->numCols * sizeof(Oid));
    5234         680 :     COPY_POINTER_FIELD(cmpNullsFirst, from->numCols * sizeof(bool));
    5235         680 :     COPY_SCALAR_FIELD(numGroups);
    5236             : 
    5237         680 :     return newnode;
    5238             : }
    5239             : 
    5240             : static LockRows *
    5241       19738 : _copyLockRows(const LockRows *from)
    5242             : {
    5243       19738 :     LockRows *newnode = makeNode(LockRows);
    5244             : 
    5245       19738 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    5246       19738 :     COPY_SCALAR_FIELD(plan.startup_cost);
    5247       19738 :     COPY_SCALAR_FIELD(plan.total_cost);
    5248       19738 :     COPY_SCALAR_FIELD(plan.plan_rows);
    5249       19738 :     COPY_SCALAR_FIELD(plan.plan_width);
    5250       19738 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    5251       19738 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    5252       19738 :     COPY_SCALAR_FIELD(plan.async_capable);
    5253       19738 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    5254       19738 :     COPY_NODE_FIELD(plan.targetlist);
    5255       19738 :     COPY_NODE_FIELD(plan.qual);
    5256       19738 :     COPY_NODE_FIELD(plan.lefttree);
    5257       19738 :     COPY_NODE_FIELD(plan.righttree);
    5258       19738 :     COPY_NODE_FIELD(plan.initPlan);
    5259       19738 :     COPY_BITMAPSET_FIELD(plan.extParam);
    5260       19738 :     COPY_BITMAPSET_FIELD(plan.allParam);
    5261       19738 :     COPY_NODE_FIELD(rowMarks);
    5262       19738 :     COPY_SCALAR_FIELD(epqParam);
    5263             : 
    5264       19738 :     return newnode;
    5265             : }
    5266             : 
    5267             : static Limit *
    5268        5456 : _copyLimit(const Limit *from)
    5269             : {
    5270        5456 :     Limit *newnode = makeNode(Limit);
    5271             : 
    5272        5456 :     COPY_SCALAR_FIELD(plan.disabled_nodes);
    5273        5456 :     COPY_SCALAR_FIELD(plan.startup_cost);
    5274        5456 :     COPY_SCALAR_FIELD(plan.total_cost);
    5275        5456 :     COPY_SCALAR_FIELD(plan.plan_rows);
    5276        5456 :     COPY_SCALAR_FIELD(plan.plan_width);
    5277        5456 :     COPY_SCALAR_FIELD(plan.parallel_aware);
    5278        5456 :     COPY_SCALAR_FIELD(plan.parallel_safe);
    5279        5456 :     COPY_SCALAR_FIELD(plan.async_capable);
    5280        5456 :     COPY_SCALAR_FIELD(plan.plan_node_id);
    5281        5456 :     COPY_NODE_FIELD(plan.targetlist);
    5282        5456 :     COPY_NODE_FIELD(plan.qual);
    5283        5456 :     COPY_NODE_FIELD(plan.lefttree);
    5284        5456 :     COPY_NODE_FIELD(plan.righttree);
    5285        5456 :     COPY_NODE_FIELD(plan.initPlan);
    5286        5456 :     COPY_BITMAPSET_FIELD(plan.extParam);
    5287        5456 :     COPY_BITMAPSET_FIELD(plan.allParam);
    5288        5456 :     COPY_NODE_FIELD(limitOffset);
    5289        5456 :     COPY_NODE_FIELD(limitCount);
    5290        5456 :     COPY_SCALAR_FIELD(limitOption);
    5291        5456 :     COPY_SCALAR_FIELD(uniqNumCols);
    5292        5456 :     COPY_POINTER_FIELD(uniqColIdx, from->uniqNumCols * sizeof(AttrNumber));
    5293        5456 :     COPY_POINTER_FIELD(uniqOperators, from->uniqNumCols * sizeof(Oid));
    5294        5456 :     COPY_POINTER_FIELD(uniqCollations, from->uniqNumCols * sizeof(Oid));
    5295             : 
    5296        5456 :     return newnode;
    5297             : }
    5298             : 
    5299             : static PlanRowMark *
    5300       54404 : _copyPlanRowMark(const PlanRowMark *from)
    5301             : {
    5302       54404 :     PlanRowMark *newnode = makeNode(PlanRowMark);
    5303             : 
    5304       54404 :     COPY_SCALAR_FIELD(rti);
    5305       54404 :     COPY_SCALAR_FIELD(prti);
    5306       54404 :     COPY_SCALAR_FIELD(rowmarkId);
    5307       54404 :     COPY_SCALAR_FIELD(markType);
    5308       54404 :     COPY_SCALAR_FIELD(allMarkTypes);
    5309       54404 :     COPY_SCALAR_FIELD(strength);
    5310       54404 :     COPY_SCALAR_FIELD(waitPolicy);
    5311       54404 :     COPY_SCALAR_FIELD(isParent);
    5312             : 
    5313       54404 :     return newnode;
    5314             : }
    5315             : 
    5316             : static PartitionPruneInfo *
    5317         762 : _copyPartitionPruneInfo(const PartitionPruneInfo *from)
    5318             : {
    5319         762 :     PartitionPruneInfo *newnode = makeNode(PartitionPruneInfo);
    5320             : 
    5321         762 :     COPY_BITMAPSET_FIELD(relids);
    5322         762 :     COPY_NODE_FIELD(prune_infos);
    5323         762 :     COPY_BITMAPSET_FIELD(other_subplans);
    5324             : 
    5325         762 :     return newnode;
    5326             : }
    5327             : 
    5328             : static PartitionedRelPruneInfo *
    5329        1422 : _copyPartitionedRelPruneInfo(const PartitionedRelPruneInfo *from)
    5330             : {
    5331        1422 :     PartitionedRelPruneInfo *newnode = makeNode(PartitionedRelPruneInfo);
    5332             : 
    5333        1422 :     COPY_SCALAR_FIELD(rtindex);
    5334        1422 :     COPY_BITMAPSET_FIELD(present_parts);
    5335        1422 :     COPY_SCALAR_FIELD(nparts);
    5336        1422 :     COPY_POINTER_FIELD(subplan_map, from->nparts * sizeof(int));
    5337        1422 :     COPY_POINTER_FIELD(subpart_map, from->nparts * sizeof(int));
    5338        1422 :     COPY_POINTER_FIELD(leafpart_rti_map, from->nparts * sizeof(int));
    5339        1422 :     COPY_POINTER_FIELD(relid_map, from->nparts * sizeof(Oid));
    5340        1422 :     COPY_NODE_FIELD(initial_pruning_steps);
    5341        1422 :     COPY_NODE_FIELD(exec_pruning_steps);
    5342        1422 :     COPY_BITMAPSET_FIELD(execparamids);
    5343             : 
    5344        1422 :     return newnode;
    5345             : }
    5346             : 
    5347             : static PartitionPruneStepOp *
    5348        1424 : _copyPartitionPruneStepOp(const PartitionPruneStepOp *from)
    5349             : {
    5350        1424 :     PartitionPruneStepOp *newnode = makeNode(PartitionPruneStepOp);
    5351             : 
    5352        1424 :     COPY_SCALAR_FIELD(step.step_id);
    5353        1424 :     COPY_SCALAR_FIELD(opstrategy);
    5354        1424 :     COPY_NODE_FIELD(exprs);
    5355        1424 :     COPY_NODE_FIELD(cmpfns);
    5356        1424 :     COPY_BITMAPSET_FIELD(nullkeys);
    5357             : 
    5358        1424 :     return newnode;
    5359             : }
    5360             : 
    5361             : static PartitionPruneStepCombine *
    5362         288 : _copyPartitionPruneStepCombine(const PartitionPruneStepCombine *from)
    5363             : {
    5364         288 :     PartitionPruneStepCombine *newnode = makeNode(PartitionPruneStepCombine);
    5365             : 
    5366         288 :     COPY_SCALAR_FIELD(step.step_id);
    5367         288 :     COPY_SCALAR_FIELD(combineOp);
    5368         288 :     COPY_NODE_FIELD(source_stepids);
    5369             : 
    5370         288 :     return newnode;
    5371             : }
    5372             : 
    5373             : static PlanInvalItem *
    5374       62372 : _copyPlanInvalItem(const PlanInvalItem *from)
    5375             : {
    5376       62372 :     PlanInvalItem *newnode = makeNode(PlanInvalItem);
    5377             : 
    5378       62372 :     COPY_SCALAR_FIELD(cacheId);
    5379       62372 :     COPY_SCALAR_FIELD(hashValue);
    5380             : 
    5381       62372 :     return newnode;
    5382             : }
    5383             : 
    5384             : static Integer *
    5385       41224 : _copyInteger(const Integer *from)
    5386             : {
    5387       41224 :     Integer *newnode = makeNode(Integer);
    5388             : 
    5389       41224 :     COPY_SCALAR_FIELD(ival);
    5390             : 
    5391       41224 :     return newnode;
    5392             : }
    5393             : 
    5394             : static Float *
    5395         278 : _copyFloat(const Float *from)
    5396             : {
    5397         278 :     Float *newnode = makeNode(Float);
    5398             : 
    5399         278 :     COPY_STRING_FIELD(fval);
    5400             : 
    5401         278 :     return newnode;
    5402             : }
    5403             : 
    5404             : static Boolean *
    5405       36050 : _copyBoolean(const Boolean *from)
    5406             : {
    5407       36050 :     Boolean *newnode = makeNode(Boolean);
    5408             : 
    5409       36050 :     COPY_SCALAR_FIELD(boolval);
    5410             : 
    5411       36050 :     return newnode;
    5412             : }
    5413             : 
    5414             : static String *
    5415    34684714 : _copyString(const String *from)
    5416             : {
    5417    34684714 :     String *newnode = makeNode(String);
    5418             : 
    5419    34684714 :     COPY_STRING_FIELD(sval);
    5420             : 
    5421    34684714 :     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