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