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