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

Generated by: LCOV version 2.0-1