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