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