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