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