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