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