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

Generated by: LCOV version 2.0-1