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 3394682 : _copyAlias(const Alias *from)
44 : {
45 3394682 : Alias *newnode = makeNode(Alias);
46 :
47 3394682 : COPY_STRING_FIELD(aliasname);
48 3394682 : COPY_NODE_FIELD(colnames);
49 :
50 3394682 : return newnode;
51 : }
52 :
53 : static RangeVar *
54 985930 : _copyRangeVar(const RangeVar *from)
55 : {
56 985930 : RangeVar *newnode = makeNode(RangeVar);
57 :
58 985930 : COPY_STRING_FIELD(catalogname);
59 985930 : COPY_STRING_FIELD(schemaname);
60 985930 : COPY_STRING_FIELD(relname);
61 985930 : COPY_SCALAR_FIELD(inh);
62 985930 : COPY_SCALAR_FIELD(relpersistence);
63 985930 : COPY_NODE_FIELD(alias);
64 985930 : COPY_LOCATION_FIELD(location);
65 :
66 985930 : 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 4284 : _copyIntoClause(const IntoClause *from)
97 : {
98 4284 : IntoClause *newnode = makeNode(IntoClause);
99 :
100 4284 : COPY_NODE_FIELD(rel);
101 4284 : COPY_NODE_FIELD(colNames);
102 4284 : COPY_STRING_FIELD(accessMethod);
103 4284 : COPY_NODE_FIELD(options);
104 4284 : COPY_SCALAR_FIELD(onCommit);
105 4284 : COPY_STRING_FIELD(tableSpaceName);
106 4284 : COPY_NODE_FIELD(viewQuery);
107 4284 : COPY_SCALAR_FIELD(skipData);
108 :
109 4284 : return newnode;
110 : }
111 :
112 : static Var *
113 18382436 : _copyVar(const Var *from)
114 : {
115 18382436 : Var *newnode = makeNode(Var);
116 :
117 18382436 : COPY_SCALAR_FIELD(varno);
118 18382436 : COPY_SCALAR_FIELD(varattno);
119 18382436 : COPY_SCALAR_FIELD(vartype);
120 18382436 : COPY_SCALAR_FIELD(vartypmod);
121 18382436 : COPY_SCALAR_FIELD(varcollid);
122 18382436 : COPY_BITMAPSET_FIELD(varnullingrels);
123 18382436 : COPY_SCALAR_FIELD(varlevelsup);
124 18382436 : COPY_SCALAR_FIELD(varreturningtype);
125 18382436 : COPY_SCALAR_FIELD(varnosyn);
126 18382436 : COPY_SCALAR_FIELD(varattnosyn);
127 18382436 : COPY_LOCATION_FIELD(location);
128 :
129 18382436 : return newnode;
130 : }
131 :
132 : static Param *
133 723268 : _copyParam(const Param *from)
134 : {
135 723268 : Param *newnode = makeNode(Param);
136 :
137 723268 : COPY_SCALAR_FIELD(paramkind);
138 723268 : COPY_SCALAR_FIELD(paramid);
139 723268 : COPY_SCALAR_FIELD(paramtype);
140 723268 : COPY_SCALAR_FIELD(paramtypmod);
141 723268 : COPY_SCALAR_FIELD(paramcollid);
142 723268 : COPY_LOCATION_FIELD(location);
143 :
144 723268 : return newnode;
145 : }
146 :
147 : static Aggref *
148 191808 : _copyAggref(const Aggref *from)
149 : {
150 191808 : Aggref *newnode = makeNode(Aggref);
151 :
152 191808 : COPY_SCALAR_FIELD(aggfnoid);
153 191808 : COPY_SCALAR_FIELD(aggtype);
154 191808 : COPY_SCALAR_FIELD(aggcollid);
155 191808 : COPY_SCALAR_FIELD(inputcollid);
156 191808 : COPY_SCALAR_FIELD(aggtranstype);
157 191808 : COPY_NODE_FIELD(aggargtypes);
158 191808 : COPY_NODE_FIELD(aggdirectargs);
159 191808 : COPY_NODE_FIELD(args);
160 191808 : COPY_NODE_FIELD(aggorder);
161 191808 : COPY_NODE_FIELD(aggdistinct);
162 191808 : COPY_NODE_FIELD(aggfilter);
163 191808 : COPY_SCALAR_FIELD(aggstar);
164 191808 : COPY_SCALAR_FIELD(aggvariadic);
165 191808 : COPY_SCALAR_FIELD(aggkind);
166 191808 : COPY_SCALAR_FIELD(aggpresorted);
167 191808 : COPY_SCALAR_FIELD(agglevelsup);
168 191808 : COPY_SCALAR_FIELD(aggsplit);
169 191808 : COPY_SCALAR_FIELD(aggno);
170 191808 : COPY_SCALAR_FIELD(aggtransno);
171 191808 : COPY_LOCATION_FIELD(location);
172 :
173 191808 : 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 56430 : _copySubscriptingRef(const SubscriptingRef *from)
237 : {
238 56430 : SubscriptingRef *newnode = makeNode(SubscriptingRef);
239 :
240 56430 : COPY_SCALAR_FIELD(refcontainertype);
241 56430 : COPY_SCALAR_FIELD(refelemtype);
242 56430 : COPY_SCALAR_FIELD(refrestype);
243 56430 : COPY_SCALAR_FIELD(reftypmod);
244 56430 : COPY_SCALAR_FIELD(refcollid);
245 56430 : COPY_NODE_FIELD(refupperindexpr);
246 56430 : COPY_NODE_FIELD(reflowerindexpr);
247 56430 : COPY_NODE_FIELD(refexpr);
248 56430 : COPY_NODE_FIELD(refassgnexpr);
249 :
250 56430 : return newnode;
251 : }
252 :
253 : static FuncExpr *
254 951900 : _copyFuncExpr(const FuncExpr *from)
255 : {
256 951900 : FuncExpr *newnode = makeNode(FuncExpr);
257 :
258 951900 : COPY_SCALAR_FIELD(funcid);
259 951900 : COPY_SCALAR_FIELD(funcresulttype);
260 951900 : COPY_SCALAR_FIELD(funcretset);
261 951900 : COPY_SCALAR_FIELD(funcvariadic);
262 951900 : COPY_SCALAR_FIELD(funcformat);
263 951900 : COPY_SCALAR_FIELD(funccollid);
264 951900 : COPY_SCALAR_FIELD(inputcollid);
265 951900 : COPY_NODE_FIELD(args);
266 951900 : COPY_LOCATION_FIELD(location);
267 :
268 951900 : return newnode;
269 : }
270 :
271 : static NamedArgExpr *
272 94564 : _copyNamedArgExpr(const NamedArgExpr *from)
273 : {
274 94564 : NamedArgExpr *newnode = makeNode(NamedArgExpr);
275 :
276 94564 : COPY_NODE_FIELD(arg);
277 94564 : COPY_STRING_FIELD(name);
278 94564 : COPY_SCALAR_FIELD(argnumber);
279 94564 : COPY_LOCATION_FIELD(location);
280 :
281 94564 : return newnode;
282 : }
283 :
284 : static OpExpr *
285 1936062 : _copyOpExpr(const OpExpr *from)
286 : {
287 1936062 : OpExpr *newnode = makeNode(OpExpr);
288 :
289 1936062 : COPY_SCALAR_FIELD(opno);
290 1936062 : COPY_SCALAR_FIELD(opfuncid);
291 1936062 : COPY_SCALAR_FIELD(opresulttype);
292 1936062 : COPY_SCALAR_FIELD(opretset);
293 1936062 : COPY_SCALAR_FIELD(opcollid);
294 1936062 : COPY_SCALAR_FIELD(inputcollid);
295 1936062 : COPY_NODE_FIELD(args);
296 1936062 : COPY_LOCATION_FIELD(location);
297 :
298 1936062 : return newnode;
299 : }
300 :
301 : static DistinctExpr *
302 2826 : _copyDistinctExpr(const DistinctExpr *from)
303 : {
304 2826 : DistinctExpr *newnode = makeNode(DistinctExpr);
305 :
306 2826 : COPY_SCALAR_FIELD(opno);
307 2826 : COPY_SCALAR_FIELD(opfuncid);
308 2826 : COPY_SCALAR_FIELD(opresulttype);
309 2826 : COPY_SCALAR_FIELD(opretset);
310 2826 : COPY_SCALAR_FIELD(opcollid);
311 2826 : COPY_SCALAR_FIELD(inputcollid);
312 2826 : COPY_NODE_FIELD(args);
313 2826 : COPY_LOCATION_FIELD(location);
314 :
315 2826 : 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 94074 : _copyScalarArrayOpExpr(const ScalarArrayOpExpr *from)
337 : {
338 94074 : ScalarArrayOpExpr *newnode = makeNode(ScalarArrayOpExpr);
339 :
340 94074 : COPY_SCALAR_FIELD(opno);
341 94074 : COPY_SCALAR_FIELD(opfuncid);
342 94074 : COPY_SCALAR_FIELD(hashfuncid);
343 94074 : COPY_SCALAR_FIELD(negfuncid);
344 94074 : COPY_SCALAR_FIELD(useOr);
345 94074 : COPY_SCALAR_FIELD(inputcollid);
346 94074 : COPY_NODE_FIELD(args);
347 94074 : COPY_LOCATION_FIELD(location);
348 :
349 94074 : return newnode;
350 : }
351 :
352 : static BoolExpr *
353 486908 : _copyBoolExpr(const BoolExpr *from)
354 : {
355 486908 : BoolExpr *newnode = makeNode(BoolExpr);
356 :
357 486908 : COPY_SCALAR_FIELD(boolop);
358 486908 : COPY_NODE_FIELD(args);
359 486908 : COPY_LOCATION_FIELD(location);
360 :
361 486908 : return newnode;
362 : }
363 :
364 : static SubLink *
365 121920 : _copySubLink(const SubLink *from)
366 : {
367 121920 : SubLink *newnode = makeNode(SubLink);
368 :
369 121920 : COPY_SCALAR_FIELD(subLinkType);
370 121920 : COPY_SCALAR_FIELD(subLinkId);
371 121920 : COPY_NODE_FIELD(testexpr);
372 121920 : COPY_NODE_FIELD(operName);
373 121920 : COPY_NODE_FIELD(subselect);
374 121920 : COPY_LOCATION_FIELD(location);
375 :
376 121920 : return newnode;
377 : }
378 :
379 : static SubPlan *
380 51058 : _copySubPlan(const SubPlan *from)
381 : {
382 51058 : SubPlan *newnode = makeNode(SubPlan);
383 :
384 51058 : COPY_SCALAR_FIELD(subLinkType);
385 51058 : COPY_NODE_FIELD(testexpr);
386 51058 : COPY_NODE_FIELD(paramIds);
387 51058 : COPY_SCALAR_FIELD(plan_id);
388 51058 : COPY_STRING_FIELD(plan_name);
389 51058 : COPY_SCALAR_FIELD(firstColType);
390 51058 : COPY_SCALAR_FIELD(firstColTypmod);
391 51058 : COPY_SCALAR_FIELD(firstColCollation);
392 51058 : COPY_SCALAR_FIELD(useHashTable);
393 51058 : COPY_SCALAR_FIELD(unknownEqFalse);
394 51058 : COPY_SCALAR_FIELD(parallel_safe);
395 51058 : COPY_NODE_FIELD(setParam);
396 51058 : COPY_NODE_FIELD(parParam);
397 51058 : COPY_NODE_FIELD(args);
398 51058 : COPY_SCALAR_FIELD(startup_cost);
399 51058 : COPY_SCALAR_FIELD(per_call_cost);
400 :
401 51058 : 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 16732 : _copyFieldSelect(const FieldSelect *from)
416 : {
417 16732 : FieldSelect *newnode = makeNode(FieldSelect);
418 :
419 16732 : COPY_NODE_FIELD(arg);
420 16732 : COPY_SCALAR_FIELD(fieldnum);
421 16732 : COPY_SCALAR_FIELD(resulttype);
422 16732 : COPY_SCALAR_FIELD(resulttypmod);
423 16732 : COPY_SCALAR_FIELD(resultcollid);
424 :
425 16732 : 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 371578 : _copyRelabelType(const RelabelType *from)
443 : {
444 371578 : RelabelType *newnode = makeNode(RelabelType);
445 :
446 371578 : COPY_NODE_FIELD(arg);
447 371578 : COPY_SCALAR_FIELD(resulttype);
448 371578 : COPY_SCALAR_FIELD(resulttypmod);
449 371578 : COPY_SCALAR_FIELD(resultcollid);
450 371578 : COPY_SCALAR_FIELD(relabelformat);
451 371578 : COPY_LOCATION_FIELD(location);
452 :
453 371578 : return newnode;
454 : }
455 :
456 : static CoerceViaIO *
457 72940 : _copyCoerceViaIO(const CoerceViaIO *from)
458 : {
459 72940 : CoerceViaIO *newnode = makeNode(CoerceViaIO);
460 :
461 72940 : COPY_NODE_FIELD(arg);
462 72940 : COPY_SCALAR_FIELD(resulttype);
463 72940 : COPY_SCALAR_FIELD(resultcollid);
464 72940 : COPY_SCALAR_FIELD(coerceformat);
465 72940 : COPY_LOCATION_FIELD(location);
466 :
467 72940 : return newnode;
468 : }
469 :
470 : static ArrayCoerceExpr *
471 14976 : _copyArrayCoerceExpr(const ArrayCoerceExpr *from)
472 : {
473 14976 : ArrayCoerceExpr *newnode = makeNode(ArrayCoerceExpr);
474 :
475 14976 : COPY_NODE_FIELD(arg);
476 14976 : COPY_NODE_FIELD(elemexpr);
477 14976 : COPY_SCALAR_FIELD(resulttype);
478 14976 : COPY_SCALAR_FIELD(resulttypmod);
479 14976 : COPY_SCALAR_FIELD(resultcollid);
480 14976 : COPY_SCALAR_FIELD(coerceformat);
481 14976 : COPY_LOCATION_FIELD(location);
482 :
483 14976 : return newnode;
484 : }
485 :
486 : static ConvertRowtypeExpr *
487 1004 : _copyConvertRowtypeExpr(const ConvertRowtypeExpr *from)
488 : {
489 1004 : ConvertRowtypeExpr *newnode = makeNode(ConvertRowtypeExpr);
490 :
491 1004 : COPY_NODE_FIELD(arg);
492 1004 : COPY_SCALAR_FIELD(resulttype);
493 1004 : COPY_SCALAR_FIELD(convertformat);
494 1004 : COPY_LOCATION_FIELD(location);
495 :
496 1004 : return newnode;
497 : }
498 :
499 : static CollateExpr *
500 9464 : _copyCollateExpr(const CollateExpr *from)
501 : {
502 9464 : CollateExpr *newnode = makeNode(CollateExpr);
503 :
504 9464 : COPY_NODE_FIELD(arg);
505 9464 : COPY_SCALAR_FIELD(collOid);
506 9464 : COPY_LOCATION_FIELD(location);
507 :
508 9464 : return newnode;
509 : }
510 :
511 : static CaseExpr *
512 158438 : _copyCaseExpr(const CaseExpr *from)
513 : {
514 158438 : CaseExpr *newnode = makeNode(CaseExpr);
515 :
516 158438 : COPY_SCALAR_FIELD(casetype);
517 158438 : COPY_SCALAR_FIELD(casecollid);
518 158438 : COPY_NODE_FIELD(arg);
519 158438 : COPY_NODE_FIELD(args);
520 158438 : COPY_NODE_FIELD(defresult);
521 158438 : COPY_LOCATION_FIELD(location);
522 :
523 158438 : return newnode;
524 : }
525 :
526 : static CaseWhen *
527 313620 : _copyCaseWhen(const CaseWhen *from)
528 : {
529 313620 : CaseWhen *newnode = makeNode(CaseWhen);
530 :
531 313620 : COPY_NODE_FIELD(expr);
532 313620 : COPY_NODE_FIELD(result);
533 313620 : COPY_LOCATION_FIELD(location);
534 :
535 313620 : return newnode;
536 : }
537 :
538 : static CaseTestExpr *
539 125010 : _copyCaseTestExpr(const CaseTestExpr *from)
540 : {
541 125010 : CaseTestExpr *newnode = makeNode(CaseTestExpr);
542 :
543 125010 : COPY_SCALAR_FIELD(typeId);
544 125010 : COPY_SCALAR_FIELD(typeMod);
545 125010 : COPY_SCALAR_FIELD(collation);
546 :
547 125010 : return newnode;
548 : }
549 :
550 : static ArrayExpr *
551 50556 : _copyArrayExpr(const ArrayExpr *from)
552 : {
553 50556 : ArrayExpr *newnode = makeNode(ArrayExpr);
554 :
555 50556 : COPY_SCALAR_FIELD(array_typeid);
556 50556 : COPY_SCALAR_FIELD(array_collid);
557 50556 : COPY_SCALAR_FIELD(element_typeid);
558 50556 : COPY_NODE_FIELD(elements);
559 50556 : COPY_SCALAR_FIELD(multidims);
560 50556 : COPY_LOCATION_FIELD(list_start);
561 50556 : COPY_LOCATION_FIELD(list_end);
562 50556 : COPY_LOCATION_FIELD(location);
563 :
564 50556 : return newnode;
565 : }
566 :
567 : static RowExpr *
568 17362 : _copyRowExpr(const RowExpr *from)
569 : {
570 17362 : RowExpr *newnode = makeNode(RowExpr);
571 :
572 17362 : COPY_NODE_FIELD(args);
573 17362 : COPY_SCALAR_FIELD(row_typeid);
574 17362 : COPY_SCALAR_FIELD(row_format);
575 17362 : COPY_NODE_FIELD(colnames);
576 17362 : COPY_LOCATION_FIELD(location);
577 :
578 17362 : 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 22266 : _copyCoalesceExpr(const CoalesceExpr *from)
598 : {
599 22266 : CoalesceExpr *newnode = makeNode(CoalesceExpr);
600 :
601 22266 : COPY_SCALAR_FIELD(coalescetype);
602 22266 : COPY_SCALAR_FIELD(coalescecollid);
603 22266 : COPY_NODE_FIELD(args);
604 22266 : COPY_LOCATION_FIELD(location);
605 :
606 22266 : 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 30482 : _copySQLValueFunction(const SQLValueFunction *from)
626 : {
627 30482 : SQLValueFunction *newnode = makeNode(SQLValueFunction);
628 :
629 30482 : COPY_SCALAR_FIELD(op);
630 30482 : COPY_SCALAR_FIELD(type);
631 30482 : COPY_SCALAR_FIELD(typmod);
632 30482 : COPY_LOCATION_FIELD(location);
633 :
634 30482 : return newnode;
635 : }
636 :
637 : static XmlExpr *
638 2314 : _copyXmlExpr(const XmlExpr *from)
639 : {
640 2314 : XmlExpr *newnode = makeNode(XmlExpr);
641 :
642 2314 : COPY_SCALAR_FIELD(op);
643 2314 : COPY_STRING_FIELD(name);
644 2314 : COPY_NODE_FIELD(named_args);
645 2314 : COPY_NODE_FIELD(arg_names);
646 2314 : COPY_NODE_FIELD(args);
647 2314 : COPY_SCALAR_FIELD(xmloption);
648 2314 : COPY_SCALAR_FIELD(indent);
649 2314 : COPY_SCALAR_FIELD(type);
650 2314 : COPY_SCALAR_FIELD(typmod);
651 2314 : COPY_LOCATION_FIELD(location);
652 :
653 2314 : 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 91268 : _copyNullTest(const NullTest *from)
799 : {
800 91268 : NullTest *newnode = makeNode(NullTest);
801 :
802 91268 : COPY_NODE_FIELD(arg);
803 91268 : COPY_SCALAR_FIELD(nulltesttype);
804 91268 : COPY_SCALAR_FIELD(argisrow);
805 91268 : COPY_LOCATION_FIELD(location);
806 :
807 91268 : return newnode;
808 : }
809 :
810 : static BooleanTest *
811 4554 : _copyBooleanTest(const BooleanTest *from)
812 : {
813 4554 : BooleanTest *newnode = makeNode(BooleanTest);
814 :
815 4554 : COPY_NODE_FIELD(arg);
816 4554 : COPY_SCALAR_FIELD(booltesttype);
817 4554 : COPY_LOCATION_FIELD(location);
818 :
819 4554 : return newnode;
820 : }
821 :
822 : static MergeAction *
823 8838 : _copyMergeAction(const MergeAction *from)
824 : {
825 8838 : MergeAction *newnode = makeNode(MergeAction);
826 :
827 8838 : COPY_SCALAR_FIELD(matchKind);
828 8838 : COPY_SCALAR_FIELD(commandType);
829 8838 : COPY_SCALAR_FIELD(override);
830 8838 : COPY_NODE_FIELD(qual);
831 8838 : COPY_NODE_FIELD(targetList);
832 8838 : COPY_NODE_FIELD(updateColnos);
833 :
834 8838 : return newnode;
835 : }
836 :
837 : static CoerceToDomain *
838 82032 : _copyCoerceToDomain(const CoerceToDomain *from)
839 : {
840 82032 : CoerceToDomain *newnode = makeNode(CoerceToDomain);
841 :
842 82032 : COPY_NODE_FIELD(arg);
843 82032 : COPY_SCALAR_FIELD(resulttype);
844 82032 : COPY_SCALAR_FIELD(resulttypmod);
845 82032 : COPY_SCALAR_FIELD(resultcollid);
846 82032 : COPY_SCALAR_FIELD(coercionformat);
847 82032 : COPY_LOCATION_FIELD(location);
848 :
849 82032 : return newnode;
850 : }
851 :
852 : static CoerceToDomainValue *
853 2446 : _copyCoerceToDomainValue(const CoerceToDomainValue *from)
854 : {
855 2446 : CoerceToDomainValue *newnode = makeNode(CoerceToDomainValue);
856 :
857 2446 : COPY_SCALAR_FIELD(typeId);
858 2446 : COPY_SCALAR_FIELD(typeMod);
859 2446 : COPY_SCALAR_FIELD(collation);
860 2446 : COPY_LOCATION_FIELD(location);
861 :
862 2446 : return newnode;
863 : }
864 :
865 : static SetToDefault *
866 1996 : _copySetToDefault(const SetToDefault *from)
867 : {
868 1996 : SetToDefault *newnode = makeNode(SetToDefault);
869 :
870 1996 : COPY_SCALAR_FIELD(typeId);
871 1996 : COPY_SCALAR_FIELD(typeMod);
872 1996 : COPY_SCALAR_FIELD(collation);
873 1996 : COPY_LOCATION_FIELD(location);
874 :
875 1996 : 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 1354 : _copyNextValueExpr(const NextValueExpr *from)
892 : {
893 1354 : NextValueExpr *newnode = makeNode(NextValueExpr);
894 :
895 1354 : COPY_SCALAR_FIELD(seqid);
896 1354 : COPY_SCALAR_FIELD(typeId);
897 :
898 1354 : return newnode;
899 : }
900 :
901 : static InferenceElem *
902 1914 : _copyInferenceElem(const InferenceElem *from)
903 : {
904 1914 : InferenceElem *newnode = makeNode(InferenceElem);
905 :
906 1914 : COPY_NODE_FIELD(expr);
907 1914 : COPY_SCALAR_FIELD(infercollid);
908 1914 : COPY_SCALAR_FIELD(inferopclass);
909 :
910 1914 : 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 8694794 : _copyTargetEntry(const TargetEntry *from)
927 : {
928 8694794 : TargetEntry *newnode = makeNode(TargetEntry);
929 :
930 8694794 : COPY_NODE_FIELD(expr);
931 8694794 : COPY_SCALAR_FIELD(resno);
932 8694794 : COPY_STRING_FIELD(resname);
933 8694794 : COPY_SCALAR_FIELD(ressortgroupref);
934 8694794 : COPY_SCALAR_FIELD(resorigtbl);
935 8694794 : COPY_SCALAR_FIELD(resorigcol);
936 8694794 : COPY_SCALAR_FIELD(resjunk);
937 :
938 8694794 : return newnode;
939 : }
940 :
941 : static RangeTblRef *
942 858826 : _copyRangeTblRef(const RangeTblRef *from)
943 : {
944 858826 : RangeTblRef *newnode = makeNode(RangeTblRef);
945 :
946 858826 : COPY_SCALAR_FIELD(rtindex);
947 :
948 858826 : return newnode;
949 : }
950 :
951 : static JoinExpr *
952 238144 : _copyJoinExpr(const JoinExpr *from)
953 : {
954 238144 : JoinExpr *newnode = makeNode(JoinExpr);
955 :
956 238144 : COPY_SCALAR_FIELD(jointype);
957 238144 : COPY_SCALAR_FIELD(isNatural);
958 238144 : COPY_NODE_FIELD(larg);
959 238144 : COPY_NODE_FIELD(rarg);
960 238144 : COPY_NODE_FIELD(usingClause);
961 238144 : COPY_NODE_FIELD(join_using_alias);
962 238144 : COPY_NODE_FIELD(quals);
963 238144 : COPY_NODE_FIELD(alias);
964 238144 : COPY_SCALAR_FIELD(rtindex);
965 :
966 238144 : return newnode;
967 : }
968 :
969 : static FromExpr *
970 891512 : _copyFromExpr(const FromExpr *from)
971 : {
972 891512 : FromExpr *newnode = makeNode(FromExpr);
973 :
974 891512 : COPY_NODE_FIELD(fromlist);
975 891512 : COPY_NODE_FIELD(quals);
976 :
977 891512 : return newnode;
978 : }
979 :
980 : static OnConflictExpr *
981 1880 : _copyOnConflictExpr(const OnConflictExpr *from)
982 : {
983 1880 : OnConflictExpr *newnode = makeNode(OnConflictExpr);
984 :
985 1880 : COPY_SCALAR_FIELD(action);
986 1880 : COPY_NODE_FIELD(arbiterElems);
987 1880 : COPY_NODE_FIELD(arbiterWhere);
988 1880 : COPY_SCALAR_FIELD(constraint);
989 1880 : COPY_NODE_FIELD(onConflictSet);
990 1880 : COPY_NODE_FIELD(onConflictWhere);
991 1880 : COPY_SCALAR_FIELD(exclRelIndex);
992 1880 : COPY_NODE_FIELD(exclRelTlist);
993 :
994 1880 : return newnode;
995 : }
996 :
997 : static Query *
998 1316144 : _copyQuery(const Query *from)
999 : {
1000 1316144 : Query *newnode = makeNode(Query);
1001 :
1002 1316144 : COPY_SCALAR_FIELD(commandType);
1003 1316144 : COPY_SCALAR_FIELD(querySource);
1004 1316144 : COPY_SCALAR_FIELD(queryId);
1005 1316144 : COPY_SCALAR_FIELD(canSetTag);
1006 1316144 : COPY_NODE_FIELD(utilityStmt);
1007 1316144 : COPY_SCALAR_FIELD(resultRelation);
1008 1316144 : COPY_SCALAR_FIELD(hasAggs);
1009 1316144 : COPY_SCALAR_FIELD(hasWindowFuncs);
1010 1316144 : COPY_SCALAR_FIELD(hasTargetSRFs);
1011 1316144 : COPY_SCALAR_FIELD(hasSubLinks);
1012 1316144 : COPY_SCALAR_FIELD(hasDistinctOn);
1013 1316144 : COPY_SCALAR_FIELD(hasRecursive);
1014 1316144 : COPY_SCALAR_FIELD(hasModifyingCTE);
1015 1316144 : COPY_SCALAR_FIELD(hasForUpdate);
1016 1316144 : COPY_SCALAR_FIELD(hasRowSecurity);
1017 1316144 : COPY_SCALAR_FIELD(hasGroupRTE);
1018 1316144 : COPY_SCALAR_FIELD(isReturn);
1019 1316144 : COPY_NODE_FIELD(cteList);
1020 1316144 : COPY_NODE_FIELD(rtable);
1021 1316144 : COPY_NODE_FIELD(rteperminfos);
1022 1316144 : COPY_NODE_FIELD(jointree);
1023 1316144 : COPY_NODE_FIELD(mergeActionList);
1024 1316144 : COPY_SCALAR_FIELD(mergeTargetRelation);
1025 1316144 : COPY_NODE_FIELD(mergeJoinCondition);
1026 1316144 : COPY_NODE_FIELD(targetList);
1027 1316144 : COPY_SCALAR_FIELD(override);
1028 1316144 : COPY_NODE_FIELD(onConflict);
1029 1316144 : COPY_STRING_FIELD(returningOldAlias);
1030 1316144 : COPY_STRING_FIELD(returningNewAlias);
1031 1316144 : COPY_NODE_FIELD(returningList);
1032 1316144 : COPY_NODE_FIELD(groupClause);
1033 1316144 : COPY_SCALAR_FIELD(groupDistinct);
1034 1316144 : COPY_NODE_FIELD(groupingSets);
1035 1316144 : COPY_NODE_FIELD(havingQual);
1036 1316144 : COPY_NODE_FIELD(windowClause);
1037 1316144 : COPY_NODE_FIELD(distinctClause);
1038 1316144 : COPY_NODE_FIELD(sortClause);
1039 1316144 : COPY_NODE_FIELD(limitOffset);
1040 1316144 : COPY_NODE_FIELD(limitCount);
1041 1316144 : COPY_SCALAR_FIELD(limitOption);
1042 1316144 : COPY_NODE_FIELD(rowMarks);
1043 1316144 : COPY_NODE_FIELD(setOperations);
1044 1316144 : COPY_NODE_FIELD(constraintDeps);
1045 1316144 : COPY_NODE_FIELD(withCheckOptions);
1046 1316144 : COPY_LOCATION_FIELD(stmt_location);
1047 1316144 : COPY_LOCATION_FIELD(stmt_len);
1048 :
1049 1316144 : return newnode;
1050 : }
1051 :
1052 : static TypeName *
1053 866314 : _copyTypeName(const TypeName *from)
1054 : {
1055 866314 : TypeName *newnode = makeNode(TypeName);
1056 :
1057 866314 : COPY_NODE_FIELD(names);
1058 866314 : COPY_SCALAR_FIELD(typeOid);
1059 866314 : COPY_SCALAR_FIELD(setof);
1060 866314 : COPY_SCALAR_FIELD(pct_type);
1061 866314 : COPY_NODE_FIELD(typmods);
1062 866314 : COPY_SCALAR_FIELD(typemod);
1063 866314 : COPY_NODE_FIELD(arrayBounds);
1064 866314 : COPY_LOCATION_FIELD(location);
1065 :
1066 866314 : return newnode;
1067 : }
1068 :
1069 : static ColumnRef *
1070 2267302 : _copyColumnRef(const ColumnRef *from)
1071 : {
1072 2267302 : ColumnRef *newnode = makeNode(ColumnRef);
1073 :
1074 2267302 : COPY_NODE_FIELD(fields);
1075 2267302 : COPY_LOCATION_FIELD(location);
1076 :
1077 2267302 : return newnode;
1078 : }
1079 :
1080 : static ParamRef *
1081 81622 : _copyParamRef(const ParamRef *from)
1082 : {
1083 81622 : ParamRef *newnode = makeNode(ParamRef);
1084 :
1085 81622 : COPY_SCALAR_FIELD(number);
1086 81622 : COPY_LOCATION_FIELD(location);
1087 :
1088 81622 : return newnode;
1089 : }
1090 :
1091 : static A_Expr *
1092 719010 : _copyA_Expr(const A_Expr *from)
1093 : {
1094 719010 : A_Expr *newnode = makeNode(A_Expr);
1095 :
1096 719010 : COPY_SCALAR_FIELD(kind);
1097 719010 : COPY_NODE_FIELD(name);
1098 719010 : COPY_NODE_FIELD(lexpr);
1099 719010 : COPY_NODE_FIELD(rexpr);
1100 719010 : COPY_LOCATION_FIELD(rexpr_list_start);
1101 719010 : COPY_LOCATION_FIELD(rexpr_list_end);
1102 719010 : COPY_LOCATION_FIELD(location);
1103 :
1104 719010 : return newnode;
1105 : }
1106 :
1107 : static TypeCast *
1108 398076 : _copyTypeCast(const TypeCast *from)
1109 : {
1110 398076 : TypeCast *newnode = makeNode(TypeCast);
1111 :
1112 398076 : COPY_NODE_FIELD(arg);
1113 398076 : COPY_NODE_FIELD(typeName);
1114 398076 : COPY_LOCATION_FIELD(location);
1115 :
1116 398076 : return newnode;
1117 : }
1118 :
1119 : static CollateClause *
1120 10760 : _copyCollateClause(const CollateClause *from)
1121 : {
1122 10760 : CollateClause *newnode = makeNode(CollateClause);
1123 :
1124 10760 : COPY_NODE_FIELD(arg);
1125 10760 : COPY_NODE_FIELD(collname);
1126 10760 : COPY_LOCATION_FIELD(location);
1127 :
1128 10760 : return newnode;
1129 : }
1130 :
1131 : static RoleSpec *
1132 82290 : _copyRoleSpec(const RoleSpec *from)
1133 : {
1134 82290 : RoleSpec *newnode = makeNode(RoleSpec);
1135 :
1136 82290 : COPY_SCALAR_FIELD(roletype);
1137 82290 : COPY_STRING_FIELD(rolename);
1138 82290 : COPY_LOCATION_FIELD(location);
1139 :
1140 82290 : return newnode;
1141 : }
1142 :
1143 : static FuncCall *
1144 443798 : _copyFuncCall(const FuncCall *from)
1145 : {
1146 443798 : FuncCall *newnode = makeNode(FuncCall);
1147 :
1148 443798 : COPY_NODE_FIELD(funcname);
1149 443798 : COPY_NODE_FIELD(args);
1150 443798 : COPY_NODE_FIELD(agg_order);
1151 443798 : COPY_NODE_FIELD(agg_filter);
1152 443798 : COPY_NODE_FIELD(over);
1153 443798 : COPY_SCALAR_FIELD(agg_within_group);
1154 443798 : COPY_SCALAR_FIELD(agg_star);
1155 443798 : COPY_SCALAR_FIELD(agg_distinct);
1156 443798 : COPY_SCALAR_FIELD(func_variadic);
1157 443798 : COPY_SCALAR_FIELD(funcformat);
1158 443798 : COPY_LOCATION_FIELD(location);
1159 :
1160 443798 : return newnode;
1161 : }
1162 :
1163 : static A_Star *
1164 71404 : _copyA_Star(const A_Star *from)
1165 : {
1166 71404 : A_Star *newnode = makeNode(A_Star);
1167 :
1168 :
1169 71404 : return newnode;
1170 : }
1171 :
1172 : static A_Indices *
1173 16626 : _copyA_Indices(const A_Indices *from)
1174 : {
1175 16626 : A_Indices *newnode = makeNode(A_Indices);
1176 :
1177 16626 : COPY_SCALAR_FIELD(is_slice);
1178 16626 : COPY_NODE_FIELD(lidx);
1179 16626 : COPY_NODE_FIELD(uidx);
1180 :
1181 16626 : return newnode;
1182 : }
1183 :
1184 : static A_Indirection *
1185 39206 : _copyA_Indirection(const A_Indirection *from)
1186 : {
1187 39206 : A_Indirection *newnode = makeNode(A_Indirection);
1188 :
1189 39206 : COPY_NODE_FIELD(arg);
1190 39206 : COPY_NODE_FIELD(indirection);
1191 :
1192 39206 : return newnode;
1193 : }
1194 :
1195 : static A_ArrayExpr *
1196 8490 : _copyA_ArrayExpr(const A_ArrayExpr *from)
1197 : {
1198 8490 : A_ArrayExpr *newnode = makeNode(A_ArrayExpr);
1199 :
1200 8490 : COPY_NODE_FIELD(elements);
1201 8490 : COPY_LOCATION_FIELD(list_start);
1202 8490 : COPY_LOCATION_FIELD(list_end);
1203 8490 : COPY_LOCATION_FIELD(location);
1204 :
1205 8490 : return newnode;
1206 : }
1207 :
1208 : static ResTarget *
1209 1445790 : _copyResTarget(const ResTarget *from)
1210 : {
1211 1445790 : ResTarget *newnode = makeNode(ResTarget);
1212 :
1213 1445790 : COPY_STRING_FIELD(name);
1214 1445790 : COPY_NODE_FIELD(indirection);
1215 1445790 : COPY_NODE_FIELD(val);
1216 1445790 : COPY_LOCATION_FIELD(location);
1217 :
1218 1445790 : 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 115750 : _copySortBy(const SortBy *from)
1235 : {
1236 115750 : SortBy *newnode = makeNode(SortBy);
1237 :
1238 115750 : COPY_NODE_FIELD(node);
1239 115750 : COPY_SCALAR_FIELD(sortby_dir);
1240 115750 : COPY_SCALAR_FIELD(sortby_nulls);
1241 115750 : COPY_NODE_FIELD(useOp);
1242 115750 : COPY_LOCATION_FIELD(location);
1243 :
1244 115750 : return newnode;
1245 : }
1246 :
1247 : static WindowDef *
1248 4318 : _copyWindowDef(const WindowDef *from)
1249 : {
1250 4318 : WindowDef *newnode = makeNode(WindowDef);
1251 :
1252 4318 : COPY_STRING_FIELD(name);
1253 4318 : COPY_STRING_FIELD(refname);
1254 4318 : COPY_NODE_FIELD(partitionClause);
1255 4318 : COPY_NODE_FIELD(orderClause);
1256 4318 : COPY_SCALAR_FIELD(frameOptions);
1257 4318 : COPY_NODE_FIELD(startOffset);
1258 4318 : COPY_NODE_FIELD(endOffset);
1259 4318 : COPY_LOCATION_FIELD(location);
1260 :
1261 4318 : return newnode;
1262 : }
1263 :
1264 : static RangeSubselect *
1265 19624 : _copyRangeSubselect(const RangeSubselect *from)
1266 : {
1267 19624 : RangeSubselect *newnode = makeNode(RangeSubselect);
1268 :
1269 19624 : COPY_SCALAR_FIELD(lateral);
1270 19624 : COPY_NODE_FIELD(subquery);
1271 19624 : COPY_NODE_FIELD(alias);
1272 :
1273 19624 : return newnode;
1274 : }
1275 :
1276 : static RangeFunction *
1277 54916 : _copyRangeFunction(const RangeFunction *from)
1278 : {
1279 54916 : RangeFunction *newnode = makeNode(RangeFunction);
1280 :
1281 54916 : COPY_SCALAR_FIELD(lateral);
1282 54916 : COPY_SCALAR_FIELD(ordinality);
1283 54916 : COPY_SCALAR_FIELD(is_rowsfrom);
1284 54916 : COPY_NODE_FIELD(functions);
1285 54916 : COPY_NODE_FIELD(alias);
1286 54916 : COPY_NODE_FIELD(coldeflist);
1287 :
1288 54916 : return newnode;
1289 : }
1290 :
1291 : static RangeTableFunc *
1292 256 : _copyRangeTableFunc(const RangeTableFunc *from)
1293 : {
1294 256 : RangeTableFunc *newnode = makeNode(RangeTableFunc);
1295 :
1296 256 : COPY_SCALAR_FIELD(lateral);
1297 256 : COPY_NODE_FIELD(docexpr);
1298 256 : COPY_NODE_FIELD(rowexpr);
1299 256 : COPY_NODE_FIELD(namespaces);
1300 256 : COPY_NODE_FIELD(columns);
1301 256 : COPY_NODE_FIELD(alias);
1302 256 : COPY_LOCATION_FIELD(location);
1303 :
1304 256 : return newnode;
1305 : }
1306 :
1307 : static RangeTableFuncCol *
1308 954 : _copyRangeTableFuncCol(const RangeTableFuncCol *from)
1309 : {
1310 954 : RangeTableFuncCol *newnode = makeNode(RangeTableFuncCol);
1311 :
1312 954 : COPY_STRING_FIELD(colname);
1313 954 : COPY_NODE_FIELD(typeName);
1314 954 : COPY_SCALAR_FIELD(for_ordinality);
1315 954 : COPY_SCALAR_FIELD(is_not_null);
1316 954 : COPY_NODE_FIELD(colexpr);
1317 954 : COPY_NODE_FIELD(coldefexpr);
1318 954 : COPY_LOCATION_FIELD(location);
1319 :
1320 954 : return newnode;
1321 : }
1322 :
1323 : static RangeTableSample *
1324 288 : _copyRangeTableSample(const RangeTableSample *from)
1325 : {
1326 288 : RangeTableSample *newnode = makeNode(RangeTableSample);
1327 :
1328 288 : COPY_NODE_FIELD(relation);
1329 288 : COPY_NODE_FIELD(method);
1330 288 : COPY_NODE_FIELD(args);
1331 288 : COPY_NODE_FIELD(repeatable);
1332 288 : COPY_LOCATION_FIELD(location);
1333 :
1334 288 : return newnode;
1335 : }
1336 :
1337 : static ColumnDef *
1338 161590 : _copyColumnDef(const ColumnDef *from)
1339 : {
1340 161590 : ColumnDef *newnode = makeNode(ColumnDef);
1341 :
1342 161590 : COPY_STRING_FIELD(colname);
1343 161590 : COPY_NODE_FIELD(typeName);
1344 161590 : COPY_STRING_FIELD(compression);
1345 161590 : COPY_SCALAR_FIELD(inhcount);
1346 161590 : COPY_SCALAR_FIELD(is_local);
1347 161590 : COPY_SCALAR_FIELD(is_not_null);
1348 161590 : COPY_SCALAR_FIELD(is_from_type);
1349 161590 : COPY_SCALAR_FIELD(storage);
1350 161590 : COPY_STRING_FIELD(storage_name);
1351 161590 : COPY_NODE_FIELD(raw_default);
1352 161590 : COPY_NODE_FIELD(cooked_default);
1353 161590 : COPY_SCALAR_FIELD(identity);
1354 161590 : COPY_NODE_FIELD(identitySequence);
1355 161590 : COPY_SCALAR_FIELD(generated);
1356 161590 : COPY_NODE_FIELD(collClause);
1357 161590 : COPY_SCALAR_FIELD(collOid);
1358 161590 : COPY_NODE_FIELD(constraints);
1359 161590 : COPY_NODE_FIELD(fdwoptions);
1360 161590 : COPY_LOCATION_FIELD(location);
1361 :
1362 161590 : 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 21350 : _copyIndexElem(const IndexElem *from)
1379 : {
1380 21350 : IndexElem *newnode = makeNode(IndexElem);
1381 :
1382 21350 : COPY_STRING_FIELD(name);
1383 21350 : COPY_NODE_FIELD(expr);
1384 21350 : COPY_STRING_FIELD(indexcolname);
1385 21350 : COPY_NODE_FIELD(collation);
1386 21350 : COPY_NODE_FIELD(opclass);
1387 21350 : COPY_NODE_FIELD(opclassopts);
1388 21350 : COPY_SCALAR_FIELD(ordering);
1389 21350 : COPY_SCALAR_FIELD(nulls_ordering);
1390 :
1391 21350 : return newnode;
1392 : }
1393 :
1394 : static DefElem *
1395 382474 : _copyDefElem(const DefElem *from)
1396 : {
1397 382474 : DefElem *newnode = makeNode(DefElem);
1398 :
1399 382474 : COPY_STRING_FIELD(defnamespace);
1400 382474 : COPY_STRING_FIELD(defname);
1401 382474 : COPY_NODE_FIELD(arg);
1402 382474 : COPY_SCALAR_FIELD(defaction);
1403 382474 : COPY_LOCATION_FIELD(location);
1404 :
1405 382474 : return newnode;
1406 : }
1407 :
1408 : static LockingClause *
1409 5390 : _copyLockingClause(const LockingClause *from)
1410 : {
1411 5390 : LockingClause *newnode = makeNode(LockingClause);
1412 :
1413 5390 : COPY_NODE_FIELD(lockedRels);
1414 5390 : COPY_SCALAR_FIELD(strength);
1415 5390 : COPY_SCALAR_FIELD(waitPolicy);
1416 :
1417 5390 : return newnode;
1418 : }
1419 :
1420 : static XmlSerialize *
1421 266 : _copyXmlSerialize(const XmlSerialize *from)
1422 : {
1423 266 : XmlSerialize *newnode = makeNode(XmlSerialize);
1424 :
1425 266 : COPY_SCALAR_FIELD(xmloption);
1426 266 : COPY_NODE_FIELD(expr);
1427 266 : COPY_NODE_FIELD(typeName);
1428 266 : COPY_SCALAR_FIELD(indent);
1429 266 : COPY_LOCATION_FIELD(location);
1430 :
1431 266 : return newnode;
1432 : }
1433 :
1434 : static PartitionElem *
1435 11658 : _copyPartitionElem(const PartitionElem *from)
1436 : {
1437 11658 : PartitionElem *newnode = makeNode(PartitionElem);
1438 :
1439 11658 : COPY_STRING_FIELD(name);
1440 11658 : COPY_NODE_FIELD(expr);
1441 11658 : COPY_NODE_FIELD(collation);
1442 11658 : COPY_NODE_FIELD(opclass);
1443 11658 : COPY_LOCATION_FIELD(location);
1444 :
1445 11658 : return newnode;
1446 : }
1447 :
1448 : static PartitionSpec *
1449 10406 : _copyPartitionSpec(const PartitionSpec *from)
1450 : {
1451 10406 : PartitionSpec *newnode = makeNode(PartitionSpec);
1452 :
1453 10406 : COPY_SCALAR_FIELD(strategy);
1454 10406 : COPY_NODE_FIELD(partParams);
1455 10406 : COPY_LOCATION_FIELD(location);
1456 :
1457 10406 : return newnode;
1458 : }
1459 :
1460 : static PartitionBoundSpec *
1461 35256 : _copyPartitionBoundSpec(const PartitionBoundSpec *from)
1462 : {
1463 35256 : PartitionBoundSpec *newnode = makeNode(PartitionBoundSpec);
1464 :
1465 35256 : COPY_SCALAR_FIELD(strategy);
1466 35256 : COPY_SCALAR_FIELD(is_default);
1467 35256 : COPY_SCALAR_FIELD(modulus);
1468 35256 : COPY_SCALAR_FIELD(remainder);
1469 35256 : COPY_NODE_FIELD(listdatums);
1470 35256 : COPY_NODE_FIELD(lowerdatums);
1471 35256 : COPY_NODE_FIELD(upperdatums);
1472 35256 : COPY_LOCATION_FIELD(location);
1473 :
1474 35256 : 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 11822 : _copyPartitionCmd(const PartitionCmd *from)
1491 : {
1492 11822 : PartitionCmd *newnode = makeNode(PartitionCmd);
1493 :
1494 11822 : COPY_NODE_FIELD(name);
1495 11822 : COPY_NODE_FIELD(bound);
1496 11822 : COPY_SCALAR_FIELD(concurrent);
1497 :
1498 11822 : return newnode;
1499 : }
1500 :
1501 : static RangeTblEntry *
1502 2112242 : _copyRangeTblEntry(const RangeTblEntry *from)
1503 : {
1504 2112242 : RangeTblEntry *newnode = makeNode(RangeTblEntry);
1505 :
1506 2112242 : COPY_NODE_FIELD(alias);
1507 2112242 : COPY_NODE_FIELD(eref);
1508 2112242 : COPY_SCALAR_FIELD(rtekind);
1509 2112242 : COPY_SCALAR_FIELD(relid);
1510 2112242 : COPY_SCALAR_FIELD(inh);
1511 2112242 : COPY_SCALAR_FIELD(relkind);
1512 2112242 : COPY_SCALAR_FIELD(rellockmode);
1513 2112242 : COPY_SCALAR_FIELD(perminfoindex);
1514 2112242 : COPY_NODE_FIELD(tablesample);
1515 2112242 : COPY_NODE_FIELD(subquery);
1516 2112242 : COPY_SCALAR_FIELD(security_barrier);
1517 2112242 : COPY_SCALAR_FIELD(jointype);
1518 2112242 : COPY_SCALAR_FIELD(joinmergedcols);
1519 2112242 : COPY_NODE_FIELD(joinaliasvars);
1520 2112242 : COPY_NODE_FIELD(joinleftcols);
1521 2112242 : COPY_NODE_FIELD(joinrightcols);
1522 2112242 : COPY_NODE_FIELD(join_using_alias);
1523 2112242 : COPY_NODE_FIELD(functions);
1524 2112242 : COPY_SCALAR_FIELD(funcordinality);
1525 2112242 : COPY_NODE_FIELD(tablefunc);
1526 2112242 : COPY_NODE_FIELD(values_lists);
1527 2112242 : COPY_STRING_FIELD(ctename);
1528 2112242 : COPY_SCALAR_FIELD(ctelevelsup);
1529 2112242 : COPY_SCALAR_FIELD(self_reference);
1530 2112242 : COPY_NODE_FIELD(coltypes);
1531 2112242 : COPY_NODE_FIELD(coltypmods);
1532 2112242 : COPY_NODE_FIELD(colcollations);
1533 2112242 : COPY_STRING_FIELD(enrname);
1534 2112242 : COPY_SCALAR_FIELD(enrtuples);
1535 2112242 : COPY_NODE_FIELD(groupexprs);
1536 2112242 : COPY_SCALAR_FIELD(lateral);
1537 2112242 : COPY_SCALAR_FIELD(inFromCl);
1538 2112242 : COPY_NODE_FIELD(securityQuals);
1539 :
1540 2112242 : return newnode;
1541 : }
1542 :
1543 : static RTEPermissionInfo *
1544 1253402 : _copyRTEPermissionInfo(const RTEPermissionInfo *from)
1545 : {
1546 1253402 : RTEPermissionInfo *newnode = makeNode(RTEPermissionInfo);
1547 :
1548 1253402 : COPY_SCALAR_FIELD(relid);
1549 1253402 : COPY_SCALAR_FIELD(inh);
1550 1253402 : COPY_SCALAR_FIELD(requiredPerms);
1551 1253402 : COPY_SCALAR_FIELD(checkAsUser);
1552 1253402 : COPY_BITMAPSET_FIELD(selectedCols);
1553 1253402 : COPY_BITMAPSET_FIELD(insertedCols);
1554 1253402 : COPY_BITMAPSET_FIELD(updatedCols);
1555 :
1556 1253402 : return newnode;
1557 : }
1558 :
1559 : static RangeTblFunction *
1560 140704 : _copyRangeTblFunction(const RangeTblFunction *from)
1561 : {
1562 140704 : RangeTblFunction *newnode = makeNode(RangeTblFunction);
1563 :
1564 140704 : COPY_NODE_FIELD(funcexpr);
1565 140704 : COPY_SCALAR_FIELD(funccolcount);
1566 140704 : COPY_NODE_FIELD(funccolnames);
1567 140704 : COPY_NODE_FIELD(funccoltypes);
1568 140704 : COPY_NODE_FIELD(funccoltypmods);
1569 140704 : COPY_NODE_FIELD(funccolcollations);
1570 140704 : COPY_BITMAPSET_FIELD(funcparams);
1571 :
1572 140704 : 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 255956 : _copySortGroupClause(const SortGroupClause *from)
1603 : {
1604 255956 : SortGroupClause *newnode = makeNode(SortGroupClause);
1605 :
1606 255956 : COPY_SCALAR_FIELD(tleSortGroupRef);
1607 255956 : COPY_SCALAR_FIELD(eqop);
1608 255956 : COPY_SCALAR_FIELD(sortop);
1609 255956 : COPY_SCALAR_FIELD(reverse_sort);
1610 255956 : COPY_SCALAR_FIELD(nulls_first);
1611 255956 : COPY_SCALAR_FIELD(hashable);
1612 :
1613 255956 : 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 15534 : _copyRowMarkClause(const RowMarkClause *from)
1653 : {
1654 15534 : RowMarkClause *newnode = makeNode(RowMarkClause);
1655 :
1656 15534 : COPY_SCALAR_FIELD(rti);
1657 15534 : COPY_SCALAR_FIELD(strength);
1658 15534 : COPY_SCALAR_FIELD(waitPolicy);
1659 15534 : COPY_SCALAR_FIELD(pushedDown);
1660 :
1661 15534 : return newnode;
1662 : }
1663 :
1664 : static WithClause *
1665 3510 : _copyWithClause(const WithClause *from)
1666 : {
1667 3510 : WithClause *newnode = makeNode(WithClause);
1668 :
1669 3510 : COPY_NODE_FIELD(ctes);
1670 3510 : COPY_SCALAR_FIELD(recursive);
1671 3510 : COPY_LOCATION_FIELD(location);
1672 :
1673 3510 : return newnode;
1674 : }
1675 :
1676 : static InferClause *
1677 1632 : _copyInferClause(const InferClause *from)
1678 : {
1679 1632 : InferClause *newnode = makeNode(InferClause);
1680 :
1681 1632 : COPY_NODE_FIELD(indexElems);
1682 1632 : COPY_NODE_FIELD(whereClause);
1683 1632 : COPY_STRING_FIELD(conname);
1684 1632 : COPY_LOCATION_FIELD(location);
1685 :
1686 1632 : return newnode;
1687 : }
1688 :
1689 : static OnConflictClause *
1690 1878 : _copyOnConflictClause(const OnConflictClause *from)
1691 : {
1692 1878 : OnConflictClause *newnode = makeNode(OnConflictClause);
1693 :
1694 1878 : COPY_SCALAR_FIELD(action);
1695 1878 : COPY_NODE_FIELD(infer);
1696 1878 : COPY_NODE_FIELD(targetList);
1697 1878 : COPY_NODE_FIELD(whereClause);
1698 1878 : COPY_LOCATION_FIELD(location);
1699 :
1700 1878 : 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 10442 : _copyCommonTableExpr(const CommonTableExpr *from)
1737 : {
1738 10442 : CommonTableExpr *newnode = makeNode(CommonTableExpr);
1739 :
1740 10442 : COPY_STRING_FIELD(ctename);
1741 10442 : COPY_NODE_FIELD(aliascolnames);
1742 10442 : COPY_SCALAR_FIELD(ctematerialized);
1743 10442 : COPY_NODE_FIELD(ctequery);
1744 10442 : COPY_NODE_FIELD(search_clause);
1745 10442 : COPY_NODE_FIELD(cycle_clause);
1746 10442 : COPY_LOCATION_FIELD(location);
1747 10442 : COPY_SCALAR_FIELD(cterecursive);
1748 10442 : COPY_SCALAR_FIELD(cterefcount);
1749 10442 : COPY_NODE_FIELD(ctecolnames);
1750 10442 : COPY_NODE_FIELD(ctecoltypes);
1751 10442 : COPY_NODE_FIELD(ctecoltypmods);
1752 10442 : COPY_NODE_FIELD(ctecolcollations);
1753 :
1754 10442 : 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 3712 : _copyReturningClause(const ReturningClause *from)
1786 : {
1787 3712 : ReturningClause *newnode = makeNode(ReturningClause);
1788 :
1789 3712 : COPY_NODE_FIELD(options);
1790 3712 : COPY_NODE_FIELD(exprs);
1791 :
1792 3712 : return newnode;
1793 : }
1794 :
1795 : static TriggerTransition *
1796 1228 : _copyTriggerTransition(const TriggerTransition *from)
1797 : {
1798 1228 : TriggerTransition *newnode = makeNode(TriggerTransition);
1799 :
1800 1228 : COPY_STRING_FIELD(name);
1801 1228 : COPY_SCALAR_FIELD(isNew);
1802 1228 : COPY_SCALAR_FIELD(isTable);
1803 :
1804 1228 : 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 816820 : _copyRawStmt(const RawStmt *from)
2029 : {
2030 816820 : RawStmt *newnode = makeNode(RawStmt);
2031 :
2032 816820 : COPY_NODE_FIELD(stmt);
2033 816820 : COPY_LOCATION_FIELD(stmt_location);
2034 816820 : COPY_LOCATION_FIELD(stmt_len);
2035 :
2036 816820 : return newnode;
2037 : }
2038 :
2039 : static InsertStmt *
2040 74370 : _copyInsertStmt(const InsertStmt *from)
2041 : {
2042 74370 : InsertStmt *newnode = makeNode(InsertStmt);
2043 :
2044 74370 : COPY_NODE_FIELD(relation);
2045 74370 : COPY_NODE_FIELD(cols);
2046 74370 : COPY_NODE_FIELD(selectStmt);
2047 74370 : COPY_NODE_FIELD(onConflictClause);
2048 74370 : COPY_NODE_FIELD(returningClause);
2049 74370 : COPY_NODE_FIELD(withClause);
2050 74370 : COPY_SCALAR_FIELD(override);
2051 :
2052 74370 : return newnode;
2053 : }
2054 :
2055 : static DeleteStmt *
2056 4762 : _copyDeleteStmt(const DeleteStmt *from)
2057 : {
2058 4762 : DeleteStmt *newnode = makeNode(DeleteStmt);
2059 :
2060 4762 : COPY_NODE_FIELD(relation);
2061 4762 : COPY_NODE_FIELD(usingClause);
2062 4762 : COPY_NODE_FIELD(whereClause);
2063 4762 : COPY_NODE_FIELD(returningClause);
2064 4762 : COPY_NODE_FIELD(withClause);
2065 :
2066 4762 : return newnode;
2067 : }
2068 :
2069 : static UpdateStmt *
2070 14474 : _copyUpdateStmt(const UpdateStmt *from)
2071 : {
2072 14474 : UpdateStmt *newnode = makeNode(UpdateStmt);
2073 :
2074 14474 : COPY_NODE_FIELD(relation);
2075 14474 : COPY_NODE_FIELD(targetList);
2076 14474 : COPY_NODE_FIELD(whereClause);
2077 14474 : COPY_NODE_FIELD(fromClause);
2078 14474 : COPY_NODE_FIELD(returningClause);
2079 14474 : COPY_NODE_FIELD(withClause);
2080 :
2081 14474 : 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 587134 : _copySelectStmt(const SelectStmt *from)
2101 : {
2102 587134 : SelectStmt *newnode = makeNode(SelectStmt);
2103 :
2104 587134 : COPY_NODE_FIELD(distinctClause);
2105 587134 : COPY_NODE_FIELD(intoClause);
2106 587134 : COPY_NODE_FIELD(targetList);
2107 587134 : COPY_NODE_FIELD(fromClause);
2108 587134 : COPY_NODE_FIELD(whereClause);
2109 587134 : COPY_NODE_FIELD(groupClause);
2110 587134 : COPY_SCALAR_FIELD(groupDistinct);
2111 587134 : COPY_NODE_FIELD(havingClause);
2112 587134 : COPY_NODE_FIELD(windowClause);
2113 587134 : COPY_NODE_FIELD(valuesLists);
2114 587134 : COPY_NODE_FIELD(sortClause);
2115 587134 : COPY_NODE_FIELD(limitOffset);
2116 587134 : COPY_NODE_FIELD(limitCount);
2117 587134 : COPY_SCALAR_FIELD(limitOption);
2118 587134 : COPY_NODE_FIELD(lockingClause);
2119 587134 : COPY_NODE_FIELD(withClause);
2120 587134 : COPY_SCALAR_FIELD(op);
2121 587134 : COPY_SCALAR_FIELD(all);
2122 587134 : COPY_NODE_FIELD(larg);
2123 587134 : COPY_NODE_FIELD(rarg);
2124 :
2125 587134 : return newnode;
2126 : }
2127 :
2128 : static SetOperationStmt *
2129 21560 : _copySetOperationStmt(const SetOperationStmt *from)
2130 : {
2131 21560 : SetOperationStmt *newnode = makeNode(SetOperationStmt);
2132 :
2133 21560 : COPY_SCALAR_FIELD(op);
2134 21560 : COPY_SCALAR_FIELD(all);
2135 21560 : COPY_NODE_FIELD(larg);
2136 21560 : COPY_NODE_FIELD(rarg);
2137 21560 : COPY_NODE_FIELD(colTypes);
2138 21560 : COPY_NODE_FIELD(colTypmods);
2139 21560 : COPY_NODE_FIELD(colCollations);
2140 21560 : COPY_NODE_FIELD(groupClauses);
2141 :
2142 21560 : return newnode;
2143 : }
2144 :
2145 : static ReturnStmt *
2146 9960 : _copyReturnStmt(const ReturnStmt *from)
2147 : {
2148 9960 : ReturnStmt *newnode = makeNode(ReturnStmt);
2149 :
2150 9960 : COPY_NODE_FIELD(returnval);
2151 :
2152 9960 : return newnode;
2153 : }
2154 :
2155 : static PLAssignStmt *
2156 5504 : _copyPLAssignStmt(const PLAssignStmt *from)
2157 : {
2158 5504 : PLAssignStmt *newnode = makeNode(PLAssignStmt);
2159 :
2160 5504 : COPY_STRING_FIELD(name);
2161 5504 : COPY_NODE_FIELD(indirection);
2162 5504 : COPY_SCALAR_FIELD(nnames);
2163 5504 : COPY_NODE_FIELD(val);
2164 5504 : COPY_LOCATION_FIELD(location);
2165 :
2166 5504 : return newnode;
2167 : }
2168 :
2169 : static CreateSchemaStmt *
2170 2210 : _copyCreateSchemaStmt(const CreateSchemaStmt *from)
2171 : {
2172 2210 : CreateSchemaStmt *newnode = makeNode(CreateSchemaStmt);
2173 :
2174 2210 : COPY_STRING_FIELD(schemaname);
2175 2210 : COPY_NODE_FIELD(authrole);
2176 2210 : COPY_NODE_FIELD(schemaElts);
2177 2210 : COPY_SCALAR_FIELD(if_not_exists);
2178 :
2179 2210 : return newnode;
2180 : }
2181 :
2182 : static AlterTableStmt *
2183 67408 : _copyAlterTableStmt(const AlterTableStmt *from)
2184 : {
2185 67408 : AlterTableStmt *newnode = makeNode(AlterTableStmt);
2186 :
2187 67408 : COPY_NODE_FIELD(relation);
2188 67408 : COPY_NODE_FIELD(cmds);
2189 67408 : COPY_SCALAR_FIELD(objtype);
2190 67408 : COPY_SCALAR_FIELD(missing_ok);
2191 :
2192 67408 : return newnode;
2193 : }
2194 :
2195 : static AlterTableCmd *
2196 110242 : _copyAlterTableCmd(const AlterTableCmd *from)
2197 : {
2198 110242 : AlterTableCmd *newnode = makeNode(AlterTableCmd);
2199 :
2200 110242 : COPY_SCALAR_FIELD(subtype);
2201 110242 : COPY_STRING_FIELD(name);
2202 110242 : COPY_SCALAR_FIELD(num);
2203 110242 : COPY_NODE_FIELD(newowner);
2204 110242 : COPY_NODE_FIELD(def);
2205 110242 : COPY_SCALAR_FIELD(behavior);
2206 110242 : COPY_SCALAR_FIELD(missing_ok);
2207 110242 : COPY_SCALAR_FIELD(recurse);
2208 :
2209 110242 : 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 1470 : _copyReplicaIdentityStmt(const ReplicaIdentityStmt *from)
2231 : {
2232 1470 : ReplicaIdentityStmt *newnode = makeNode(ReplicaIdentityStmt);
2233 :
2234 1470 : COPY_SCALAR_FIELD(identity_type);
2235 1470 : COPY_STRING_FIELD(name);
2236 :
2237 1470 : 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 588 : _copyAlterDomainStmt(const AlterDomainStmt *from)
2252 : {
2253 588 : AlterDomainStmt *newnode = makeNode(AlterDomainStmt);
2254 :
2255 588 : COPY_SCALAR_FIELD(subtype);
2256 588 : COPY_NODE_FIELD(typeName);
2257 588 : COPY_STRING_FIELD(name);
2258 588 : COPY_NODE_FIELD(def);
2259 588 : COPY_SCALAR_FIELD(behavior);
2260 588 : COPY_SCALAR_FIELD(missing_ok);
2261 :
2262 588 : return newnode;
2263 : }
2264 :
2265 : static GrantStmt *
2266 54980 : _copyGrantStmt(const GrantStmt *from)
2267 : {
2268 54980 : GrantStmt *newnode = makeNode(GrantStmt);
2269 :
2270 54980 : COPY_SCALAR_FIELD(is_grant);
2271 54980 : COPY_SCALAR_FIELD(targtype);
2272 54980 : COPY_SCALAR_FIELD(objtype);
2273 54980 : COPY_NODE_FIELD(objects);
2274 54980 : COPY_NODE_FIELD(privileges);
2275 54980 : COPY_NODE_FIELD(grantees);
2276 54980 : COPY_SCALAR_FIELD(grant_option);
2277 54980 : COPY_NODE_FIELD(grantor);
2278 54980 : COPY_SCALAR_FIELD(behavior);
2279 :
2280 54980 : return newnode;
2281 : }
2282 :
2283 : static ObjectWithArgs *
2284 41398 : _copyObjectWithArgs(const ObjectWithArgs *from)
2285 : {
2286 41398 : ObjectWithArgs *newnode = makeNode(ObjectWithArgs);
2287 :
2288 41398 : COPY_NODE_FIELD(objname);
2289 41398 : COPY_NODE_FIELD(objargs);
2290 41398 : COPY_NODE_FIELD(objfuncargs);
2291 41398 : COPY_SCALAR_FIELD(args_unspecified);
2292 :
2293 41398 : return newnode;
2294 : }
2295 :
2296 : static AccessPriv *
2297 52452 : _copyAccessPriv(const AccessPriv *from)
2298 : {
2299 52452 : AccessPriv *newnode = makeNode(AccessPriv);
2300 :
2301 52452 : COPY_STRING_FIELD(priv_name);
2302 52452 : COPY_NODE_FIELD(cols);
2303 :
2304 52452 : return newnode;
2305 : }
2306 :
2307 : static GrantRoleStmt *
2308 2010 : _copyGrantRoleStmt(const GrantRoleStmt *from)
2309 : {
2310 2010 : GrantRoleStmt *newnode = makeNode(GrantRoleStmt);
2311 :
2312 2010 : COPY_NODE_FIELD(granted_roles);
2313 2010 : COPY_NODE_FIELD(grantee_roles);
2314 2010 : COPY_SCALAR_FIELD(is_grant);
2315 2010 : COPY_NODE_FIELD(opt);
2316 2010 : COPY_NODE_FIELD(grantor);
2317 2010 : COPY_SCALAR_FIELD(behavior);
2318 :
2319 2010 : 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 33414 : _copyCopyStmt(const CopyStmt *from)
2335 : {
2336 33414 : CopyStmt *newnode = makeNode(CopyStmt);
2337 :
2338 33414 : COPY_NODE_FIELD(relation);
2339 33414 : COPY_NODE_FIELD(query);
2340 33414 : COPY_NODE_FIELD(attlist);
2341 33414 : COPY_SCALAR_FIELD(is_from);
2342 33414 : COPY_SCALAR_FIELD(is_program);
2343 33414 : COPY_STRING_FIELD(filename);
2344 33414 : COPY_NODE_FIELD(options);
2345 33414 : COPY_NODE_FIELD(whereClause);
2346 :
2347 33414 : return newnode;
2348 : }
2349 :
2350 : static VariableSetStmt *
2351 70286 : _copyVariableSetStmt(const VariableSetStmt *from)
2352 : {
2353 70286 : VariableSetStmt *newnode = makeNode(VariableSetStmt);
2354 :
2355 70286 : COPY_SCALAR_FIELD(kind);
2356 70286 : COPY_STRING_FIELD(name);
2357 70286 : COPY_NODE_FIELD(args);
2358 70286 : COPY_SCALAR_FIELD(jumble_args);
2359 70286 : COPY_SCALAR_FIELD(is_local);
2360 70286 : COPY_LOCATION_FIELD(location);
2361 :
2362 70286 : 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 78478 : _copyCreateStmt(const CreateStmt *from)
2377 : {
2378 78478 : CreateStmt *newnode = makeNode(CreateStmt);
2379 :
2380 78478 : COPY_NODE_FIELD(relation);
2381 78478 : COPY_NODE_FIELD(tableElts);
2382 78478 : COPY_NODE_FIELD(inhRelations);
2383 78478 : COPY_NODE_FIELD(partbound);
2384 78478 : COPY_NODE_FIELD(partspec);
2385 78478 : COPY_NODE_FIELD(ofTypename);
2386 78478 : COPY_NODE_FIELD(constraints);
2387 78478 : COPY_NODE_FIELD(nnconstraints);
2388 78478 : COPY_NODE_FIELD(options);
2389 78478 : COPY_SCALAR_FIELD(oncommit);
2390 78478 : COPY_STRING_FIELD(tablespacename);
2391 78478 : COPY_STRING_FIELD(accessMethod);
2392 78478 : COPY_SCALAR_FIELD(if_not_exists);
2393 :
2394 78478 : return newnode;
2395 : }
2396 :
2397 : static Constraint *
2398 104850 : _copyConstraint(const Constraint *from)
2399 : {
2400 104850 : Constraint *newnode = makeNode(Constraint);
2401 :
2402 104850 : COPY_SCALAR_FIELD(contype);
2403 104850 : COPY_STRING_FIELD(conname);
2404 104850 : COPY_SCALAR_FIELD(deferrable);
2405 104850 : COPY_SCALAR_FIELD(initdeferred);
2406 104850 : COPY_SCALAR_FIELD(is_enforced);
2407 104850 : COPY_SCALAR_FIELD(skip_validation);
2408 104850 : COPY_SCALAR_FIELD(initially_valid);
2409 104850 : COPY_SCALAR_FIELD(is_no_inherit);
2410 104850 : COPY_NODE_FIELD(raw_expr);
2411 104850 : COPY_STRING_FIELD(cooked_expr);
2412 104850 : COPY_SCALAR_FIELD(generated_when);
2413 104850 : COPY_SCALAR_FIELD(generated_kind);
2414 104850 : COPY_SCALAR_FIELD(nulls_not_distinct);
2415 104850 : COPY_NODE_FIELD(keys);
2416 104850 : COPY_SCALAR_FIELD(without_overlaps);
2417 104850 : COPY_NODE_FIELD(including);
2418 104850 : COPY_NODE_FIELD(exclusions);
2419 104850 : COPY_NODE_FIELD(options);
2420 104850 : COPY_STRING_FIELD(indexname);
2421 104850 : COPY_STRING_FIELD(indexspace);
2422 104850 : COPY_SCALAR_FIELD(reset_default_tblspc);
2423 104850 : COPY_STRING_FIELD(access_method);
2424 104850 : COPY_NODE_FIELD(where_clause);
2425 104850 : COPY_NODE_FIELD(pktable);
2426 104850 : COPY_NODE_FIELD(fk_attrs);
2427 104850 : COPY_NODE_FIELD(pk_attrs);
2428 104850 : COPY_SCALAR_FIELD(fk_with_period);
2429 104850 : COPY_SCALAR_FIELD(pk_with_period);
2430 104850 : COPY_SCALAR_FIELD(fk_matchtype);
2431 104850 : COPY_SCALAR_FIELD(fk_upd_action);
2432 104850 : COPY_SCALAR_FIELD(fk_del_action);
2433 104850 : COPY_NODE_FIELD(fk_del_set_cols);
2434 104850 : COPY_NODE_FIELD(old_conpfeqop);
2435 104850 : COPY_SCALAR_FIELD(old_pktable_oid);
2436 104850 : COPY_LOCATION_FIELD(location);
2437 :
2438 104850 : return newnode;
2439 : }
2440 :
2441 : static CreateTableSpaceStmt *
2442 232 : _copyCreateTableSpaceStmt(const CreateTableSpaceStmt *from)
2443 : {
2444 232 : CreateTableSpaceStmt *newnode = makeNode(CreateTableSpaceStmt);
2445 :
2446 232 : COPY_STRING_FIELD(tablespacename);
2447 232 : COPY_NODE_FIELD(owner);
2448 232 : COPY_STRING_FIELD(location);
2449 232 : COPY_NODE_FIELD(options);
2450 :
2451 232 : 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 1082 : _copyCreateExtensionStmt(const CreateExtensionStmt *from)
2493 : {
2494 1082 : CreateExtensionStmt *newnode = makeNode(CreateExtensionStmt);
2495 :
2496 1082 : COPY_STRING_FIELD(extname);
2497 1082 : COPY_SCALAR_FIELD(if_not_exists);
2498 1082 : COPY_NODE_FIELD(options);
2499 :
2500 1082 : return newnode;
2501 : }
2502 :
2503 : static AlterExtensionStmt *
2504 82 : _copyAlterExtensionStmt(const AlterExtensionStmt *from)
2505 : {
2506 82 : AlterExtensionStmt *newnode = makeNode(AlterExtensionStmt);
2507 :
2508 82 : COPY_STRING_FIELD(extname);
2509 82 : COPY_NODE_FIELD(options);
2510 :
2511 82 : return newnode;
2512 : }
2513 :
2514 : static AlterExtensionContentsStmt *
2515 502 : _copyAlterExtensionContentsStmt(const AlterExtensionContentsStmt *from)
2516 : {
2517 502 : AlterExtensionContentsStmt *newnode = makeNode(AlterExtensionContentsStmt);
2518 :
2519 502 : COPY_STRING_FIELD(extname);
2520 502 : COPY_SCALAR_FIELD(action);
2521 502 : COPY_SCALAR_FIELD(objtype);
2522 502 : COPY_NODE_FIELD(object);
2523 :
2524 502 : return newnode;
2525 : }
2526 :
2527 : static CreateFdwStmt *
2528 424 : _copyCreateFdwStmt(const CreateFdwStmt *from)
2529 : {
2530 424 : CreateFdwStmt *newnode = makeNode(CreateFdwStmt);
2531 :
2532 424 : COPY_STRING_FIELD(fdwname);
2533 424 : COPY_NODE_FIELD(func_options);
2534 424 : COPY_NODE_FIELD(options);
2535 :
2536 424 : 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 604 : _copyCreateForeignServerStmt(const CreateForeignServerStmt *from)
2553 : {
2554 604 : CreateForeignServerStmt *newnode = makeNode(CreateForeignServerStmt);
2555 :
2556 604 : COPY_STRING_FIELD(servername);
2557 604 : COPY_STRING_FIELD(servertype);
2558 604 : COPY_STRING_FIELD(version);
2559 604 : COPY_STRING_FIELD(fdwname);
2560 604 : COPY_SCALAR_FIELD(if_not_exists);
2561 604 : COPY_NODE_FIELD(options);
2562 :
2563 604 : return newnode;
2564 : }
2565 :
2566 : static AlterForeignServerStmt *
2567 456 : _copyAlterForeignServerStmt(const AlterForeignServerStmt *from)
2568 : {
2569 456 : AlterForeignServerStmt *newnode = makeNode(AlterForeignServerStmt);
2570 :
2571 456 : COPY_STRING_FIELD(servername);
2572 456 : COPY_STRING_FIELD(version);
2573 456 : COPY_NODE_FIELD(options);
2574 456 : COPY_SCALAR_FIELD(has_version);
2575 :
2576 456 : return newnode;
2577 : }
2578 :
2579 : static CreateForeignTableStmt *
2580 910 : _copyCreateForeignTableStmt(const CreateForeignTableStmt *from)
2581 : {
2582 910 : CreateForeignTableStmt *newnode = makeNode(CreateForeignTableStmt);
2583 :
2584 910 : COPY_NODE_FIELD(base.relation);
2585 910 : COPY_NODE_FIELD(base.tableElts);
2586 910 : COPY_NODE_FIELD(base.inhRelations);
2587 910 : COPY_NODE_FIELD(base.partbound);
2588 910 : COPY_NODE_FIELD(base.partspec);
2589 910 : COPY_NODE_FIELD(base.ofTypename);
2590 910 : COPY_NODE_FIELD(base.constraints);
2591 910 : COPY_NODE_FIELD(base.nnconstraints);
2592 910 : COPY_NODE_FIELD(base.options);
2593 910 : COPY_SCALAR_FIELD(base.oncommit);
2594 910 : COPY_STRING_FIELD(base.tablespacename);
2595 910 : COPY_STRING_FIELD(base.accessMethod);
2596 910 : COPY_SCALAR_FIELD(base.if_not_exists);
2597 910 : COPY_STRING_FIELD(servername);
2598 910 : COPY_NODE_FIELD(options);
2599 :
2600 910 : 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 1430 : _copyCreatePolicyStmt(const CreatePolicyStmt *from)
2657 : {
2658 1430 : CreatePolicyStmt *newnode = makeNode(CreatePolicyStmt);
2659 :
2660 1430 : COPY_STRING_FIELD(policy_name);
2661 1430 : COPY_NODE_FIELD(table);
2662 1430 : COPY_STRING_FIELD(cmd_name);
2663 1430 : COPY_SCALAR_FIELD(permissive);
2664 1430 : COPY_NODE_FIELD(roles);
2665 1430 : COPY_NODE_FIELD(qual);
2666 1430 : COPY_NODE_FIELD(with_check);
2667 :
2668 1430 : 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 128 : _copyCreateAmStmt(const CreateAmStmt *from)
2687 : {
2688 128 : CreateAmStmt *newnode = makeNode(CreateAmStmt);
2689 :
2690 128 : COPY_STRING_FIELD(amname);
2691 128 : COPY_NODE_FIELD(handler_name);
2692 128 : COPY_SCALAR_FIELD(amtype);
2693 :
2694 128 : return newnode;
2695 : }
2696 :
2697 : static CreateTrigStmt *
2698 7362 : _copyCreateTrigStmt(const CreateTrigStmt *from)
2699 : {
2700 7362 : CreateTrigStmt *newnode = makeNode(CreateTrigStmt);
2701 :
2702 7362 : COPY_SCALAR_FIELD(replace);
2703 7362 : COPY_SCALAR_FIELD(isconstraint);
2704 7362 : COPY_STRING_FIELD(trigname);
2705 7362 : COPY_NODE_FIELD(relation);
2706 7362 : COPY_NODE_FIELD(funcname);
2707 7362 : COPY_NODE_FIELD(args);
2708 7362 : COPY_SCALAR_FIELD(row);
2709 7362 : COPY_SCALAR_FIELD(timing);
2710 7362 : COPY_SCALAR_FIELD(events);
2711 7362 : COPY_NODE_FIELD(columns);
2712 7362 : COPY_NODE_FIELD(whenClause);
2713 7362 : COPY_NODE_FIELD(transitionRels);
2714 7362 : COPY_SCALAR_FIELD(deferrable);
2715 7362 : COPY_SCALAR_FIELD(initdeferred);
2716 7362 : COPY_NODE_FIELD(constrrel);
2717 :
2718 7362 : return newnode;
2719 : }
2720 :
2721 : static CreateEventTrigStmt *
2722 396 : _copyCreateEventTrigStmt(const CreateEventTrigStmt *from)
2723 : {
2724 396 : CreateEventTrigStmt *newnode = makeNode(CreateEventTrigStmt);
2725 :
2726 396 : COPY_STRING_FIELD(trigname);
2727 396 : COPY_STRING_FIELD(eventname);
2728 396 : COPY_NODE_FIELD(whenclause);
2729 396 : COPY_NODE_FIELD(funcname);
2730 :
2731 396 : 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 288 : _copyCreatePLangStmt(const CreatePLangStmt *from)
2747 : {
2748 288 : CreatePLangStmt *newnode = makeNode(CreatePLangStmt);
2749 :
2750 288 : COPY_SCALAR_FIELD(replace);
2751 288 : COPY_STRING_FIELD(plname);
2752 288 : COPY_NODE_FIELD(plhandler);
2753 288 : COPY_NODE_FIELD(plinline);
2754 288 : COPY_NODE_FIELD(plvalidator);
2755 288 : COPY_SCALAR_FIELD(pltrusted);
2756 :
2757 288 : return newnode;
2758 : }
2759 :
2760 : static CreateRoleStmt *
2761 3700 : _copyCreateRoleStmt(const CreateRoleStmt *from)
2762 : {
2763 3700 : CreateRoleStmt *newnode = makeNode(CreateRoleStmt);
2764 :
2765 3700 : COPY_SCALAR_FIELD(stmt_type);
2766 3700 : COPY_STRING_FIELD(role);
2767 3700 : COPY_NODE_FIELD(options);
2768 :
2769 3700 : 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 164 : _copyAlterRoleSetStmt(const AlterRoleSetStmt *from)
2786 : {
2787 164 : AlterRoleSetStmt *newnode = makeNode(AlterRoleSetStmt);
2788 :
2789 164 : COPY_NODE_FIELD(role);
2790 164 : COPY_STRING_FIELD(database);
2791 164 : COPY_NODE_FIELD(setstmt);
2792 :
2793 164 : return newnode;
2794 : }
2795 :
2796 : static DropRoleStmt *
2797 3444 : _copyDropRoleStmt(const DropRoleStmt *from)
2798 : {
2799 3444 : DropRoleStmt *newnode = makeNode(DropRoleStmt);
2800 :
2801 3444 : COPY_NODE_FIELD(roles);
2802 3444 : COPY_SCALAR_FIELD(missing_ok);
2803 :
2804 3444 : return newnode;
2805 : }
2806 :
2807 : static CreateSeqStmt *
2808 1558 : _copyCreateSeqStmt(const CreateSeqStmt *from)
2809 : {
2810 1558 : CreateSeqStmt *newnode = makeNode(CreateSeqStmt);
2811 :
2812 1558 : COPY_NODE_FIELD(sequence);
2813 1558 : COPY_NODE_FIELD(options);
2814 1558 : COPY_SCALAR_FIELD(ownerId);
2815 1558 : COPY_SCALAR_FIELD(for_identity);
2816 1558 : COPY_SCALAR_FIELD(if_not_exists);
2817 :
2818 1558 : return newnode;
2819 : }
2820 :
2821 : static AlterSeqStmt *
2822 552 : _copyAlterSeqStmt(const AlterSeqStmt *from)
2823 : {
2824 552 : AlterSeqStmt *newnode = makeNode(AlterSeqStmt);
2825 :
2826 552 : COPY_NODE_FIELD(sequence);
2827 552 : COPY_NODE_FIELD(options);
2828 552 : COPY_SCALAR_FIELD(for_identity);
2829 552 : COPY_SCALAR_FIELD(missing_ok);
2830 :
2831 552 : return newnode;
2832 : }
2833 :
2834 : static DefineStmt *
2835 19028 : _copyDefineStmt(const DefineStmt *from)
2836 : {
2837 19028 : DefineStmt *newnode = makeNode(DefineStmt);
2838 :
2839 19028 : COPY_SCALAR_FIELD(kind);
2840 19028 : COPY_SCALAR_FIELD(oldstyle);
2841 19028 : COPY_NODE_FIELD(defnames);
2842 19028 : COPY_NODE_FIELD(args);
2843 19028 : COPY_NODE_FIELD(definition);
2844 19028 : COPY_SCALAR_FIELD(if_not_exists);
2845 19028 : COPY_SCALAR_FIELD(replace);
2846 :
2847 19028 : return newnode;
2848 : }
2849 :
2850 : static CreateDomainStmt *
2851 3050 : _copyCreateDomainStmt(const CreateDomainStmt *from)
2852 : {
2853 3050 : CreateDomainStmt *newnode = makeNode(CreateDomainStmt);
2854 :
2855 3050 : COPY_NODE_FIELD(domainname);
2856 3050 : COPY_NODE_FIELD(typeName);
2857 3050 : COPY_NODE_FIELD(collClause);
2858 3050 : COPY_NODE_FIELD(constraints);
2859 :
2860 3050 : return newnode;
2861 : }
2862 :
2863 : static CreateOpClassStmt *
2864 796 : _copyCreateOpClassStmt(const CreateOpClassStmt *from)
2865 : {
2866 796 : CreateOpClassStmt *newnode = makeNode(CreateOpClassStmt);
2867 :
2868 796 : COPY_NODE_FIELD(opclassname);
2869 796 : COPY_NODE_FIELD(opfamilyname);
2870 796 : COPY_STRING_FIELD(amname);
2871 796 : COPY_NODE_FIELD(datatype);
2872 796 : COPY_NODE_FIELD(items);
2873 796 : COPY_SCALAR_FIELD(isDefault);
2874 :
2875 796 : return newnode;
2876 : }
2877 :
2878 : static CreateOpClassItem *
2879 8510 : _copyCreateOpClassItem(const CreateOpClassItem *from)
2880 : {
2881 8510 : CreateOpClassItem *newnode = makeNode(CreateOpClassItem);
2882 :
2883 8510 : COPY_SCALAR_FIELD(itemtype);
2884 8510 : COPY_NODE_FIELD(name);
2885 8510 : COPY_SCALAR_FIELD(number);
2886 8510 : COPY_NODE_FIELD(order_family);
2887 8510 : COPY_NODE_FIELD(class_args);
2888 8510 : COPY_NODE_FIELD(storedtype);
2889 :
2890 8510 : return newnode;
2891 : }
2892 :
2893 : static CreateOpFamilyStmt *
2894 332 : _copyCreateOpFamilyStmt(const CreateOpFamilyStmt *from)
2895 : {
2896 332 : CreateOpFamilyStmt *newnode = makeNode(CreateOpFamilyStmt);
2897 :
2898 332 : COPY_NODE_FIELD(opfamilyname);
2899 332 : COPY_STRING_FIELD(amname);
2900 :
2901 332 : return newnode;
2902 : }
2903 :
2904 : static AlterOpFamilyStmt *
2905 1198 : _copyAlterOpFamilyStmt(const AlterOpFamilyStmt *from)
2906 : {
2907 1198 : AlterOpFamilyStmt *newnode = makeNode(AlterOpFamilyStmt);
2908 :
2909 1198 : COPY_NODE_FIELD(opfamilyname);
2910 1198 : COPY_STRING_FIELD(amname);
2911 1198 : COPY_SCALAR_FIELD(isDrop);
2912 1198 : COPY_NODE_FIELD(items);
2913 :
2914 1198 : return newnode;
2915 : }
2916 :
2917 : static DropStmt *
2918 51328 : _copyDropStmt(const DropStmt *from)
2919 : {
2920 51328 : DropStmt *newnode = makeNode(DropStmt);
2921 :
2922 51328 : COPY_NODE_FIELD(objects);
2923 51328 : COPY_SCALAR_FIELD(removeType);
2924 51328 : COPY_SCALAR_FIELD(behavior);
2925 51328 : COPY_SCALAR_FIELD(missing_ok);
2926 51328 : COPY_SCALAR_FIELD(concurrent);
2927 :
2928 51328 : return newnode;
2929 : }
2930 :
2931 : static TruncateStmt *
2932 5924 : _copyTruncateStmt(const TruncateStmt *from)
2933 : {
2934 5924 : TruncateStmt *newnode = makeNode(TruncateStmt);
2935 :
2936 5924 : COPY_NODE_FIELD(relations);
2937 5924 : COPY_SCALAR_FIELD(restart_seqs);
2938 5924 : COPY_SCALAR_FIELD(behavior);
2939 :
2940 5924 : return newnode;
2941 : }
2942 :
2943 : static CommentStmt *
2944 14448 : _copyCommentStmt(const CommentStmt *from)
2945 : {
2946 14448 : CommentStmt *newnode = makeNode(CommentStmt);
2947 :
2948 14448 : COPY_SCALAR_FIELD(objtype);
2949 14448 : COPY_NODE_FIELD(object);
2950 14448 : COPY_STRING_FIELD(comment);
2951 :
2952 14448 : 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 16000 : _copyDeclareCursorStmt(const DeclareCursorStmt *from)
2970 : {
2971 16000 : DeclareCursorStmt *newnode = makeNode(DeclareCursorStmt);
2972 :
2973 16000 : COPY_STRING_FIELD(portalname);
2974 16000 : COPY_SCALAR_FIELD(options);
2975 16000 : COPY_NODE_FIELD(query);
2976 :
2977 16000 : return newnode;
2978 : }
2979 :
2980 : static ClosePortalStmt *
2981 4448 : _copyClosePortalStmt(const ClosePortalStmt *from)
2982 : {
2983 4448 : ClosePortalStmt *newnode = makeNode(ClosePortalStmt);
2984 :
2985 4448 : COPY_STRING_FIELD(portalname);
2986 :
2987 4448 : return newnode;
2988 : }
2989 :
2990 : static FetchStmt *
2991 15172 : _copyFetchStmt(const FetchStmt *from)
2992 : {
2993 15172 : FetchStmt *newnode = makeNode(FetchStmt);
2994 :
2995 15172 : COPY_SCALAR_FIELD(direction);
2996 15172 : COPY_SCALAR_FIELD(howMany);
2997 15172 : COPY_STRING_FIELD(portalname);
2998 15172 : COPY_SCALAR_FIELD(ismove);
2999 15172 : COPY_SCALAR_FIELD(direction_keyword);
3000 15172 : COPY_LOCATION_FIELD(location);
3001 :
3002 15172 : return newnode;
3003 : }
3004 :
3005 : static IndexStmt *
3006 14204 : _copyIndexStmt(const IndexStmt *from)
3007 : {
3008 14204 : IndexStmt *newnode = makeNode(IndexStmt);
3009 :
3010 14204 : COPY_STRING_FIELD(idxname);
3011 14204 : COPY_NODE_FIELD(relation);
3012 14204 : COPY_STRING_FIELD(accessMethod);
3013 14204 : COPY_STRING_FIELD(tableSpace);
3014 14204 : COPY_NODE_FIELD(indexParams);
3015 14204 : COPY_NODE_FIELD(indexIncludingParams);
3016 14204 : COPY_NODE_FIELD(options);
3017 14204 : COPY_NODE_FIELD(whereClause);
3018 14204 : COPY_NODE_FIELD(excludeOpNames);
3019 14204 : COPY_STRING_FIELD(idxcomment);
3020 14204 : COPY_SCALAR_FIELD(indexOid);
3021 14204 : COPY_SCALAR_FIELD(oldNumber);
3022 14204 : COPY_SCALAR_FIELD(oldCreateSubid);
3023 14204 : COPY_SCALAR_FIELD(oldFirstRelfilelocatorSubid);
3024 14204 : COPY_SCALAR_FIELD(unique);
3025 14204 : COPY_SCALAR_FIELD(nulls_not_distinct);
3026 14204 : COPY_SCALAR_FIELD(primary);
3027 14204 : COPY_SCALAR_FIELD(isconstraint);
3028 14204 : COPY_SCALAR_FIELD(iswithoutoverlaps);
3029 14204 : COPY_SCALAR_FIELD(deferrable);
3030 14204 : COPY_SCALAR_FIELD(initdeferred);
3031 14204 : COPY_SCALAR_FIELD(transformed);
3032 14204 : COPY_SCALAR_FIELD(concurrent);
3033 14204 : COPY_SCALAR_FIELD(if_not_exists);
3034 14204 : COPY_SCALAR_FIELD(reset_default_tblspc);
3035 :
3036 14204 : return newnode;
3037 : }
3038 :
3039 : static CreateStatsStmt *
3040 1356 : _copyCreateStatsStmt(const CreateStatsStmt *from)
3041 : {
3042 1356 : CreateStatsStmt *newnode = makeNode(CreateStatsStmt);
3043 :
3044 1356 : COPY_NODE_FIELD(defnames);
3045 1356 : COPY_NODE_FIELD(stat_types);
3046 1356 : COPY_NODE_FIELD(exprs);
3047 1356 : COPY_NODE_FIELD(relations);
3048 1356 : COPY_STRING_FIELD(stxcomment);
3049 1356 : COPY_SCALAR_FIELD(transformed);
3050 1356 : COPY_SCALAR_FIELD(if_not_exists);
3051 :
3052 1356 : return newnode;
3053 : }
3054 :
3055 : static StatsElem *
3056 3260 : _copyStatsElem(const StatsElem *from)
3057 : {
3058 3260 : StatsElem *newnode = makeNode(StatsElem);
3059 :
3060 3260 : COPY_STRING_FIELD(name);
3061 3260 : COPY_NODE_FIELD(expr);
3062 :
3063 3260 : 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 50268 : _copyCreateFunctionStmt(const CreateFunctionStmt *from)
3080 : {
3081 50268 : CreateFunctionStmt *newnode = makeNode(CreateFunctionStmt);
3082 :
3083 50268 : COPY_SCALAR_FIELD(is_procedure);
3084 50268 : COPY_SCALAR_FIELD(replace);
3085 50268 : COPY_NODE_FIELD(funcname);
3086 50268 : COPY_NODE_FIELD(parameters);
3087 50268 : COPY_NODE_FIELD(returnType);
3088 50268 : COPY_NODE_FIELD(options);
3089 50268 : COPY_NODE_FIELD(sql_body);
3090 :
3091 50268 : return newnode;
3092 : }
3093 :
3094 : static FunctionParameter *
3095 150062 : _copyFunctionParameter(const FunctionParameter *from)
3096 : {
3097 150062 : FunctionParameter *newnode = makeNode(FunctionParameter);
3098 :
3099 150062 : COPY_STRING_FIELD(name);
3100 150062 : COPY_NODE_FIELD(argType);
3101 150062 : COPY_SCALAR_FIELD(mode);
3102 150062 : COPY_NODE_FIELD(defexpr);
3103 150062 : COPY_LOCATION_FIELD(location);
3104 :
3105 150062 : return newnode;
3106 : }
3107 :
3108 : static AlterFunctionStmt *
3109 1350 : _copyAlterFunctionStmt(const AlterFunctionStmt *from)
3110 : {
3111 1350 : AlterFunctionStmt *newnode = makeNode(AlterFunctionStmt);
3112 :
3113 1350 : COPY_SCALAR_FIELD(objtype);
3114 1350 : COPY_NODE_FIELD(func);
3115 1350 : COPY_NODE_FIELD(actions);
3116 :
3117 1350 : return newnode;
3118 : }
3119 :
3120 : static DoStmt *
3121 2764 : _copyDoStmt(const DoStmt *from)
3122 : {
3123 2764 : DoStmt *newnode = makeNode(DoStmt);
3124 :
3125 2764 : COPY_NODE_FIELD(args);
3126 :
3127 2764 : return newnode;
3128 : }
3129 :
3130 : static CallStmt *
3131 1700 : _copyCallStmt(const CallStmt *from)
3132 : {
3133 1700 : CallStmt *newnode = makeNode(CallStmt);
3134 :
3135 1700 : COPY_NODE_FIELD(funccall);
3136 1700 : COPY_NODE_FIELD(funcexpr);
3137 1700 : COPY_NODE_FIELD(outargs);
3138 :
3139 1700 : return newnode;
3140 : }
3141 :
3142 : static RenameStmt *
3143 3082 : _copyRenameStmt(const RenameStmt *from)
3144 : {
3145 3082 : RenameStmt *newnode = makeNode(RenameStmt);
3146 :
3147 3082 : COPY_SCALAR_FIELD(renameType);
3148 3082 : COPY_SCALAR_FIELD(relationType);
3149 3082 : COPY_NODE_FIELD(relation);
3150 3082 : COPY_NODE_FIELD(object);
3151 3082 : COPY_STRING_FIELD(subname);
3152 3082 : COPY_STRING_FIELD(newname);
3153 3082 : COPY_SCALAR_FIELD(behavior);
3154 3082 : COPY_SCALAR_FIELD(missing_ok);
3155 :
3156 3082 : 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 5036 : _copyAlterOwnerStmt(const AlterOwnerStmt *from)
3189 : {
3190 5036 : AlterOwnerStmt *newnode = makeNode(AlterOwnerStmt);
3191 :
3192 5036 : COPY_SCALAR_FIELD(objectType);
3193 5036 : COPY_NODE_FIELD(relation);
3194 5036 : COPY_NODE_FIELD(object);
3195 5036 : COPY_NODE_FIELD(newowner);
3196 :
3197 5036 : 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 2356 : _copyRuleStmt(const RuleStmt *from)
3224 : {
3225 2356 : RuleStmt *newnode = makeNode(RuleStmt);
3226 :
3227 2356 : COPY_NODE_FIELD(relation);
3228 2356 : COPY_STRING_FIELD(rulename);
3229 2356 : COPY_NODE_FIELD(whereClause);
3230 2356 : COPY_SCALAR_FIELD(event);
3231 2356 : COPY_SCALAR_FIELD(instead);
3232 2356 : COPY_NODE_FIELD(actions);
3233 2356 : COPY_SCALAR_FIELD(replace);
3234 :
3235 2356 : return newnode;
3236 : }
3237 :
3238 : static NotifyStmt *
3239 296 : _copyNotifyStmt(const NotifyStmt *from)
3240 : {
3241 296 : NotifyStmt *newnode = makeNode(NotifyStmt);
3242 :
3243 296 : COPY_STRING_FIELD(conditionname);
3244 296 : COPY_STRING_FIELD(payload);
3245 :
3246 296 : 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 78340 : _copyTransactionStmt(const TransactionStmt *from)
3271 : {
3272 78340 : TransactionStmt *newnode = makeNode(TransactionStmt);
3273 :
3274 78340 : COPY_SCALAR_FIELD(kind);
3275 78340 : COPY_NODE_FIELD(options);
3276 78340 : COPY_STRING_FIELD(savepoint_name);
3277 78340 : COPY_STRING_FIELD(gid);
3278 78340 : COPY_SCALAR_FIELD(chain);
3279 78340 : COPY_LOCATION_FIELD(location);
3280 :
3281 78340 : return newnode;
3282 : }
3283 :
3284 : static CompositeTypeStmt *
3285 9080 : _copyCompositeTypeStmt(const CompositeTypeStmt *from)
3286 : {
3287 9080 : CompositeTypeStmt *newnode = makeNode(CompositeTypeStmt);
3288 :
3289 9080 : COPY_NODE_FIELD(typevar);
3290 9080 : COPY_NODE_FIELD(coldeflist);
3291 :
3292 9080 : return newnode;
3293 : }
3294 :
3295 : static CreateEnumStmt *
3296 704 : _copyCreateEnumStmt(const CreateEnumStmt *from)
3297 : {
3298 704 : CreateEnumStmt *newnode = makeNode(CreateEnumStmt);
3299 :
3300 704 : COPY_NODE_FIELD(typeName);
3301 704 : COPY_NODE_FIELD(vals);
3302 :
3303 704 : return newnode;
3304 : }
3305 :
3306 : static CreateRangeStmt *
3307 394 : _copyCreateRangeStmt(const CreateRangeStmt *from)
3308 : {
3309 394 : CreateRangeStmt *newnode = makeNode(CreateRangeStmt);
3310 :
3311 394 : COPY_NODE_FIELD(typeName);
3312 394 : COPY_NODE_FIELD(params);
3313 :
3314 394 : 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 34742 : _copyViewStmt(const ViewStmt *from)
3334 : {
3335 34742 : ViewStmt *newnode = makeNode(ViewStmt);
3336 :
3337 34742 : COPY_NODE_FIELD(view);
3338 34742 : COPY_NODE_FIELD(aliases);
3339 34742 : COPY_NODE_FIELD(query);
3340 34742 : COPY_SCALAR_FIELD(replace);
3341 34742 : COPY_NODE_FIELD(options);
3342 34742 : COPY_SCALAR_FIELD(withCheckOption);
3343 :
3344 34742 : return newnode;
3345 : }
3346 :
3347 : static LoadStmt *
3348 104 : _copyLoadStmt(const LoadStmt *from)
3349 : {
3350 104 : LoadStmt *newnode = makeNode(LoadStmt);
3351 :
3352 104 : COPY_STRING_FIELD(filename);
3353 :
3354 104 : return newnode;
3355 : }
3356 :
3357 : static CreatedbStmt *
3358 1580 : _copyCreatedbStmt(const CreatedbStmt *from)
3359 : {
3360 1580 : CreatedbStmt *newnode = makeNode(CreatedbStmt);
3361 :
3362 1580 : COPY_STRING_FIELD(dbname);
3363 1580 : COPY_NODE_FIELD(options);
3364 :
3365 1580 : 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 2420 : _copyAlterDatabaseSetStmt(const AlterDatabaseSetStmt *from)
3391 : {
3392 2420 : AlterDatabaseSetStmt *newnode = makeNode(AlterDatabaseSetStmt);
3393 :
3394 2420 : COPY_STRING_FIELD(dbname);
3395 2420 : COPY_NODE_FIELD(setstmt);
3396 :
3397 2420 : return newnode;
3398 : }
3399 :
3400 : static DropdbStmt *
3401 244 : _copyDropdbStmt(const DropdbStmt *from)
3402 : {
3403 244 : DropdbStmt *newnode = makeNode(DropdbStmt);
3404 :
3405 244 : COPY_STRING_FIELD(dbname);
3406 244 : COPY_SCALAR_FIELD(missing_ok);
3407 244 : COPY_NODE_FIELD(options);
3408 :
3409 244 : return newnode;
3410 : }
3411 :
3412 : static AlterSystemStmt *
3413 372 : _copyAlterSystemStmt(const AlterSystemStmt *from)
3414 : {
3415 372 : AlterSystemStmt *newnode = makeNode(AlterSystemStmt);
3416 :
3417 372 : COPY_NODE_FIELD(setstmt);
3418 :
3419 372 : return newnode;
3420 : }
3421 :
3422 : static ClusterStmt *
3423 464 : _copyClusterStmt(const ClusterStmt *from)
3424 : {
3425 464 : ClusterStmt *newnode = makeNode(ClusterStmt);
3426 :
3427 464 : COPY_NODE_FIELD(relation);
3428 464 : COPY_STRING_FIELD(indexname);
3429 464 : COPY_NODE_FIELD(params);
3430 :
3431 464 : return newnode;
3432 : }
3433 :
3434 : static VacuumStmt *
3435 27380 : _copyVacuumStmt(const VacuumStmt *from)
3436 : {
3437 27380 : VacuumStmt *newnode = makeNode(VacuumStmt);
3438 :
3439 27380 : COPY_NODE_FIELD(options);
3440 27380 : COPY_NODE_FIELD(rels);
3441 27380 : COPY_SCALAR_FIELD(is_vacuumcmd);
3442 :
3443 27380 : return newnode;
3444 : }
3445 :
3446 : static VacuumRelation *
3447 26916 : _copyVacuumRelation(const VacuumRelation *from)
3448 : {
3449 26916 : VacuumRelation *newnode = makeNode(VacuumRelation);
3450 :
3451 26916 : COPY_NODE_FIELD(relation);
3452 26916 : COPY_SCALAR_FIELD(oid);
3453 26916 : COPY_NODE_FIELD(va_cols);
3454 :
3455 26916 : return newnode;
3456 : }
3457 :
3458 : static ExplainStmt *
3459 80206 : _copyExplainStmt(const ExplainStmt *from)
3460 : {
3461 80206 : ExplainStmt *newnode = makeNode(ExplainStmt);
3462 :
3463 80206 : COPY_NODE_FIELD(query);
3464 80206 : COPY_NODE_FIELD(options);
3465 :
3466 80206 : return newnode;
3467 : }
3468 :
3469 : static CreateTableAsStmt *
3470 4152 : _copyCreateTableAsStmt(const CreateTableAsStmt *from)
3471 : {
3472 4152 : CreateTableAsStmt *newnode = makeNode(CreateTableAsStmt);
3473 :
3474 4152 : COPY_NODE_FIELD(query);
3475 4152 : COPY_NODE_FIELD(into);
3476 4152 : COPY_SCALAR_FIELD(objtype);
3477 4152 : COPY_SCALAR_FIELD(is_select_into);
3478 4152 : COPY_SCALAR_FIELD(if_not_exists);
3479 :
3480 4152 : return newnode;
3481 : }
3482 :
3483 : static RefreshMatViewStmt *
3484 590 : _copyRefreshMatViewStmt(const RefreshMatViewStmt *from)
3485 : {
3486 590 : RefreshMatViewStmt *newnode = makeNode(RefreshMatViewStmt);
3487 :
3488 590 : COPY_SCALAR_FIELD(concurrent);
3489 590 : COPY_SCALAR_FIELD(skipData);
3490 590 : COPY_NODE_FIELD(relation);
3491 :
3492 590 : 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 5116 : _copyLockStmt(const LockStmt *from)
3517 : {
3518 5116 : LockStmt *newnode = makeNode(LockStmt);
3519 :
3520 5116 : COPY_NODE_FIELD(relations);
3521 5116 : COPY_SCALAR_FIELD(mode);
3522 5116 : COPY_SCALAR_FIELD(nowait);
3523 :
3524 5116 : 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 2430 : _copyReindexStmt(const ReindexStmt *from)
3540 : {
3541 2430 : ReindexStmt *newnode = makeNode(ReindexStmt);
3542 :
3543 2430 : COPY_SCALAR_FIELD(kind);
3544 2430 : COPY_NODE_FIELD(relation);
3545 2430 : COPY_STRING_FIELD(name);
3546 2430 : COPY_NODE_FIELD(params);
3547 :
3548 2430 : 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 588 : _copyCreateCastStmt(const CreateCastStmt *from)
3567 : {
3568 588 : CreateCastStmt *newnode = makeNode(CreateCastStmt);
3569 :
3570 588 : COPY_NODE_FIELD(sourcetype);
3571 588 : COPY_NODE_FIELD(targettype);
3572 588 : COPY_NODE_FIELD(func);
3573 588 : COPY_SCALAR_FIELD(context);
3574 588 : COPY_SCALAR_FIELD(inout);
3575 :
3576 588 : return newnode;
3577 : }
3578 :
3579 : static CreateTransformStmt *
3580 106 : _copyCreateTransformStmt(const CreateTransformStmt *from)
3581 : {
3582 106 : CreateTransformStmt *newnode = makeNode(CreateTransformStmt);
3583 :
3584 106 : COPY_SCALAR_FIELD(replace);
3585 106 : COPY_NODE_FIELD(type_name);
3586 106 : COPY_STRING_FIELD(lang);
3587 106 : COPY_NODE_FIELD(fromsql);
3588 106 : COPY_NODE_FIELD(tosql);
3589 :
3590 106 : return newnode;
3591 : }
3592 :
3593 : static PrepareStmt *
3594 4288 : _copyPrepareStmt(const PrepareStmt *from)
3595 : {
3596 4288 : PrepareStmt *newnode = makeNode(PrepareStmt);
3597 :
3598 4288 : COPY_STRING_FIELD(name);
3599 4288 : COPY_NODE_FIELD(argtypes);
3600 4288 : COPY_NODE_FIELD(query);
3601 :
3602 4288 : return newnode;
3603 : }
3604 :
3605 : static ExecuteStmt *
3606 40312 : _copyExecuteStmt(const ExecuteStmt *from)
3607 : {
3608 40312 : ExecuteStmt *newnode = makeNode(ExecuteStmt);
3609 :
3610 40312 : COPY_STRING_FIELD(name);
3611 40312 : COPY_NODE_FIELD(params);
3612 :
3613 40312 : return newnode;
3614 : }
3615 :
3616 : static DeallocateStmt *
3617 8132 : _copyDeallocateStmt(const DeallocateStmt *from)
3618 : {
3619 8132 : DeallocateStmt *newnode = makeNode(DeallocateStmt);
3620 :
3621 8132 : COPY_STRING_FIELD(name);
3622 8132 : COPY_SCALAR_FIELD(isall);
3623 8132 : COPY_LOCATION_FIELD(location);
3624 :
3625 8132 : return newnode;
3626 : }
3627 :
3628 : static DropOwnedStmt *
3629 308 : _copyDropOwnedStmt(const DropOwnedStmt *from)
3630 : {
3631 308 : DropOwnedStmt *newnode = makeNode(DropOwnedStmt);
3632 :
3633 308 : COPY_NODE_FIELD(roles);
3634 308 : COPY_SCALAR_FIELD(behavior);
3635 :
3636 308 : 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 17838 : _copyAlterTSConfigurationStmt(const AlterTSConfigurationStmt *from)
3663 : {
3664 17838 : AlterTSConfigurationStmt *newnode = makeNode(AlterTSConfigurationStmt);
3665 :
3666 17838 : COPY_SCALAR_FIELD(kind);
3667 17838 : COPY_NODE_FIELD(cfgname);
3668 17838 : COPY_NODE_FIELD(tokentype);
3669 17838 : COPY_NODE_FIELD(dicts);
3670 17838 : COPY_SCALAR_FIELD(override);
3671 17838 : COPY_SCALAR_FIELD(replace);
3672 17838 : COPY_SCALAR_FIELD(missing_ok);
3673 :
3674 17838 : return newnode;
3675 : }
3676 :
3677 : static PublicationTable *
3678 2780 : _copyPublicationTable(const PublicationTable *from)
3679 : {
3680 2780 : PublicationTable *newnode = makeNode(PublicationTable);
3681 :
3682 2780 : COPY_NODE_FIELD(relation);
3683 2780 : COPY_NODE_FIELD(whereClause);
3684 2780 : COPY_NODE_FIELD(columns);
3685 :
3686 2780 : return newnode;
3687 : }
3688 :
3689 : static PublicationObjSpec *
3690 3492 : _copyPublicationObjSpec(const PublicationObjSpec *from)
3691 : {
3692 3492 : PublicationObjSpec *newnode = makeNode(PublicationObjSpec);
3693 :
3694 3492 : COPY_SCALAR_FIELD(pubobjtype);
3695 3492 : COPY_STRING_FIELD(name);
3696 3492 : COPY_NODE_FIELD(pubtable);
3697 3492 : COPY_LOCATION_FIELD(location);
3698 :
3699 3492 : return newnode;
3700 : }
3701 :
3702 : static CreatePublicationStmt *
3703 1632 : _copyCreatePublicationStmt(const CreatePublicationStmt *from)
3704 : {
3705 1632 : CreatePublicationStmt *newnode = makeNode(CreatePublicationStmt);
3706 :
3707 1632 : COPY_STRING_FIELD(pubname);
3708 1632 : COPY_NODE_FIELD(options);
3709 1632 : COPY_NODE_FIELD(pubobjects);
3710 1632 : COPY_SCALAR_FIELD(for_all_tables);
3711 :
3712 1632 : return newnode;
3713 : }
3714 :
3715 : static AlterPublicationStmt *
3716 2140 : _copyAlterPublicationStmt(const AlterPublicationStmt *from)
3717 : {
3718 2140 : AlterPublicationStmt *newnode = makeNode(AlterPublicationStmt);
3719 :
3720 2140 : COPY_STRING_FIELD(pubname);
3721 2140 : COPY_NODE_FIELD(options);
3722 2140 : COPY_NODE_FIELD(pubobjects);
3723 2140 : COPY_SCALAR_FIELD(for_all_tables);
3724 2140 : COPY_SCALAR_FIELD(action);
3725 :
3726 2140 : return newnode;
3727 : }
3728 :
3729 : static CreateSubscriptionStmt *
3730 932 : _copyCreateSubscriptionStmt(const CreateSubscriptionStmt *from)
3731 : {
3732 932 : CreateSubscriptionStmt *newnode = makeNode(CreateSubscriptionStmt);
3733 :
3734 932 : COPY_STRING_FIELD(subname);
3735 932 : COPY_STRING_FIELD(conninfo);
3736 932 : COPY_NODE_FIELD(publication);
3737 932 : COPY_NODE_FIELD(options);
3738 :
3739 932 : return newnode;
3740 : }
3741 :
3742 : static AlterSubscriptionStmt *
3743 1032 : _copyAlterSubscriptionStmt(const AlterSubscriptionStmt *from)
3744 : {
3745 1032 : AlterSubscriptionStmt *newnode = makeNode(AlterSubscriptionStmt);
3746 :
3747 1032 : COPY_SCALAR_FIELD(kind);
3748 1032 : COPY_STRING_FIELD(subname);
3749 1032 : COPY_STRING_FIELD(conninfo);
3750 1032 : COPY_NODE_FIELD(publication);
3751 1032 : COPY_NODE_FIELD(options);
3752 :
3753 1032 : return newnode;
3754 : }
3755 :
3756 : static DropSubscriptionStmt *
3757 476 : _copyDropSubscriptionStmt(const DropSubscriptionStmt *from)
3758 : {
3759 476 : DropSubscriptionStmt *newnode = makeNode(DropSubscriptionStmt);
3760 :
3761 476 : COPY_STRING_FIELD(subname);
3762 476 : COPY_SCALAR_FIELD(missing_ok);
3763 476 : COPY_SCALAR_FIELD(behavior);
3764 :
3765 476 : 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 14912 : _copyPlaceHolderVar(const PlaceHolderVar *from)
3839 : {
3840 14912 : PlaceHolderVar *newnode = makeNode(PlaceHolderVar);
3841 :
3842 14912 : COPY_NODE_FIELD(phexpr);
3843 14912 : COPY_BITMAPSET_FIELD(phrels);
3844 14912 : COPY_BITMAPSET_FIELD(phnullingrels);
3845 14912 : COPY_SCALAR_FIELD(phid);
3846 14912 : COPY_SCALAR_FIELD(phlevelsup);
3847 :
3848 14912 : 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 56852 : _copyAppendRelInfo(const AppendRelInfo *from)
3877 : {
3878 56852 : AppendRelInfo *newnode = makeNode(AppendRelInfo);
3879 :
3880 56852 : COPY_SCALAR_FIELD(parent_relid);
3881 56852 : COPY_SCALAR_FIELD(child_relid);
3882 56852 : COPY_SCALAR_FIELD(parent_reltype);
3883 56852 : COPY_SCALAR_FIELD(child_reltype);
3884 56852 : COPY_NODE_FIELD(translated_vars);
3885 56852 : COPY_SCALAR_FIELD(num_child_cols);
3886 56852 : COPY_POINTER_FIELD(parent_colnos, from->num_child_cols * sizeof(AttrNumber));
3887 56852 : COPY_SCALAR_FIELD(parent_reloid);
3888 :
3889 56852 : 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 577248 : _copyPlannedStmt(const PlannedStmt *from)
3909 : {
3910 577248 : PlannedStmt *newnode = makeNode(PlannedStmt);
3911 :
3912 577248 : COPY_SCALAR_FIELD(commandType);
3913 577248 : COPY_SCALAR_FIELD(queryId);
3914 577248 : COPY_SCALAR_FIELD(planId);
3915 577248 : COPY_SCALAR_FIELD(cached_plan_type);
3916 577248 : COPY_SCALAR_FIELD(hasReturning);
3917 577248 : COPY_SCALAR_FIELD(hasModifyingCTE);
3918 577248 : COPY_SCALAR_FIELD(canSetTag);
3919 577248 : COPY_SCALAR_FIELD(transientPlan);
3920 577248 : COPY_SCALAR_FIELD(dependsOnRole);
3921 577248 : COPY_SCALAR_FIELD(parallelModeNeeded);
3922 577248 : COPY_SCALAR_FIELD(jitFlags);
3923 577248 : COPY_NODE_FIELD(planTree);
3924 577248 : COPY_NODE_FIELD(partPruneInfos);
3925 577248 : COPY_NODE_FIELD(rtable);
3926 577248 : COPY_BITMAPSET_FIELD(unprunableRelids);
3927 577248 : COPY_NODE_FIELD(permInfos);
3928 577248 : COPY_NODE_FIELD(resultRelations);
3929 577248 : COPY_NODE_FIELD(appendRelations);
3930 577248 : COPY_NODE_FIELD(subplans);
3931 577248 : COPY_BITMAPSET_FIELD(rewindPlanIDs);
3932 577248 : COPY_NODE_FIELD(rowMarks);
3933 577248 : COPY_NODE_FIELD(relationOids);
3934 577248 : COPY_NODE_FIELD(invalItems);
3935 577248 : COPY_NODE_FIELD(paramExecTypes);
3936 577248 : COPY_NODE_FIELD(utilityStmt);
3937 577248 : COPY_LOCATION_FIELD(stmt_location);
3938 577248 : COPY_LOCATION_FIELD(stmt_len);
3939 :
3940 577248 : return newnode;
3941 : }
3942 :
3943 : static Result *
3944 251608 : _copyResult(const Result *from)
3945 : {
3946 251608 : Result *newnode = makeNode(Result);
3947 :
3948 251608 : COPY_SCALAR_FIELD(plan.disabled_nodes);
3949 251608 : COPY_SCALAR_FIELD(plan.startup_cost);
3950 251608 : COPY_SCALAR_FIELD(plan.total_cost);
3951 251608 : COPY_SCALAR_FIELD(plan.plan_rows);
3952 251608 : COPY_SCALAR_FIELD(plan.plan_width);
3953 251608 : COPY_SCALAR_FIELD(plan.parallel_aware);
3954 251608 : COPY_SCALAR_FIELD(plan.parallel_safe);
3955 251608 : COPY_SCALAR_FIELD(plan.async_capable);
3956 251608 : COPY_SCALAR_FIELD(plan.plan_node_id);
3957 251608 : COPY_NODE_FIELD(plan.targetlist);
3958 251608 : COPY_NODE_FIELD(plan.qual);
3959 251608 : COPY_NODE_FIELD(plan.lefttree);
3960 251608 : COPY_NODE_FIELD(plan.righttree);
3961 251608 : COPY_NODE_FIELD(plan.initPlan);
3962 251608 : COPY_BITMAPSET_FIELD(plan.extParam);
3963 251608 : COPY_BITMAPSET_FIELD(plan.allParam);
3964 251608 : COPY_NODE_FIELD(resconstantqual);
3965 :
3966 251608 : return newnode;
3967 : }
3968 :
3969 : static ProjectSet *
3970 12468 : _copyProjectSet(const ProjectSet *from)
3971 : {
3972 12468 : ProjectSet *newnode = makeNode(ProjectSet);
3973 :
3974 12468 : COPY_SCALAR_FIELD(plan.disabled_nodes);
3975 12468 : COPY_SCALAR_FIELD(plan.startup_cost);
3976 12468 : COPY_SCALAR_FIELD(plan.total_cost);
3977 12468 : COPY_SCALAR_FIELD(plan.plan_rows);
3978 12468 : COPY_SCALAR_FIELD(plan.plan_width);
3979 12468 : COPY_SCALAR_FIELD(plan.parallel_aware);
3980 12468 : COPY_SCALAR_FIELD(plan.parallel_safe);
3981 12468 : COPY_SCALAR_FIELD(plan.async_capable);
3982 12468 : COPY_SCALAR_FIELD(plan.plan_node_id);
3983 12468 : COPY_NODE_FIELD(plan.targetlist);
3984 12468 : COPY_NODE_FIELD(plan.qual);
3985 12468 : COPY_NODE_FIELD(plan.lefttree);
3986 12468 : COPY_NODE_FIELD(plan.righttree);
3987 12468 : COPY_NODE_FIELD(plan.initPlan);
3988 12468 : COPY_BITMAPSET_FIELD(plan.extParam);
3989 12468 : COPY_BITMAPSET_FIELD(plan.allParam);
3990 :
3991 12468 : return newnode;
3992 : }
3993 :
3994 : static ModifyTable *
3995 95512 : _copyModifyTable(const ModifyTable *from)
3996 : {
3997 95512 : ModifyTable *newnode = makeNode(ModifyTable);
3998 :
3999 95512 : COPY_SCALAR_FIELD(plan.disabled_nodes);
4000 95512 : COPY_SCALAR_FIELD(plan.startup_cost);
4001 95512 : COPY_SCALAR_FIELD(plan.total_cost);
4002 95512 : COPY_SCALAR_FIELD(plan.plan_rows);
4003 95512 : COPY_SCALAR_FIELD(plan.plan_width);
4004 95512 : COPY_SCALAR_FIELD(plan.parallel_aware);
4005 95512 : COPY_SCALAR_FIELD(plan.parallel_safe);
4006 95512 : COPY_SCALAR_FIELD(plan.async_capable);
4007 95512 : COPY_SCALAR_FIELD(plan.plan_node_id);
4008 95512 : COPY_NODE_FIELD(plan.targetlist);
4009 95512 : COPY_NODE_FIELD(plan.qual);
4010 95512 : COPY_NODE_FIELD(plan.lefttree);
4011 95512 : COPY_NODE_FIELD(plan.righttree);
4012 95512 : COPY_NODE_FIELD(plan.initPlan);
4013 95512 : COPY_BITMAPSET_FIELD(plan.extParam);
4014 95512 : COPY_BITMAPSET_FIELD(plan.allParam);
4015 95512 : COPY_SCALAR_FIELD(operation);
4016 95512 : COPY_SCALAR_FIELD(canSetTag);
4017 95512 : COPY_SCALAR_FIELD(nominalRelation);
4018 95512 : COPY_SCALAR_FIELD(rootRelation);
4019 95512 : COPY_SCALAR_FIELD(partColsUpdated);
4020 95512 : COPY_NODE_FIELD(resultRelations);
4021 95512 : COPY_NODE_FIELD(updateColnosLists);
4022 95512 : COPY_NODE_FIELD(withCheckOptionLists);
4023 95512 : COPY_STRING_FIELD(returningOldAlias);
4024 95512 : COPY_STRING_FIELD(returningNewAlias);
4025 95512 : COPY_NODE_FIELD(returningLists);
4026 95512 : COPY_NODE_FIELD(fdwPrivLists);
4027 95512 : COPY_BITMAPSET_FIELD(fdwDirectModifyPlans);
4028 95512 : COPY_NODE_FIELD(rowMarks);
4029 95512 : COPY_SCALAR_FIELD(epqParam);
4030 95512 : COPY_SCALAR_FIELD(onConflictAction);
4031 95512 : COPY_NODE_FIELD(arbiterIndexes);
4032 95512 : COPY_NODE_FIELD(onConflictSet);
4033 95512 : COPY_NODE_FIELD(onConflictCols);
4034 95512 : COPY_NODE_FIELD(onConflictWhere);
4035 95512 : COPY_SCALAR_FIELD(exclRelRTI);
4036 95512 : COPY_NODE_FIELD(exclRelTlist);
4037 95512 : COPY_NODE_FIELD(mergeActionLists);
4038 95512 : COPY_NODE_FIELD(mergeJoinConditions);
4039 :
4040 95512 : return newnode;
4041 : }
4042 :
4043 : static Append *
4044 17746 : _copyAppend(const Append *from)
4045 : {
4046 17746 : Append *newnode = makeNode(Append);
4047 :
4048 17746 : COPY_SCALAR_FIELD(plan.disabled_nodes);
4049 17746 : COPY_SCALAR_FIELD(plan.startup_cost);
4050 17746 : COPY_SCALAR_FIELD(plan.total_cost);
4051 17746 : COPY_SCALAR_FIELD(plan.plan_rows);
4052 17746 : COPY_SCALAR_FIELD(plan.plan_width);
4053 17746 : COPY_SCALAR_FIELD(plan.parallel_aware);
4054 17746 : COPY_SCALAR_FIELD(plan.parallel_safe);
4055 17746 : COPY_SCALAR_FIELD(plan.async_capable);
4056 17746 : COPY_SCALAR_FIELD(plan.plan_node_id);
4057 17746 : COPY_NODE_FIELD(plan.targetlist);
4058 17746 : COPY_NODE_FIELD(plan.qual);
4059 17746 : COPY_NODE_FIELD(plan.lefttree);
4060 17746 : COPY_NODE_FIELD(plan.righttree);
4061 17746 : COPY_NODE_FIELD(plan.initPlan);
4062 17746 : COPY_BITMAPSET_FIELD(plan.extParam);
4063 17746 : COPY_BITMAPSET_FIELD(plan.allParam);
4064 17746 : COPY_BITMAPSET_FIELD(apprelids);
4065 17746 : COPY_NODE_FIELD(appendplans);
4066 17746 : COPY_SCALAR_FIELD(nasyncplans);
4067 17746 : COPY_SCALAR_FIELD(first_partial_plan);
4068 17746 : COPY_SCALAR_FIELD(part_prune_index);
4069 :
4070 17746 : return newnode;
4071 : }
4072 :
4073 : static MergeAppend *
4074 568 : _copyMergeAppend(const MergeAppend *from)
4075 : {
4076 568 : MergeAppend *newnode = makeNode(MergeAppend);
4077 :
4078 568 : COPY_SCALAR_FIELD(plan.disabled_nodes);
4079 568 : COPY_SCALAR_FIELD(plan.startup_cost);
4080 568 : COPY_SCALAR_FIELD(plan.total_cost);
4081 568 : COPY_SCALAR_FIELD(plan.plan_rows);
4082 568 : COPY_SCALAR_FIELD(plan.plan_width);
4083 568 : COPY_SCALAR_FIELD(plan.parallel_aware);
4084 568 : COPY_SCALAR_FIELD(plan.parallel_safe);
4085 568 : COPY_SCALAR_FIELD(plan.async_capable);
4086 568 : COPY_SCALAR_FIELD(plan.plan_node_id);
4087 568 : COPY_NODE_FIELD(plan.targetlist);
4088 568 : COPY_NODE_FIELD(plan.qual);
4089 568 : COPY_NODE_FIELD(plan.lefttree);
4090 568 : COPY_NODE_FIELD(plan.righttree);
4091 568 : COPY_NODE_FIELD(plan.initPlan);
4092 568 : COPY_BITMAPSET_FIELD(plan.extParam);
4093 568 : COPY_BITMAPSET_FIELD(plan.allParam);
4094 568 : COPY_BITMAPSET_FIELD(apprelids);
4095 568 : COPY_NODE_FIELD(mergeplans);
4096 568 : COPY_SCALAR_FIELD(numCols);
4097 568 : COPY_POINTER_FIELD(sortColIdx, from->numCols * sizeof(AttrNumber));
4098 568 : COPY_POINTER_FIELD(sortOperators, from->numCols * sizeof(Oid));
4099 568 : COPY_POINTER_FIELD(collations, from->numCols * sizeof(Oid));
4100 568 : COPY_POINTER_FIELD(nullsFirst, from->numCols * sizeof(bool));
4101 568 : COPY_SCALAR_FIELD(part_prune_index);
4102 :
4103 568 : return newnode;
4104 : }
4105 :
4106 : static RecursiveUnion *
4107 1012 : _copyRecursiveUnion(const RecursiveUnion *from)
4108 : {
4109 1012 : RecursiveUnion *newnode = makeNode(RecursiveUnion);
4110 :
4111 1012 : COPY_SCALAR_FIELD(plan.disabled_nodes);
4112 1012 : COPY_SCALAR_FIELD(plan.startup_cost);
4113 1012 : COPY_SCALAR_FIELD(plan.total_cost);
4114 1012 : COPY_SCALAR_FIELD(plan.plan_rows);
4115 1012 : COPY_SCALAR_FIELD(plan.plan_width);
4116 1012 : COPY_SCALAR_FIELD(plan.parallel_aware);
4117 1012 : COPY_SCALAR_FIELD(plan.parallel_safe);
4118 1012 : COPY_SCALAR_FIELD(plan.async_capable);
4119 1012 : COPY_SCALAR_FIELD(plan.plan_node_id);
4120 1012 : COPY_NODE_FIELD(plan.targetlist);
4121 1012 : COPY_NODE_FIELD(plan.qual);
4122 1012 : COPY_NODE_FIELD(plan.lefttree);
4123 1012 : COPY_NODE_FIELD(plan.righttree);
4124 1012 : COPY_NODE_FIELD(plan.initPlan);
4125 1012 : COPY_BITMAPSET_FIELD(plan.extParam);
4126 1012 : COPY_BITMAPSET_FIELD(plan.allParam);
4127 1012 : COPY_SCALAR_FIELD(wtParam);
4128 1012 : COPY_SCALAR_FIELD(numCols);
4129 1012 : COPY_POINTER_FIELD(dupColIdx, from->numCols * sizeof(AttrNumber));
4130 1012 : COPY_POINTER_FIELD(dupOperators, from->numCols * sizeof(Oid));
4131 1012 : COPY_POINTER_FIELD(dupCollations, from->numCols * sizeof(Oid));
4132 1012 : COPY_SCALAR_FIELD(numGroups);
4133 :
4134 1012 : return newnode;
4135 : }
4136 :
4137 : static BitmapAnd *
4138 226 : _copyBitmapAnd(const BitmapAnd *from)
4139 : {
4140 226 : BitmapAnd *newnode = makeNode(BitmapAnd);
4141 :
4142 226 : COPY_SCALAR_FIELD(plan.disabled_nodes);
4143 226 : COPY_SCALAR_FIELD(plan.startup_cost);
4144 226 : COPY_SCALAR_FIELD(plan.total_cost);
4145 226 : COPY_SCALAR_FIELD(plan.plan_rows);
4146 226 : COPY_SCALAR_FIELD(plan.plan_width);
4147 226 : COPY_SCALAR_FIELD(plan.parallel_aware);
4148 226 : COPY_SCALAR_FIELD(plan.parallel_safe);
4149 226 : COPY_SCALAR_FIELD(plan.async_capable);
4150 226 : COPY_SCALAR_FIELD(plan.plan_node_id);
4151 226 : COPY_NODE_FIELD(plan.targetlist);
4152 226 : COPY_NODE_FIELD(plan.qual);
4153 226 : COPY_NODE_FIELD(plan.lefttree);
4154 226 : COPY_NODE_FIELD(plan.righttree);
4155 226 : COPY_NODE_FIELD(plan.initPlan);
4156 226 : COPY_BITMAPSET_FIELD(plan.extParam);
4157 226 : COPY_BITMAPSET_FIELD(plan.allParam);
4158 226 : COPY_NODE_FIELD(bitmapplans);
4159 :
4160 226 : return newnode;
4161 : }
4162 :
4163 : static BitmapOr *
4164 406 : _copyBitmapOr(const BitmapOr *from)
4165 : {
4166 406 : BitmapOr *newnode = makeNode(BitmapOr);
4167 :
4168 406 : COPY_SCALAR_FIELD(plan.disabled_nodes);
4169 406 : COPY_SCALAR_FIELD(plan.startup_cost);
4170 406 : COPY_SCALAR_FIELD(plan.total_cost);
4171 406 : COPY_SCALAR_FIELD(plan.plan_rows);
4172 406 : COPY_SCALAR_FIELD(plan.plan_width);
4173 406 : COPY_SCALAR_FIELD(plan.parallel_aware);
4174 406 : COPY_SCALAR_FIELD(plan.parallel_safe);
4175 406 : COPY_SCALAR_FIELD(plan.async_capable);
4176 406 : COPY_SCALAR_FIELD(plan.plan_node_id);
4177 406 : COPY_NODE_FIELD(plan.targetlist);
4178 406 : COPY_NODE_FIELD(plan.qual);
4179 406 : COPY_NODE_FIELD(plan.lefttree);
4180 406 : COPY_NODE_FIELD(plan.righttree);
4181 406 : COPY_NODE_FIELD(plan.initPlan);
4182 406 : COPY_BITMAPSET_FIELD(plan.extParam);
4183 406 : COPY_BITMAPSET_FIELD(plan.allParam);
4184 406 : COPY_SCALAR_FIELD(isshared);
4185 406 : COPY_NODE_FIELD(bitmapplans);
4186 :
4187 406 : return newnode;
4188 : }
4189 :
4190 : static SeqScan *
4191 232790 : _copySeqScan(const SeqScan *from)
4192 : {
4193 232790 : SeqScan *newnode = makeNode(SeqScan);
4194 :
4195 232790 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4196 232790 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4197 232790 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4198 232790 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4199 232790 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4200 232790 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4201 232790 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4202 232790 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4203 232790 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4204 232790 : COPY_NODE_FIELD(scan.plan.targetlist);
4205 232790 : COPY_NODE_FIELD(scan.plan.qual);
4206 232790 : COPY_NODE_FIELD(scan.plan.lefttree);
4207 232790 : COPY_NODE_FIELD(scan.plan.righttree);
4208 232790 : COPY_NODE_FIELD(scan.plan.initPlan);
4209 232790 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4210 232790 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4211 232790 : COPY_SCALAR_FIELD(scan.scanrelid);
4212 :
4213 232790 : 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 160080 : _copyIndexScan(const IndexScan *from)
4245 : {
4246 160080 : IndexScan *newnode = makeNode(IndexScan);
4247 :
4248 160080 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4249 160080 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4250 160080 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4251 160080 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4252 160080 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4253 160080 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4254 160080 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4255 160080 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4256 160080 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4257 160080 : COPY_NODE_FIELD(scan.plan.targetlist);
4258 160080 : COPY_NODE_FIELD(scan.plan.qual);
4259 160080 : COPY_NODE_FIELD(scan.plan.lefttree);
4260 160080 : COPY_NODE_FIELD(scan.plan.righttree);
4261 160080 : COPY_NODE_FIELD(scan.plan.initPlan);
4262 160080 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4263 160080 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4264 160080 : COPY_SCALAR_FIELD(scan.scanrelid);
4265 160080 : COPY_SCALAR_FIELD(indexid);
4266 160080 : COPY_NODE_FIELD(indexqual);
4267 160080 : COPY_NODE_FIELD(indexqualorig);
4268 160080 : COPY_NODE_FIELD(indexorderby);
4269 160080 : COPY_NODE_FIELD(indexorderbyorig);
4270 160080 : COPY_NODE_FIELD(indexorderbyops);
4271 160080 : COPY_SCALAR_FIELD(indexorderdir);
4272 :
4273 160080 : return newnode;
4274 : }
4275 :
4276 : static IndexOnlyScan *
4277 18984 : _copyIndexOnlyScan(const IndexOnlyScan *from)
4278 : {
4279 18984 : IndexOnlyScan *newnode = makeNode(IndexOnlyScan);
4280 :
4281 18984 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4282 18984 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4283 18984 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4284 18984 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4285 18984 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4286 18984 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4287 18984 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4288 18984 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4289 18984 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4290 18984 : COPY_NODE_FIELD(scan.plan.targetlist);
4291 18984 : COPY_NODE_FIELD(scan.plan.qual);
4292 18984 : COPY_NODE_FIELD(scan.plan.lefttree);
4293 18984 : COPY_NODE_FIELD(scan.plan.righttree);
4294 18984 : COPY_NODE_FIELD(scan.plan.initPlan);
4295 18984 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4296 18984 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4297 18984 : COPY_SCALAR_FIELD(scan.scanrelid);
4298 18984 : COPY_SCALAR_FIELD(indexid);
4299 18984 : COPY_NODE_FIELD(indexqual);
4300 18984 : COPY_NODE_FIELD(recheckqual);
4301 18984 : COPY_NODE_FIELD(indexorderby);
4302 18984 : COPY_NODE_FIELD(indextlist);
4303 18984 : COPY_SCALAR_FIELD(indexorderdir);
4304 :
4305 18984 : return newnode;
4306 : }
4307 :
4308 : static BitmapIndexScan *
4309 22660 : _copyBitmapIndexScan(const BitmapIndexScan *from)
4310 : {
4311 22660 : BitmapIndexScan *newnode = makeNode(BitmapIndexScan);
4312 :
4313 22660 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4314 22660 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4315 22660 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4316 22660 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4317 22660 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4318 22660 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4319 22660 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4320 22660 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4321 22660 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4322 22660 : COPY_NODE_FIELD(scan.plan.targetlist);
4323 22660 : COPY_NODE_FIELD(scan.plan.qual);
4324 22660 : COPY_NODE_FIELD(scan.plan.lefttree);
4325 22660 : COPY_NODE_FIELD(scan.plan.righttree);
4326 22660 : COPY_NODE_FIELD(scan.plan.initPlan);
4327 22660 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4328 22660 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4329 22660 : COPY_SCALAR_FIELD(scan.scanrelid);
4330 22660 : COPY_SCALAR_FIELD(indexid);
4331 22660 : COPY_SCALAR_FIELD(isshared);
4332 22660 : COPY_NODE_FIELD(indexqual);
4333 22660 : COPY_NODE_FIELD(indexqualorig);
4334 :
4335 22660 : return newnode;
4336 : }
4337 :
4338 : static BitmapHeapScan *
4339 22022 : _copyBitmapHeapScan(const BitmapHeapScan *from)
4340 : {
4341 22022 : BitmapHeapScan *newnode = makeNode(BitmapHeapScan);
4342 :
4343 22022 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4344 22022 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4345 22022 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4346 22022 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4347 22022 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4348 22022 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4349 22022 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4350 22022 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4351 22022 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4352 22022 : COPY_NODE_FIELD(scan.plan.targetlist);
4353 22022 : COPY_NODE_FIELD(scan.plan.qual);
4354 22022 : COPY_NODE_FIELD(scan.plan.lefttree);
4355 22022 : COPY_NODE_FIELD(scan.plan.righttree);
4356 22022 : COPY_NODE_FIELD(scan.plan.initPlan);
4357 22022 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4358 22022 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4359 22022 : COPY_SCALAR_FIELD(scan.scanrelid);
4360 22022 : COPY_NODE_FIELD(bitmapqualorig);
4361 :
4362 22022 : return newnode;
4363 : }
4364 :
4365 : static TidScan *
4366 992 : _copyTidScan(const TidScan *from)
4367 : {
4368 992 : TidScan *newnode = makeNode(TidScan);
4369 :
4370 992 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4371 992 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4372 992 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4373 992 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4374 992 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4375 992 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4376 992 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4377 992 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4378 992 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4379 992 : COPY_NODE_FIELD(scan.plan.targetlist);
4380 992 : COPY_NODE_FIELD(scan.plan.qual);
4381 992 : COPY_NODE_FIELD(scan.plan.lefttree);
4382 992 : COPY_NODE_FIELD(scan.plan.righttree);
4383 992 : COPY_NODE_FIELD(scan.plan.initPlan);
4384 992 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4385 992 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4386 992 : COPY_SCALAR_FIELD(scan.scanrelid);
4387 992 : COPY_NODE_FIELD(tidquals);
4388 :
4389 992 : 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 11522 : _copySubqueryScan(const SubqueryScan *from)
4421 : {
4422 11522 : SubqueryScan *newnode = makeNode(SubqueryScan);
4423 :
4424 11522 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4425 11522 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4426 11522 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4427 11522 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4428 11522 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4429 11522 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4430 11522 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4431 11522 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4432 11522 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4433 11522 : COPY_NODE_FIELD(scan.plan.targetlist);
4434 11522 : COPY_NODE_FIELD(scan.plan.qual);
4435 11522 : COPY_NODE_FIELD(scan.plan.lefttree);
4436 11522 : COPY_NODE_FIELD(scan.plan.righttree);
4437 11522 : COPY_NODE_FIELD(scan.plan.initPlan);
4438 11522 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4439 11522 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4440 11522 : COPY_SCALAR_FIELD(scan.scanrelid);
4441 11522 : COPY_NODE_FIELD(subplan);
4442 11522 : COPY_SCALAR_FIELD(scanstatus);
4443 :
4444 11522 : return newnode;
4445 : }
4446 :
4447 : static FunctionScan *
4448 55116 : _copyFunctionScan(const FunctionScan *from)
4449 : {
4450 55116 : FunctionScan *newnode = makeNode(FunctionScan);
4451 :
4452 55116 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4453 55116 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4454 55116 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4455 55116 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4456 55116 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4457 55116 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4458 55116 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4459 55116 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4460 55116 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4461 55116 : COPY_NODE_FIELD(scan.plan.targetlist);
4462 55116 : COPY_NODE_FIELD(scan.plan.qual);
4463 55116 : COPY_NODE_FIELD(scan.plan.lefttree);
4464 55116 : COPY_NODE_FIELD(scan.plan.righttree);
4465 55116 : COPY_NODE_FIELD(scan.plan.initPlan);
4466 55116 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4467 55116 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4468 55116 : COPY_SCALAR_FIELD(scan.scanrelid);
4469 55116 : COPY_NODE_FIELD(functions);
4470 55116 : COPY_SCALAR_FIELD(funcordinality);
4471 :
4472 55116 : return newnode;
4473 : }
4474 :
4475 : static ValuesScan *
4476 8484 : _copyValuesScan(const ValuesScan *from)
4477 : {
4478 8484 : ValuesScan *newnode = makeNode(ValuesScan);
4479 :
4480 8484 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4481 8484 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4482 8484 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4483 8484 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4484 8484 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4485 8484 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4486 8484 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4487 8484 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4488 8484 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4489 8484 : COPY_NODE_FIELD(scan.plan.targetlist);
4490 8484 : COPY_NODE_FIELD(scan.plan.qual);
4491 8484 : COPY_NODE_FIELD(scan.plan.lefttree);
4492 8484 : COPY_NODE_FIELD(scan.plan.righttree);
4493 8484 : COPY_NODE_FIELD(scan.plan.initPlan);
4494 8484 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4495 8484 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4496 8484 : COPY_SCALAR_FIELD(scan.scanrelid);
4497 8484 : COPY_NODE_FIELD(values_lists);
4498 :
4499 8484 : 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 4224 : _copyCteScan(const CteScan *from)
4531 : {
4532 4224 : CteScan *newnode = makeNode(CteScan);
4533 :
4534 4224 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4535 4224 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4536 4224 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4537 4224 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4538 4224 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4539 4224 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4540 4224 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4541 4224 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4542 4224 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4543 4224 : COPY_NODE_FIELD(scan.plan.targetlist);
4544 4224 : COPY_NODE_FIELD(scan.plan.qual);
4545 4224 : COPY_NODE_FIELD(scan.plan.lefttree);
4546 4224 : COPY_NODE_FIELD(scan.plan.righttree);
4547 4224 : COPY_NODE_FIELD(scan.plan.initPlan);
4548 4224 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4549 4224 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4550 4224 : COPY_SCALAR_FIELD(scan.scanrelid);
4551 4224 : COPY_SCALAR_FIELD(ctePlanId);
4552 4224 : COPY_SCALAR_FIELD(cteParam);
4553 :
4554 4224 : return newnode;
4555 : }
4556 :
4557 : static NamedTuplestoreScan *
4558 904 : _copyNamedTuplestoreScan(const NamedTuplestoreScan *from)
4559 : {
4560 904 : NamedTuplestoreScan *newnode = makeNode(NamedTuplestoreScan);
4561 :
4562 904 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4563 904 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4564 904 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4565 904 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4566 904 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4567 904 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4568 904 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4569 904 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4570 904 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4571 904 : COPY_NODE_FIELD(scan.plan.targetlist);
4572 904 : COPY_NODE_FIELD(scan.plan.qual);
4573 904 : COPY_NODE_FIELD(scan.plan.lefttree);
4574 904 : COPY_NODE_FIELD(scan.plan.righttree);
4575 904 : COPY_NODE_FIELD(scan.plan.initPlan);
4576 904 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4577 904 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4578 904 : COPY_SCALAR_FIELD(scan.scanrelid);
4579 904 : COPY_STRING_FIELD(enrname);
4580 :
4581 904 : return newnode;
4582 : }
4583 :
4584 : static WorkTableScan *
4585 1012 : _copyWorkTableScan(const WorkTableScan *from)
4586 : {
4587 1012 : WorkTableScan *newnode = makeNode(WorkTableScan);
4588 :
4589 1012 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4590 1012 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4591 1012 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4592 1012 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4593 1012 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4594 1012 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4595 1012 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4596 1012 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4597 1012 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4598 1012 : COPY_NODE_FIELD(scan.plan.targetlist);
4599 1012 : COPY_NODE_FIELD(scan.plan.qual);
4600 1012 : COPY_NODE_FIELD(scan.plan.lefttree);
4601 1012 : COPY_NODE_FIELD(scan.plan.righttree);
4602 1012 : COPY_NODE_FIELD(scan.plan.initPlan);
4603 1012 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4604 1012 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4605 1012 : COPY_SCALAR_FIELD(scan.scanrelid);
4606 1012 : COPY_SCALAR_FIELD(wtParam);
4607 :
4608 1012 : return newnode;
4609 : }
4610 :
4611 : static ForeignScan *
4612 2086 : _copyForeignScan(const ForeignScan *from)
4613 : {
4614 2086 : ForeignScan *newnode = makeNode(ForeignScan);
4615 :
4616 2086 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4617 2086 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4618 2086 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4619 2086 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4620 2086 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4621 2086 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4622 2086 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4623 2086 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4624 2086 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4625 2086 : COPY_NODE_FIELD(scan.plan.targetlist);
4626 2086 : COPY_NODE_FIELD(scan.plan.qual);
4627 2086 : COPY_NODE_FIELD(scan.plan.lefttree);
4628 2086 : COPY_NODE_FIELD(scan.plan.righttree);
4629 2086 : COPY_NODE_FIELD(scan.plan.initPlan);
4630 2086 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4631 2086 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4632 2086 : COPY_SCALAR_FIELD(scan.scanrelid);
4633 2086 : COPY_SCALAR_FIELD(operation);
4634 2086 : COPY_SCALAR_FIELD(resultRelation);
4635 2086 : COPY_SCALAR_FIELD(checkAsUser);
4636 2086 : COPY_SCALAR_FIELD(fs_server);
4637 2086 : COPY_NODE_FIELD(fdw_exprs);
4638 2086 : COPY_NODE_FIELD(fdw_private);
4639 2086 : COPY_NODE_FIELD(fdw_scan_tlist);
4640 2086 : COPY_NODE_FIELD(fdw_recheck_quals);
4641 2086 : COPY_BITMAPSET_FIELD(fs_relids);
4642 2086 : COPY_BITMAPSET_FIELD(fs_base_relids);
4643 2086 : COPY_SCALAR_FIELD(fsSystemCol);
4644 :
4645 2086 : 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 97790 : _copyNestLoop(const NestLoop *from)
4683 : {
4684 97790 : NestLoop *newnode = makeNode(NestLoop);
4685 :
4686 97790 : COPY_SCALAR_FIELD(join.plan.disabled_nodes);
4687 97790 : COPY_SCALAR_FIELD(join.plan.startup_cost);
4688 97790 : COPY_SCALAR_FIELD(join.plan.total_cost);
4689 97790 : COPY_SCALAR_FIELD(join.plan.plan_rows);
4690 97790 : COPY_SCALAR_FIELD(join.plan.plan_width);
4691 97790 : COPY_SCALAR_FIELD(join.plan.parallel_aware);
4692 97790 : COPY_SCALAR_FIELD(join.plan.parallel_safe);
4693 97790 : COPY_SCALAR_FIELD(join.plan.async_capable);
4694 97790 : COPY_SCALAR_FIELD(join.plan.plan_node_id);
4695 97790 : COPY_NODE_FIELD(join.plan.targetlist);
4696 97790 : COPY_NODE_FIELD(join.plan.qual);
4697 97790 : COPY_NODE_FIELD(join.plan.lefttree);
4698 97790 : COPY_NODE_FIELD(join.plan.righttree);
4699 97790 : COPY_NODE_FIELD(join.plan.initPlan);
4700 97790 : COPY_BITMAPSET_FIELD(join.plan.extParam);
4701 97790 : COPY_BITMAPSET_FIELD(join.plan.allParam);
4702 97790 : COPY_SCALAR_FIELD(join.jointype);
4703 97790 : COPY_SCALAR_FIELD(join.inner_unique);
4704 97790 : COPY_NODE_FIELD(join.joinqual);
4705 97790 : COPY_NODE_FIELD(nestParams);
4706 :
4707 97790 : return newnode;
4708 : }
4709 :
4710 : static NestLoopParam *
4711 54892 : _copyNestLoopParam(const NestLoopParam *from)
4712 : {
4713 54892 : NestLoopParam *newnode = makeNode(NestLoopParam);
4714 :
4715 54892 : COPY_SCALAR_FIELD(paramno);
4716 54892 : COPY_NODE_FIELD(paramval);
4717 :
4718 54892 : return newnode;
4719 : }
4720 :
4721 : static MergeJoin *
4722 9808 : _copyMergeJoin(const MergeJoin *from)
4723 : {
4724 9808 : MergeJoin *newnode = makeNode(MergeJoin);
4725 :
4726 9808 : COPY_SCALAR_FIELD(join.plan.disabled_nodes);
4727 9808 : COPY_SCALAR_FIELD(join.plan.startup_cost);
4728 9808 : COPY_SCALAR_FIELD(join.plan.total_cost);
4729 9808 : COPY_SCALAR_FIELD(join.plan.plan_rows);
4730 9808 : COPY_SCALAR_FIELD(join.plan.plan_width);
4731 9808 : COPY_SCALAR_FIELD(join.plan.parallel_aware);
4732 9808 : COPY_SCALAR_FIELD(join.plan.parallel_safe);
4733 9808 : COPY_SCALAR_FIELD(join.plan.async_capable);
4734 9808 : COPY_SCALAR_FIELD(join.plan.plan_node_id);
4735 9808 : COPY_NODE_FIELD(join.plan.targetlist);
4736 9808 : COPY_NODE_FIELD(join.plan.qual);
4737 9808 : COPY_NODE_FIELD(join.plan.lefttree);
4738 9808 : COPY_NODE_FIELD(join.plan.righttree);
4739 9808 : COPY_NODE_FIELD(join.plan.initPlan);
4740 9808 : COPY_BITMAPSET_FIELD(join.plan.extParam);
4741 9808 : COPY_BITMAPSET_FIELD(join.plan.allParam);
4742 9808 : COPY_SCALAR_FIELD(join.jointype);
4743 9808 : COPY_SCALAR_FIELD(join.inner_unique);
4744 9808 : COPY_NODE_FIELD(join.joinqual);
4745 9808 : COPY_SCALAR_FIELD(skip_mark_restore);
4746 9808 : COPY_NODE_FIELD(mergeclauses);
4747 9808 : COPY_POINTER_FIELD(mergeFamilies, list_length(from->mergeclauses) * sizeof(Oid));
4748 9808 : COPY_POINTER_FIELD(mergeCollations, list_length(from->mergeclauses) * sizeof(Oid));
4749 9808 : COPY_POINTER_FIELD(mergeReversals, list_length(from->mergeclauses) * sizeof(bool));
4750 9808 : COPY_POINTER_FIELD(mergeNullsFirst, list_length(from->mergeclauses) * sizeof(bool));
4751 :
4752 9808 : return newnode;
4753 : }
4754 :
4755 : static HashJoin *
4756 36338 : _copyHashJoin(const HashJoin *from)
4757 : {
4758 36338 : HashJoin *newnode = makeNode(HashJoin);
4759 :
4760 36338 : COPY_SCALAR_FIELD(join.plan.disabled_nodes);
4761 36338 : COPY_SCALAR_FIELD(join.plan.startup_cost);
4762 36338 : COPY_SCALAR_FIELD(join.plan.total_cost);
4763 36338 : COPY_SCALAR_FIELD(join.plan.plan_rows);
4764 36338 : COPY_SCALAR_FIELD(join.plan.plan_width);
4765 36338 : COPY_SCALAR_FIELD(join.plan.parallel_aware);
4766 36338 : COPY_SCALAR_FIELD(join.plan.parallel_safe);
4767 36338 : COPY_SCALAR_FIELD(join.plan.async_capable);
4768 36338 : COPY_SCALAR_FIELD(join.plan.plan_node_id);
4769 36338 : COPY_NODE_FIELD(join.plan.targetlist);
4770 36338 : COPY_NODE_FIELD(join.plan.qual);
4771 36338 : COPY_NODE_FIELD(join.plan.lefttree);
4772 36338 : COPY_NODE_FIELD(join.plan.righttree);
4773 36338 : COPY_NODE_FIELD(join.plan.initPlan);
4774 36338 : COPY_BITMAPSET_FIELD(join.plan.extParam);
4775 36338 : COPY_BITMAPSET_FIELD(join.plan.allParam);
4776 36338 : COPY_SCALAR_FIELD(join.jointype);
4777 36338 : COPY_SCALAR_FIELD(join.inner_unique);
4778 36338 : COPY_NODE_FIELD(join.joinqual);
4779 36338 : COPY_NODE_FIELD(hashclauses);
4780 36338 : COPY_NODE_FIELD(hashoperators);
4781 36338 : COPY_NODE_FIELD(hashcollations);
4782 36338 : COPY_NODE_FIELD(hashkeys);
4783 :
4784 36338 : return newnode;
4785 : }
4786 :
4787 : static Material *
4788 5038 : _copyMaterial(const Material *from)
4789 : {
4790 5038 : Material *newnode = makeNode(Material);
4791 :
4792 5038 : COPY_SCALAR_FIELD(plan.disabled_nodes);
4793 5038 : COPY_SCALAR_FIELD(plan.startup_cost);
4794 5038 : COPY_SCALAR_FIELD(plan.total_cost);
4795 5038 : COPY_SCALAR_FIELD(plan.plan_rows);
4796 5038 : COPY_SCALAR_FIELD(plan.plan_width);
4797 5038 : COPY_SCALAR_FIELD(plan.parallel_aware);
4798 5038 : COPY_SCALAR_FIELD(plan.parallel_safe);
4799 5038 : COPY_SCALAR_FIELD(plan.async_capable);
4800 5038 : COPY_SCALAR_FIELD(plan.plan_node_id);
4801 5038 : COPY_NODE_FIELD(plan.targetlist);
4802 5038 : COPY_NODE_FIELD(plan.qual);
4803 5038 : COPY_NODE_FIELD(plan.lefttree);
4804 5038 : COPY_NODE_FIELD(plan.righttree);
4805 5038 : COPY_NODE_FIELD(plan.initPlan);
4806 5038 : COPY_BITMAPSET_FIELD(plan.extParam);
4807 5038 : COPY_BITMAPSET_FIELD(plan.allParam);
4808 :
4809 5038 : return newnode;
4810 : }
4811 :
4812 : static Memoize *
4813 2518 : _copyMemoize(const Memoize *from)
4814 : {
4815 2518 : Memoize *newnode = makeNode(Memoize);
4816 :
4817 2518 : COPY_SCALAR_FIELD(plan.disabled_nodes);
4818 2518 : COPY_SCALAR_FIELD(plan.startup_cost);
4819 2518 : COPY_SCALAR_FIELD(plan.total_cost);
4820 2518 : COPY_SCALAR_FIELD(plan.plan_rows);
4821 2518 : COPY_SCALAR_FIELD(plan.plan_width);
4822 2518 : COPY_SCALAR_FIELD(plan.parallel_aware);
4823 2518 : COPY_SCALAR_FIELD(plan.parallel_safe);
4824 2518 : COPY_SCALAR_FIELD(plan.async_capable);
4825 2518 : COPY_SCALAR_FIELD(plan.plan_node_id);
4826 2518 : COPY_NODE_FIELD(plan.targetlist);
4827 2518 : COPY_NODE_FIELD(plan.qual);
4828 2518 : COPY_NODE_FIELD(plan.lefttree);
4829 2518 : COPY_NODE_FIELD(plan.righttree);
4830 2518 : COPY_NODE_FIELD(plan.initPlan);
4831 2518 : COPY_BITMAPSET_FIELD(plan.extParam);
4832 2518 : COPY_BITMAPSET_FIELD(plan.allParam);
4833 2518 : COPY_SCALAR_FIELD(numKeys);
4834 2518 : COPY_POINTER_FIELD(hashOperators, from->numKeys * sizeof(Oid));
4835 2518 : COPY_POINTER_FIELD(collations, from->numKeys * sizeof(Oid));
4836 2518 : COPY_NODE_FIELD(param_exprs);
4837 2518 : COPY_SCALAR_FIELD(singlerow);
4838 2518 : COPY_SCALAR_FIELD(binary_mode);
4839 2518 : COPY_SCALAR_FIELD(est_entries);
4840 2518 : COPY_BITMAPSET_FIELD(keyparamids);
4841 :
4842 2518 : return newnode;
4843 : }
4844 :
4845 : static Sort *
4846 85042 : _copySort(const Sort *from)
4847 : {
4848 85042 : Sort *newnode = makeNode(Sort);
4849 :
4850 85042 : COPY_SCALAR_FIELD(plan.disabled_nodes);
4851 85042 : COPY_SCALAR_FIELD(plan.startup_cost);
4852 85042 : COPY_SCALAR_FIELD(plan.total_cost);
4853 85042 : COPY_SCALAR_FIELD(plan.plan_rows);
4854 85042 : COPY_SCALAR_FIELD(plan.plan_width);
4855 85042 : COPY_SCALAR_FIELD(plan.parallel_aware);
4856 85042 : COPY_SCALAR_FIELD(plan.parallel_safe);
4857 85042 : COPY_SCALAR_FIELD(plan.async_capable);
4858 85042 : COPY_SCALAR_FIELD(plan.plan_node_id);
4859 85042 : COPY_NODE_FIELD(plan.targetlist);
4860 85042 : COPY_NODE_FIELD(plan.qual);
4861 85042 : COPY_NODE_FIELD(plan.lefttree);
4862 85042 : COPY_NODE_FIELD(plan.righttree);
4863 85042 : COPY_NODE_FIELD(plan.initPlan);
4864 85042 : COPY_BITMAPSET_FIELD(plan.extParam);
4865 85042 : COPY_BITMAPSET_FIELD(plan.allParam);
4866 85042 : COPY_SCALAR_FIELD(numCols);
4867 85042 : COPY_POINTER_FIELD(sortColIdx, from->numCols * sizeof(AttrNumber));
4868 85042 : COPY_POINTER_FIELD(sortOperators, from->numCols * sizeof(Oid));
4869 85042 : COPY_POINTER_FIELD(collations, from->numCols * sizeof(Oid));
4870 85042 : COPY_POINTER_FIELD(nullsFirst, from->numCols * sizeof(bool));
4871 :
4872 85042 : return newnode;
4873 : }
4874 :
4875 : static IncrementalSort *
4876 1194 : _copyIncrementalSort(const IncrementalSort *from)
4877 : {
4878 1194 : IncrementalSort *newnode = makeNode(IncrementalSort);
4879 :
4880 1194 : COPY_SCALAR_FIELD(sort.plan.disabled_nodes);
4881 1194 : COPY_SCALAR_FIELD(sort.plan.startup_cost);
4882 1194 : COPY_SCALAR_FIELD(sort.plan.total_cost);
4883 1194 : COPY_SCALAR_FIELD(sort.plan.plan_rows);
4884 1194 : COPY_SCALAR_FIELD(sort.plan.plan_width);
4885 1194 : COPY_SCALAR_FIELD(sort.plan.parallel_aware);
4886 1194 : COPY_SCALAR_FIELD(sort.plan.parallel_safe);
4887 1194 : COPY_SCALAR_FIELD(sort.plan.async_capable);
4888 1194 : COPY_SCALAR_FIELD(sort.plan.plan_node_id);
4889 1194 : COPY_NODE_FIELD(sort.plan.targetlist);
4890 1194 : COPY_NODE_FIELD(sort.plan.qual);
4891 1194 : COPY_NODE_FIELD(sort.plan.lefttree);
4892 1194 : COPY_NODE_FIELD(sort.plan.righttree);
4893 1194 : COPY_NODE_FIELD(sort.plan.initPlan);
4894 1194 : COPY_BITMAPSET_FIELD(sort.plan.extParam);
4895 1194 : COPY_BITMAPSET_FIELD(sort.plan.allParam);
4896 1194 : COPY_SCALAR_FIELD(sort.numCols);
4897 1194 : COPY_POINTER_FIELD(sort.sortColIdx, from->sort.numCols * sizeof(AttrNumber));
4898 1194 : COPY_POINTER_FIELD(sort.sortOperators, from->sort.numCols * sizeof(Oid));
4899 1194 : COPY_POINTER_FIELD(sort.collations, from->sort.numCols * sizeof(Oid));
4900 1194 : COPY_POINTER_FIELD(sort.nullsFirst, from->sort.numCols * sizeof(bool));
4901 1194 : COPY_SCALAR_FIELD(nPresortedCols);
4902 :
4903 1194 : return newnode;
4904 : }
4905 :
4906 : static Group *
4907 252 : _copyGroup(const Group *from)
4908 : {
4909 252 : Group *newnode = makeNode(Group);
4910 :
4911 252 : COPY_SCALAR_FIELD(plan.disabled_nodes);
4912 252 : COPY_SCALAR_FIELD(plan.startup_cost);
4913 252 : COPY_SCALAR_FIELD(plan.total_cost);
4914 252 : COPY_SCALAR_FIELD(plan.plan_rows);
4915 252 : COPY_SCALAR_FIELD(plan.plan_width);
4916 252 : COPY_SCALAR_FIELD(plan.parallel_aware);
4917 252 : COPY_SCALAR_FIELD(plan.parallel_safe);
4918 252 : COPY_SCALAR_FIELD(plan.async_capable);
4919 252 : COPY_SCALAR_FIELD(plan.plan_node_id);
4920 252 : COPY_NODE_FIELD(plan.targetlist);
4921 252 : COPY_NODE_FIELD(plan.qual);
4922 252 : COPY_NODE_FIELD(plan.lefttree);
4923 252 : COPY_NODE_FIELD(plan.righttree);
4924 252 : COPY_NODE_FIELD(plan.initPlan);
4925 252 : COPY_BITMAPSET_FIELD(plan.extParam);
4926 252 : COPY_BITMAPSET_FIELD(plan.allParam);
4927 252 : COPY_SCALAR_FIELD(numCols);
4928 252 : COPY_POINTER_FIELD(grpColIdx, from->numCols * sizeof(AttrNumber));
4929 252 : COPY_POINTER_FIELD(grpOperators, from->numCols * sizeof(Oid));
4930 252 : COPY_POINTER_FIELD(grpCollations, from->numCols * sizeof(Oid));
4931 :
4932 252 : return newnode;
4933 : }
4934 :
4935 : static Agg *
4936 47254 : _copyAgg(const Agg *from)
4937 : {
4938 47254 : Agg *newnode = makeNode(Agg);
4939 :
4940 47254 : COPY_SCALAR_FIELD(plan.disabled_nodes);
4941 47254 : COPY_SCALAR_FIELD(plan.startup_cost);
4942 47254 : COPY_SCALAR_FIELD(plan.total_cost);
4943 47254 : COPY_SCALAR_FIELD(plan.plan_rows);
4944 47254 : COPY_SCALAR_FIELD(plan.plan_width);
4945 47254 : COPY_SCALAR_FIELD(plan.parallel_aware);
4946 47254 : COPY_SCALAR_FIELD(plan.parallel_safe);
4947 47254 : COPY_SCALAR_FIELD(plan.async_capable);
4948 47254 : COPY_SCALAR_FIELD(plan.plan_node_id);
4949 47254 : COPY_NODE_FIELD(plan.targetlist);
4950 47254 : COPY_NODE_FIELD(plan.qual);
4951 47254 : COPY_NODE_FIELD(plan.lefttree);
4952 47254 : COPY_NODE_FIELD(plan.righttree);
4953 47254 : COPY_NODE_FIELD(plan.initPlan);
4954 47254 : COPY_BITMAPSET_FIELD(plan.extParam);
4955 47254 : COPY_BITMAPSET_FIELD(plan.allParam);
4956 47254 : COPY_SCALAR_FIELD(aggstrategy);
4957 47254 : COPY_SCALAR_FIELD(aggsplit);
4958 47254 : COPY_SCALAR_FIELD(numCols);
4959 47254 : COPY_POINTER_FIELD(grpColIdx, from->numCols * sizeof(AttrNumber));
4960 47254 : COPY_POINTER_FIELD(grpOperators, from->numCols * sizeof(Oid));
4961 47254 : COPY_POINTER_FIELD(grpCollations, from->numCols * sizeof(Oid));
4962 47254 : COPY_SCALAR_FIELD(numGroups);
4963 47254 : COPY_SCALAR_FIELD(transitionSpace);
4964 47254 : COPY_BITMAPSET_FIELD(aggParams);
4965 47254 : COPY_NODE_FIELD(groupingSets);
4966 47254 : COPY_NODE_FIELD(chain);
4967 :
4968 47254 : return newnode;
4969 : }
4970 :
4971 : static WindowAgg *
4972 2602 : _copyWindowAgg(const WindowAgg *from)
4973 : {
4974 2602 : WindowAgg *newnode = makeNode(WindowAgg);
4975 :
4976 2602 : COPY_SCALAR_FIELD(plan.disabled_nodes);
4977 2602 : COPY_SCALAR_FIELD(plan.startup_cost);
4978 2602 : COPY_SCALAR_FIELD(plan.total_cost);
4979 2602 : COPY_SCALAR_FIELD(plan.plan_rows);
4980 2602 : COPY_SCALAR_FIELD(plan.plan_width);
4981 2602 : COPY_SCALAR_FIELD(plan.parallel_aware);
4982 2602 : COPY_SCALAR_FIELD(plan.parallel_safe);
4983 2602 : COPY_SCALAR_FIELD(plan.async_capable);
4984 2602 : COPY_SCALAR_FIELD(plan.plan_node_id);
4985 2602 : COPY_NODE_FIELD(plan.targetlist);
4986 2602 : COPY_NODE_FIELD(plan.qual);
4987 2602 : COPY_NODE_FIELD(plan.lefttree);
4988 2602 : COPY_NODE_FIELD(plan.righttree);
4989 2602 : COPY_NODE_FIELD(plan.initPlan);
4990 2602 : COPY_BITMAPSET_FIELD(plan.extParam);
4991 2602 : COPY_BITMAPSET_FIELD(plan.allParam);
4992 2602 : COPY_STRING_FIELD(winname);
4993 2602 : COPY_SCALAR_FIELD(winref);
4994 2602 : COPY_SCALAR_FIELD(partNumCols);
4995 2602 : COPY_POINTER_FIELD(partColIdx, from->partNumCols * sizeof(AttrNumber));
4996 2602 : COPY_POINTER_FIELD(partOperators, from->partNumCols * sizeof(Oid));
4997 2602 : COPY_POINTER_FIELD(partCollations, from->partNumCols * sizeof(Oid));
4998 2602 : COPY_SCALAR_FIELD(ordNumCols);
4999 2602 : COPY_POINTER_FIELD(ordColIdx, from->ordNumCols * sizeof(AttrNumber));
5000 2602 : COPY_POINTER_FIELD(ordOperators, from->ordNumCols * sizeof(Oid));
5001 2602 : COPY_POINTER_FIELD(ordCollations, from->ordNumCols * sizeof(Oid));
5002 2602 : COPY_SCALAR_FIELD(frameOptions);
5003 2602 : COPY_NODE_FIELD(startOffset);
5004 2602 : COPY_NODE_FIELD(endOffset);
5005 2602 : COPY_NODE_FIELD(runCondition);
5006 2602 : COPY_NODE_FIELD(runConditionOrig);
5007 2602 : COPY_SCALAR_FIELD(startInRangeFunc);
5008 2602 : COPY_SCALAR_FIELD(endInRangeFunc);
5009 2602 : COPY_SCALAR_FIELD(inRangeColl);
5010 2602 : COPY_SCALAR_FIELD(inRangeAsc);
5011 2602 : COPY_SCALAR_FIELD(inRangeNullsFirst);
5012 2602 : COPY_SCALAR_FIELD(topWindow);
5013 :
5014 2602 : return newnode;
5015 : }
5016 :
5017 : static Unique *
5018 5532 : _copyUnique(const Unique *from)
5019 : {
5020 5532 : Unique *newnode = makeNode(Unique);
5021 :
5022 5532 : COPY_SCALAR_FIELD(plan.disabled_nodes);
5023 5532 : COPY_SCALAR_FIELD(plan.startup_cost);
5024 5532 : COPY_SCALAR_FIELD(plan.total_cost);
5025 5532 : COPY_SCALAR_FIELD(plan.plan_rows);
5026 5532 : COPY_SCALAR_FIELD(plan.plan_width);
5027 5532 : COPY_SCALAR_FIELD(plan.parallel_aware);
5028 5532 : COPY_SCALAR_FIELD(plan.parallel_safe);
5029 5532 : COPY_SCALAR_FIELD(plan.async_capable);
5030 5532 : COPY_SCALAR_FIELD(plan.plan_node_id);
5031 5532 : COPY_NODE_FIELD(plan.targetlist);
5032 5532 : COPY_NODE_FIELD(plan.qual);
5033 5532 : COPY_NODE_FIELD(plan.lefttree);
5034 5532 : COPY_NODE_FIELD(plan.righttree);
5035 5532 : COPY_NODE_FIELD(plan.initPlan);
5036 5532 : COPY_BITMAPSET_FIELD(plan.extParam);
5037 5532 : COPY_BITMAPSET_FIELD(plan.allParam);
5038 5532 : COPY_SCALAR_FIELD(numCols);
5039 5532 : COPY_POINTER_FIELD(uniqColIdx, from->numCols * sizeof(AttrNumber));
5040 5532 : COPY_POINTER_FIELD(uniqOperators, from->numCols * sizeof(Oid));
5041 5532 : COPY_POINTER_FIELD(uniqCollations, from->numCols * sizeof(Oid));
5042 :
5043 5532 : return newnode;
5044 : }
5045 :
5046 : static Gather *
5047 1172 : _copyGather(const Gather *from)
5048 : {
5049 1172 : Gather *newnode = makeNode(Gather);
5050 :
5051 1172 : COPY_SCALAR_FIELD(plan.disabled_nodes);
5052 1172 : COPY_SCALAR_FIELD(plan.startup_cost);
5053 1172 : COPY_SCALAR_FIELD(plan.total_cost);
5054 1172 : COPY_SCALAR_FIELD(plan.plan_rows);
5055 1172 : COPY_SCALAR_FIELD(plan.plan_width);
5056 1172 : COPY_SCALAR_FIELD(plan.parallel_aware);
5057 1172 : COPY_SCALAR_FIELD(plan.parallel_safe);
5058 1172 : COPY_SCALAR_FIELD(plan.async_capable);
5059 1172 : COPY_SCALAR_FIELD(plan.plan_node_id);
5060 1172 : COPY_NODE_FIELD(plan.targetlist);
5061 1172 : COPY_NODE_FIELD(plan.qual);
5062 1172 : COPY_NODE_FIELD(plan.lefttree);
5063 1172 : COPY_NODE_FIELD(plan.righttree);
5064 1172 : COPY_NODE_FIELD(plan.initPlan);
5065 1172 : COPY_BITMAPSET_FIELD(plan.extParam);
5066 1172 : COPY_BITMAPSET_FIELD(plan.allParam);
5067 1172 : COPY_SCALAR_FIELD(num_workers);
5068 1172 : COPY_SCALAR_FIELD(rescan_param);
5069 1172 : COPY_SCALAR_FIELD(single_copy);
5070 1172 : COPY_SCALAR_FIELD(invisible);
5071 1172 : COPY_BITMAPSET_FIELD(initParam);
5072 :
5073 1172 : return newnode;
5074 : }
5075 :
5076 : static GatherMerge *
5077 330 : _copyGatherMerge(const GatherMerge *from)
5078 : {
5079 330 : GatherMerge *newnode = makeNode(GatherMerge);
5080 :
5081 330 : COPY_SCALAR_FIELD(plan.disabled_nodes);
5082 330 : COPY_SCALAR_FIELD(plan.startup_cost);
5083 330 : COPY_SCALAR_FIELD(plan.total_cost);
5084 330 : COPY_SCALAR_FIELD(plan.plan_rows);
5085 330 : COPY_SCALAR_FIELD(plan.plan_width);
5086 330 : COPY_SCALAR_FIELD(plan.parallel_aware);
5087 330 : COPY_SCALAR_FIELD(plan.parallel_safe);
5088 330 : COPY_SCALAR_FIELD(plan.async_capable);
5089 330 : COPY_SCALAR_FIELD(plan.plan_node_id);
5090 330 : COPY_NODE_FIELD(plan.targetlist);
5091 330 : COPY_NODE_FIELD(plan.qual);
5092 330 : COPY_NODE_FIELD(plan.lefttree);
5093 330 : COPY_NODE_FIELD(plan.righttree);
5094 330 : COPY_NODE_FIELD(plan.initPlan);
5095 330 : COPY_BITMAPSET_FIELD(plan.extParam);
5096 330 : COPY_BITMAPSET_FIELD(plan.allParam);
5097 330 : COPY_SCALAR_FIELD(num_workers);
5098 330 : COPY_SCALAR_FIELD(rescan_param);
5099 330 : COPY_SCALAR_FIELD(numCols);
5100 330 : COPY_POINTER_FIELD(sortColIdx, from->numCols * sizeof(AttrNumber));
5101 330 : COPY_POINTER_FIELD(sortOperators, from->numCols * sizeof(Oid));
5102 330 : COPY_POINTER_FIELD(collations, from->numCols * sizeof(Oid));
5103 330 : COPY_POINTER_FIELD(nullsFirst, from->numCols * sizeof(bool));
5104 330 : COPY_BITMAPSET_FIELD(initParam);
5105 :
5106 330 : return newnode;
5107 : }
5108 :
5109 : static Hash *
5110 36338 : _copyHash(const Hash *from)
5111 : {
5112 36338 : Hash *newnode = makeNode(Hash);
5113 :
5114 36338 : COPY_SCALAR_FIELD(plan.disabled_nodes);
5115 36338 : COPY_SCALAR_FIELD(plan.startup_cost);
5116 36338 : COPY_SCALAR_FIELD(plan.total_cost);
5117 36338 : COPY_SCALAR_FIELD(plan.plan_rows);
5118 36338 : COPY_SCALAR_FIELD(plan.plan_width);
5119 36338 : COPY_SCALAR_FIELD(plan.parallel_aware);
5120 36338 : COPY_SCALAR_FIELD(plan.parallel_safe);
5121 36338 : COPY_SCALAR_FIELD(plan.async_capable);
5122 36338 : COPY_SCALAR_FIELD(plan.plan_node_id);
5123 36338 : COPY_NODE_FIELD(plan.targetlist);
5124 36338 : COPY_NODE_FIELD(plan.qual);
5125 36338 : COPY_NODE_FIELD(plan.lefttree);
5126 36338 : COPY_NODE_FIELD(plan.righttree);
5127 36338 : COPY_NODE_FIELD(plan.initPlan);
5128 36338 : COPY_BITMAPSET_FIELD(plan.extParam);
5129 36338 : COPY_BITMAPSET_FIELD(plan.allParam);
5130 36338 : COPY_NODE_FIELD(hashkeys);
5131 36338 : COPY_SCALAR_FIELD(skewTable);
5132 36338 : COPY_SCALAR_FIELD(skewColumn);
5133 36338 : COPY_SCALAR_FIELD(skewInherit);
5134 36338 : COPY_SCALAR_FIELD(rows_total);
5135 :
5136 36338 : return newnode;
5137 : }
5138 :
5139 : static SetOp *
5140 662 : _copySetOp(const SetOp *from)
5141 : {
5142 662 : SetOp *newnode = makeNode(SetOp);
5143 :
5144 662 : COPY_SCALAR_FIELD(plan.disabled_nodes);
5145 662 : COPY_SCALAR_FIELD(plan.startup_cost);
5146 662 : COPY_SCALAR_FIELD(plan.total_cost);
5147 662 : COPY_SCALAR_FIELD(plan.plan_rows);
5148 662 : COPY_SCALAR_FIELD(plan.plan_width);
5149 662 : COPY_SCALAR_FIELD(plan.parallel_aware);
5150 662 : COPY_SCALAR_FIELD(plan.parallel_safe);
5151 662 : COPY_SCALAR_FIELD(plan.async_capable);
5152 662 : COPY_SCALAR_FIELD(plan.plan_node_id);
5153 662 : COPY_NODE_FIELD(plan.targetlist);
5154 662 : COPY_NODE_FIELD(plan.qual);
5155 662 : COPY_NODE_FIELD(plan.lefttree);
5156 662 : COPY_NODE_FIELD(plan.righttree);
5157 662 : COPY_NODE_FIELD(plan.initPlan);
5158 662 : COPY_BITMAPSET_FIELD(plan.extParam);
5159 662 : COPY_BITMAPSET_FIELD(plan.allParam);
5160 662 : COPY_SCALAR_FIELD(cmd);
5161 662 : COPY_SCALAR_FIELD(strategy);
5162 662 : COPY_SCALAR_FIELD(numCols);
5163 662 : COPY_POINTER_FIELD(cmpColIdx, from->numCols * sizeof(AttrNumber));
5164 662 : COPY_POINTER_FIELD(cmpOperators, from->numCols * sizeof(Oid));
5165 662 : COPY_POINTER_FIELD(cmpCollations, from->numCols * sizeof(Oid));
5166 662 : COPY_POINTER_FIELD(cmpNullsFirst, from->numCols * sizeof(bool));
5167 662 : COPY_SCALAR_FIELD(numGroups);
5168 :
5169 662 : return newnode;
5170 : }
5171 :
5172 : static LockRows *
5173 13676 : _copyLockRows(const LockRows *from)
5174 : {
5175 13676 : LockRows *newnode = makeNode(LockRows);
5176 :
5177 13676 : COPY_SCALAR_FIELD(plan.disabled_nodes);
5178 13676 : COPY_SCALAR_FIELD(plan.startup_cost);
5179 13676 : COPY_SCALAR_FIELD(plan.total_cost);
5180 13676 : COPY_SCALAR_FIELD(plan.plan_rows);
5181 13676 : COPY_SCALAR_FIELD(plan.plan_width);
5182 13676 : COPY_SCALAR_FIELD(plan.parallel_aware);
5183 13676 : COPY_SCALAR_FIELD(plan.parallel_safe);
5184 13676 : COPY_SCALAR_FIELD(plan.async_capable);
5185 13676 : COPY_SCALAR_FIELD(plan.plan_node_id);
5186 13676 : COPY_NODE_FIELD(plan.targetlist);
5187 13676 : COPY_NODE_FIELD(plan.qual);
5188 13676 : COPY_NODE_FIELD(plan.lefttree);
5189 13676 : COPY_NODE_FIELD(plan.righttree);
5190 13676 : COPY_NODE_FIELD(plan.initPlan);
5191 13676 : COPY_BITMAPSET_FIELD(plan.extParam);
5192 13676 : COPY_BITMAPSET_FIELD(plan.allParam);
5193 13676 : COPY_NODE_FIELD(rowMarks);
5194 13676 : COPY_SCALAR_FIELD(epqParam);
5195 :
5196 13676 : return newnode;
5197 : }
5198 :
5199 : static Limit *
5200 5266 : _copyLimit(const Limit *from)
5201 : {
5202 5266 : Limit *newnode = makeNode(Limit);
5203 :
5204 5266 : COPY_SCALAR_FIELD(plan.disabled_nodes);
5205 5266 : COPY_SCALAR_FIELD(plan.startup_cost);
5206 5266 : COPY_SCALAR_FIELD(plan.total_cost);
5207 5266 : COPY_SCALAR_FIELD(plan.plan_rows);
5208 5266 : COPY_SCALAR_FIELD(plan.plan_width);
5209 5266 : COPY_SCALAR_FIELD(plan.parallel_aware);
5210 5266 : COPY_SCALAR_FIELD(plan.parallel_safe);
5211 5266 : COPY_SCALAR_FIELD(plan.async_capable);
5212 5266 : COPY_SCALAR_FIELD(plan.plan_node_id);
5213 5266 : COPY_NODE_FIELD(plan.targetlist);
5214 5266 : COPY_NODE_FIELD(plan.qual);
5215 5266 : COPY_NODE_FIELD(plan.lefttree);
5216 5266 : COPY_NODE_FIELD(plan.righttree);
5217 5266 : COPY_NODE_FIELD(plan.initPlan);
5218 5266 : COPY_BITMAPSET_FIELD(plan.extParam);
5219 5266 : COPY_BITMAPSET_FIELD(plan.allParam);
5220 5266 : COPY_NODE_FIELD(limitOffset);
5221 5266 : COPY_NODE_FIELD(limitCount);
5222 5266 : COPY_SCALAR_FIELD(limitOption);
5223 5266 : COPY_SCALAR_FIELD(uniqNumCols);
5224 5266 : COPY_POINTER_FIELD(uniqColIdx, from->uniqNumCols * sizeof(AttrNumber));
5225 5266 : COPY_POINTER_FIELD(uniqOperators, from->uniqNumCols * sizeof(Oid));
5226 5266 : COPY_POINTER_FIELD(uniqCollations, from->uniqNumCols * sizeof(Oid));
5227 :
5228 5266 : return newnode;
5229 : }
5230 :
5231 : static PlanRowMark *
5232 41768 : _copyPlanRowMark(const PlanRowMark *from)
5233 : {
5234 41768 : PlanRowMark *newnode = makeNode(PlanRowMark);
5235 :
5236 41768 : COPY_SCALAR_FIELD(rti);
5237 41768 : COPY_SCALAR_FIELD(prti);
5238 41768 : COPY_SCALAR_FIELD(rowmarkId);
5239 41768 : COPY_SCALAR_FIELD(markType);
5240 41768 : COPY_SCALAR_FIELD(allMarkTypes);
5241 41768 : COPY_SCALAR_FIELD(strength);
5242 41768 : COPY_SCALAR_FIELD(waitPolicy);
5243 41768 : COPY_SCALAR_FIELD(isParent);
5244 :
5245 41768 : return newnode;
5246 : }
5247 :
5248 : static PartitionPruneInfo *
5249 732 : _copyPartitionPruneInfo(const PartitionPruneInfo *from)
5250 : {
5251 732 : PartitionPruneInfo *newnode = makeNode(PartitionPruneInfo);
5252 :
5253 732 : COPY_BITMAPSET_FIELD(relids);
5254 732 : COPY_NODE_FIELD(prune_infos);
5255 732 : COPY_BITMAPSET_FIELD(other_subplans);
5256 :
5257 732 : return newnode;
5258 : }
5259 :
5260 : static PartitionedRelPruneInfo *
5261 1356 : _copyPartitionedRelPruneInfo(const PartitionedRelPruneInfo *from)
5262 : {
5263 1356 : PartitionedRelPruneInfo *newnode = makeNode(PartitionedRelPruneInfo);
5264 :
5265 1356 : COPY_SCALAR_FIELD(rtindex);
5266 1356 : COPY_BITMAPSET_FIELD(present_parts);
5267 1356 : COPY_SCALAR_FIELD(nparts);
5268 1356 : COPY_POINTER_FIELD(subplan_map, from->nparts * sizeof(int));
5269 1356 : COPY_POINTER_FIELD(subpart_map, from->nparts * sizeof(int));
5270 1356 : COPY_POINTER_FIELD(leafpart_rti_map, from->nparts * sizeof(int));
5271 1356 : COPY_POINTER_FIELD(relid_map, from->nparts * sizeof(Oid));
5272 1356 : COPY_NODE_FIELD(initial_pruning_steps);
5273 1356 : COPY_NODE_FIELD(exec_pruning_steps);
5274 1356 : COPY_BITMAPSET_FIELD(execparamids);
5275 :
5276 1356 : return newnode;
5277 : }
5278 :
5279 : static PartitionPruneStepOp *
5280 1370 : _copyPartitionPruneStepOp(const PartitionPruneStepOp *from)
5281 : {
5282 1370 : PartitionPruneStepOp *newnode = makeNode(PartitionPruneStepOp);
5283 :
5284 1370 : COPY_SCALAR_FIELD(step.step_id);
5285 1370 : COPY_SCALAR_FIELD(opstrategy);
5286 1370 : COPY_NODE_FIELD(exprs);
5287 1370 : COPY_NODE_FIELD(cmpfns);
5288 1370 : COPY_BITMAPSET_FIELD(nullkeys);
5289 :
5290 1370 : return newnode;
5291 : }
5292 :
5293 : static PartitionPruneStepCombine *
5294 276 : _copyPartitionPruneStepCombine(const PartitionPruneStepCombine *from)
5295 : {
5296 276 : PartitionPruneStepCombine *newnode = makeNode(PartitionPruneStepCombine);
5297 :
5298 276 : COPY_SCALAR_FIELD(step.step_id);
5299 276 : COPY_SCALAR_FIELD(combineOp);
5300 276 : COPY_NODE_FIELD(source_stepids);
5301 :
5302 276 : return newnode;
5303 : }
5304 :
5305 : static PlanInvalItem *
5306 60016 : _copyPlanInvalItem(const PlanInvalItem *from)
5307 : {
5308 60016 : PlanInvalItem *newnode = makeNode(PlanInvalItem);
5309 :
5310 60016 : COPY_SCALAR_FIELD(cacheId);
5311 60016 : COPY_SCALAR_FIELD(hashValue);
5312 :
5313 60016 : return newnode;
5314 : }
5315 :
5316 : static Integer *
5317 42186 : _copyInteger(const Integer *from)
5318 : {
5319 42186 : Integer *newnode = makeNode(Integer);
5320 :
5321 42186 : COPY_SCALAR_FIELD(ival);
5322 :
5323 42186 : return newnode;
5324 : }
5325 :
5326 : static Float *
5327 284 : _copyFloat(const Float *from)
5328 : {
5329 284 : Float *newnode = makeNode(Float);
5330 :
5331 284 : COPY_STRING_FIELD(fval);
5332 :
5333 284 : return newnode;
5334 : }
5335 :
5336 : static Boolean *
5337 33682 : _copyBoolean(const Boolean *from)
5338 : {
5339 33682 : Boolean *newnode = makeNode(Boolean);
5340 :
5341 33682 : COPY_SCALAR_FIELD(boolval);
5342 :
5343 33682 : return newnode;
5344 : }
5345 :
5346 : static String *
5347 31677508 : _copyString(const String *from)
5348 : {
5349 31677508 : String *newnode = makeNode(String);
5350 :
5351 31677508 : COPY_STRING_FIELD(sval);
5352 :
5353 31677508 : return newnode;
5354 : }
5355 :
5356 : static BitString *
5357 0 : _copyBitString(const BitString *from)
5358 : {
5359 0 : BitString *newnode = makeNode(BitString);
5360 :
5361 0 : COPY_STRING_FIELD(bsval);
5362 :
5363 0 : return newnode;
5364 : }
5365 :
5366 : static ForeignKeyCacheInfo *
5367 4342 : _copyForeignKeyCacheInfo(const ForeignKeyCacheInfo *from)
5368 : {
5369 4342 : ForeignKeyCacheInfo *newnode = makeNode(ForeignKeyCacheInfo);
5370 :
5371 4342 : COPY_SCALAR_FIELD(conoid);
5372 4342 : COPY_SCALAR_FIELD(conrelid);
5373 4342 : COPY_SCALAR_FIELD(confrelid);
5374 4342 : COPY_SCALAR_FIELD(nkeys);
5375 4342 : COPY_SCALAR_FIELD(conenforced);
5376 4342 : COPY_ARRAY_FIELD(conkey);
5377 4342 : COPY_ARRAY_FIELD(confkey);
5378 4342 : COPY_ARRAY_FIELD(conpfeqop);
5379 :
5380 4342 : return newnode;
5381 : }
|