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 2478116 : _copyAlias(const Alias *from)
44 : {
45 2478116 : Alias *newnode = makeNode(Alias);
46 :
47 2478116 : COPY_STRING_FIELD(aliasname);
48 2478116 : COPY_NODE_FIELD(colnames);
49 :
50 2478116 : return newnode;
51 : }
52 :
53 : static RangeVar *
54 628026 : _copyRangeVar(const RangeVar *from)
55 : {
56 628026 : RangeVar *newnode = makeNode(RangeVar);
57 :
58 628026 : COPY_STRING_FIELD(catalogname);
59 628026 : COPY_STRING_FIELD(schemaname);
60 628026 : COPY_STRING_FIELD(relname);
61 628026 : COPY_SCALAR_FIELD(inh);
62 628026 : COPY_SCALAR_FIELD(relpersistence);
63 628026 : COPY_NODE_FIELD(alias);
64 628026 : COPY_LOCATION_FIELD(location);
65 :
66 628026 : 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 2783 : _copyIntoClause(const IntoClause *from)
97 : {
98 2783 : IntoClause *newnode = makeNode(IntoClause);
99 :
100 2783 : COPY_NODE_FIELD(rel);
101 2783 : COPY_NODE_FIELD(colNames);
102 2783 : COPY_STRING_FIELD(accessMethod);
103 2783 : COPY_NODE_FIELD(options);
104 2783 : COPY_SCALAR_FIELD(onCommit);
105 2783 : COPY_STRING_FIELD(tableSpaceName);
106 2783 : COPY_NODE_FIELD(viewQuery);
107 2783 : COPY_SCALAR_FIELD(skipData);
108 :
109 2783 : return newnode;
110 : }
111 :
112 : static Var *
113 15152441 : _copyVar(const Var *from)
114 : {
115 15152441 : Var *newnode = makeNode(Var);
116 :
117 15152441 : COPY_SCALAR_FIELD(varno);
118 15152441 : COPY_SCALAR_FIELD(varattno);
119 15152441 : COPY_SCALAR_FIELD(vartype);
120 15152441 : COPY_SCALAR_FIELD(vartypmod);
121 15152441 : COPY_SCALAR_FIELD(varcollid);
122 15152441 : COPY_BITMAPSET_FIELD(varnullingrels);
123 15152441 : COPY_SCALAR_FIELD(varlevelsup);
124 15152441 : COPY_SCALAR_FIELD(varreturningtype);
125 15152441 : COPY_SCALAR_FIELD(varnosyn);
126 15152441 : COPY_SCALAR_FIELD(varattnosyn);
127 15152441 : COPY_LOCATION_FIELD(location);
128 :
129 15152441 : return newnode;
130 : }
131 :
132 : static Param *
133 540453 : _copyParam(const Param *from)
134 : {
135 540453 : Param *newnode = makeNode(Param);
136 :
137 540453 : COPY_SCALAR_FIELD(paramkind);
138 540453 : COPY_SCALAR_FIELD(paramid);
139 540453 : COPY_SCALAR_FIELD(paramtype);
140 540453 : COPY_SCALAR_FIELD(paramtypmod);
141 540453 : COPY_SCALAR_FIELD(paramcollid);
142 540453 : COPY_LOCATION_FIELD(location);
143 :
144 540453 : return newnode;
145 : }
146 :
147 : static Aggref *
148 159917 : _copyAggref(const Aggref *from)
149 : {
150 159917 : Aggref *newnode = makeNode(Aggref);
151 :
152 159917 : COPY_SCALAR_FIELD(aggfnoid);
153 159917 : COPY_SCALAR_FIELD(aggtype);
154 159917 : COPY_SCALAR_FIELD(aggcollid);
155 159917 : COPY_SCALAR_FIELD(inputcollid);
156 159917 : COPY_SCALAR_FIELD(aggtranstype);
157 159917 : COPY_NODE_FIELD(aggargtypes);
158 159917 : COPY_NODE_FIELD(aggdirectargs);
159 159917 : COPY_NODE_FIELD(args);
160 159917 : COPY_NODE_FIELD(aggorder);
161 159917 : COPY_NODE_FIELD(aggdistinct);
162 159917 : COPY_NODE_FIELD(aggfilter);
163 159917 : COPY_SCALAR_FIELD(aggstar);
164 159917 : COPY_SCALAR_FIELD(aggvariadic);
165 159917 : COPY_SCALAR_FIELD(aggkind);
166 159917 : COPY_SCALAR_FIELD(aggpresorted);
167 159917 : COPY_SCALAR_FIELD(agglevelsup);
168 159917 : COPY_SCALAR_FIELD(aggsplit);
169 159917 : COPY_SCALAR_FIELD(aggno);
170 159917 : COPY_SCALAR_FIELD(aggtransno);
171 159917 : COPY_LOCATION_FIELD(location);
172 :
173 159917 : 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 6891 : _copyWindowFunc(const WindowFunc *from)
192 : {
193 6891 : WindowFunc *newnode = makeNode(WindowFunc);
194 :
195 6891 : COPY_SCALAR_FIELD(winfnoid);
196 6891 : COPY_SCALAR_FIELD(wintype);
197 6891 : COPY_SCALAR_FIELD(wincollid);
198 6891 : COPY_SCALAR_FIELD(inputcollid);
199 6891 : COPY_NODE_FIELD(args);
200 6891 : COPY_NODE_FIELD(aggfilter);
201 6891 : COPY_NODE_FIELD(runCondition);
202 6891 : COPY_SCALAR_FIELD(winref);
203 6891 : COPY_SCALAR_FIELD(winstar);
204 6891 : COPY_SCALAR_FIELD(winagg);
205 6891 : COPY_SCALAR_FIELD(ignore_nulls);
206 6891 : COPY_LOCATION_FIELD(location);
207 :
208 6891 : 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 55935 : _copySubscriptingRef(const SubscriptingRef *from)
238 : {
239 55935 : SubscriptingRef *newnode = makeNode(SubscriptingRef);
240 :
241 55935 : COPY_SCALAR_FIELD(refcontainertype);
242 55935 : COPY_SCALAR_FIELD(refelemtype);
243 55935 : COPY_SCALAR_FIELD(refrestype);
244 55935 : COPY_SCALAR_FIELD(reftypmod);
245 55935 : COPY_SCALAR_FIELD(refcollid);
246 55935 : COPY_NODE_FIELD(refupperindexpr);
247 55935 : COPY_NODE_FIELD(reflowerindexpr);
248 55935 : COPY_NODE_FIELD(refexpr);
249 55935 : COPY_NODE_FIELD(refassgnexpr);
250 :
251 55935 : return newnode;
252 : }
253 :
254 : static FuncExpr *
255 749829 : _copyFuncExpr(const FuncExpr *from)
256 : {
257 749829 : FuncExpr *newnode = makeNode(FuncExpr);
258 :
259 749829 : COPY_SCALAR_FIELD(funcid);
260 749829 : COPY_SCALAR_FIELD(funcresulttype);
261 749829 : COPY_SCALAR_FIELD(funcretset);
262 749829 : COPY_SCALAR_FIELD(funcvariadic);
263 749829 : COPY_SCALAR_FIELD(funcformat);
264 749829 : COPY_SCALAR_FIELD(funccollid);
265 749829 : COPY_SCALAR_FIELD(inputcollid);
266 749829 : COPY_NODE_FIELD(args);
267 749829 : COPY_LOCATION_FIELD(location);
268 :
269 749829 : return newnode;
270 : }
271 :
272 : static NamedArgExpr *
273 53924 : _copyNamedArgExpr(const NamedArgExpr *from)
274 : {
275 53924 : NamedArgExpr *newnode = makeNode(NamedArgExpr);
276 :
277 53924 : COPY_NODE_FIELD(arg);
278 53924 : COPY_STRING_FIELD(name);
279 53924 : COPY_SCALAR_FIELD(argnumber);
280 53924 : COPY_LOCATION_FIELD(location);
281 :
282 53924 : return newnode;
283 : }
284 :
285 : static OpExpr *
286 1563147 : _copyOpExpr(const OpExpr *from)
287 : {
288 1563147 : OpExpr *newnode = makeNode(OpExpr);
289 :
290 1563147 : COPY_SCALAR_FIELD(opno);
291 1563147 : COPY_SCALAR_FIELD(opfuncid);
292 1563147 : COPY_SCALAR_FIELD(opresulttype);
293 1563147 : COPY_SCALAR_FIELD(opretset);
294 1563147 : COPY_SCALAR_FIELD(opcollid);
295 1563147 : COPY_SCALAR_FIELD(inputcollid);
296 1563147 : COPY_NODE_FIELD(args);
297 1563147 : COPY_LOCATION_FIELD(location);
298 :
299 1563147 : return newnode;
300 : }
301 :
302 : static DistinctExpr *
303 1801 : _copyDistinctExpr(const DistinctExpr *from)
304 : {
305 1801 : DistinctExpr *newnode = makeNode(DistinctExpr);
306 :
307 1801 : COPY_SCALAR_FIELD(opno);
308 1801 : COPY_SCALAR_FIELD(opfuncid);
309 1801 : COPY_SCALAR_FIELD(opresulttype);
310 1801 : COPY_SCALAR_FIELD(opretset);
311 1801 : COPY_SCALAR_FIELD(opcollid);
312 1801 : COPY_SCALAR_FIELD(inputcollid);
313 1801 : COPY_NODE_FIELD(args);
314 1801 : COPY_LOCATION_FIELD(location);
315 :
316 1801 : 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 68709 : _copyScalarArrayOpExpr(const ScalarArrayOpExpr *from)
338 : {
339 68709 : ScalarArrayOpExpr *newnode = makeNode(ScalarArrayOpExpr);
340 :
341 68709 : COPY_SCALAR_FIELD(opno);
342 68709 : COPY_SCALAR_FIELD(opfuncid);
343 68709 : COPY_SCALAR_FIELD(hashfuncid);
344 68709 : COPY_SCALAR_FIELD(negfuncid);
345 68709 : COPY_SCALAR_FIELD(useOr);
346 68709 : COPY_SCALAR_FIELD(inputcollid);
347 68709 : COPY_NODE_FIELD(args);
348 68709 : COPY_LOCATION_FIELD(location);
349 :
350 68709 : return newnode;
351 : }
352 :
353 : static BoolExpr *
354 406096 : _copyBoolExpr(const BoolExpr *from)
355 : {
356 406096 : BoolExpr *newnode = makeNode(BoolExpr);
357 :
358 406096 : COPY_SCALAR_FIELD(boolop);
359 406096 : COPY_NODE_FIELD(args);
360 406096 : COPY_LOCATION_FIELD(location);
361 :
362 406096 : return newnode;
363 : }
364 :
365 : static SubLink *
366 89409 : _copySubLink(const SubLink *from)
367 : {
368 89409 : SubLink *newnode = makeNode(SubLink);
369 :
370 89409 : COPY_SCALAR_FIELD(subLinkType);
371 89409 : COPY_SCALAR_FIELD(subLinkId);
372 89409 : COPY_NODE_FIELD(testexpr);
373 89409 : COPY_NODE_FIELD(operName);
374 89409 : COPY_NODE_FIELD(subselect);
375 89409 : COPY_LOCATION_FIELD(location);
376 :
377 89409 : return newnode;
378 : }
379 :
380 : static SubPlan *
381 33941 : _copySubPlan(const SubPlan *from)
382 : {
383 33941 : SubPlan *newnode = makeNode(SubPlan);
384 :
385 33941 : COPY_SCALAR_FIELD(subLinkType);
386 33941 : COPY_NODE_FIELD(testexpr);
387 33941 : COPY_NODE_FIELD(paramIds);
388 33941 : COPY_SCALAR_FIELD(plan_id);
389 33941 : COPY_STRING_FIELD(plan_name);
390 33941 : COPY_SCALAR_FIELD(firstColType);
391 33941 : COPY_SCALAR_FIELD(firstColTypmod);
392 33941 : COPY_SCALAR_FIELD(firstColCollation);
393 33941 : COPY_SCALAR_FIELD(isInitPlan);
394 33941 : COPY_SCALAR_FIELD(useHashTable);
395 33941 : COPY_SCALAR_FIELD(unknownEqFalse);
396 33941 : COPY_SCALAR_FIELD(parallel_safe);
397 33941 : COPY_NODE_FIELD(setParam);
398 33941 : COPY_NODE_FIELD(parParam);
399 33941 : COPY_NODE_FIELD(args);
400 33941 : COPY_SCALAR_FIELD(disabled_nodes);
401 33941 : COPY_SCALAR_FIELD(startup_cost);
402 33941 : COPY_SCALAR_FIELD(per_call_cost);
403 :
404 33941 : 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 141246 : _copyFieldSelect(const FieldSelect *from)
419 : {
420 141246 : FieldSelect *newnode = makeNode(FieldSelect);
421 :
422 141246 : COPY_NODE_FIELD(arg);
423 141246 : COPY_SCALAR_FIELD(fieldnum);
424 141246 : COPY_SCALAR_FIELD(resulttype);
425 141246 : COPY_SCALAR_FIELD(resulttypmod);
426 141246 : COPY_SCALAR_FIELD(resultcollid);
427 :
428 141246 : 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 260954 : _copyRelabelType(const RelabelType *from)
446 : {
447 260954 : RelabelType *newnode = makeNode(RelabelType);
448 :
449 260954 : COPY_NODE_FIELD(arg);
450 260954 : COPY_SCALAR_FIELD(resulttype);
451 260954 : COPY_SCALAR_FIELD(resulttypmod);
452 260954 : COPY_SCALAR_FIELD(resultcollid);
453 260954 : COPY_SCALAR_FIELD(relabelformat);
454 260954 : COPY_LOCATION_FIELD(location);
455 :
456 260954 : return newnode;
457 : }
458 :
459 : static CoerceViaIO *
460 68345 : _copyCoerceViaIO(const CoerceViaIO *from)
461 : {
462 68345 : CoerceViaIO *newnode = makeNode(CoerceViaIO);
463 :
464 68345 : COPY_NODE_FIELD(arg);
465 68345 : COPY_SCALAR_FIELD(resulttype);
466 68345 : COPY_SCALAR_FIELD(resultcollid);
467 68345 : COPY_SCALAR_FIELD(coerceformat);
468 68345 : COPY_LOCATION_FIELD(location);
469 :
470 68345 : return newnode;
471 : }
472 :
473 : static ArrayCoerceExpr *
474 11207 : _copyArrayCoerceExpr(const ArrayCoerceExpr *from)
475 : {
476 11207 : ArrayCoerceExpr *newnode = makeNode(ArrayCoerceExpr);
477 :
478 11207 : COPY_NODE_FIELD(arg);
479 11207 : COPY_NODE_FIELD(elemexpr);
480 11207 : COPY_SCALAR_FIELD(resulttype);
481 11207 : COPY_SCALAR_FIELD(resulttypmod);
482 11207 : COPY_SCALAR_FIELD(resultcollid);
483 11207 : COPY_SCALAR_FIELD(coerceformat);
484 11207 : COPY_LOCATION_FIELD(location);
485 :
486 11207 : 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 9134 : _copyCollateExpr(const CollateExpr *from)
504 : {
505 9134 : CollateExpr *newnode = makeNode(CollateExpr);
506 :
507 9134 : COPY_NODE_FIELD(arg);
508 9134 : COPY_SCALAR_FIELD(collOid);
509 9134 : COPY_LOCATION_FIELD(location);
510 :
511 9134 : return newnode;
512 : }
513 :
514 : static CaseExpr *
515 130442 : _copyCaseExpr(const CaseExpr *from)
516 : {
517 130442 : CaseExpr *newnode = makeNode(CaseExpr);
518 :
519 130442 : COPY_SCALAR_FIELD(casetype);
520 130442 : COPY_SCALAR_FIELD(casecollid);
521 130442 : COPY_NODE_FIELD(arg);
522 130442 : COPY_NODE_FIELD(args);
523 130442 : COPY_NODE_FIELD(defresult);
524 130442 : COPY_LOCATION_FIELD(location);
525 :
526 130442 : return newnode;
527 : }
528 :
529 : static CaseWhen *
530 302684 : _copyCaseWhen(const CaseWhen *from)
531 : {
532 302684 : CaseWhen *newnode = makeNode(CaseWhen);
533 :
534 302684 : COPY_NODE_FIELD(expr);
535 302684 : COPY_NODE_FIELD(result);
536 302684 : COPY_LOCATION_FIELD(location);
537 :
538 302684 : return newnode;
539 : }
540 :
541 : static CaseTestExpr *
542 108495 : _copyCaseTestExpr(const CaseTestExpr *from)
543 : {
544 108495 : CaseTestExpr *newnode = makeNode(CaseTestExpr);
545 :
546 108495 : COPY_SCALAR_FIELD(typeId);
547 108495 : COPY_SCALAR_FIELD(typeMod);
548 108495 : COPY_SCALAR_FIELD(collation);
549 :
550 108495 : return newnode;
551 : }
552 :
553 : static ArrayExpr *
554 37839 : _copyArrayExpr(const ArrayExpr *from)
555 : {
556 37839 : ArrayExpr *newnode = makeNode(ArrayExpr);
557 :
558 37839 : COPY_SCALAR_FIELD(array_typeid);
559 37839 : COPY_SCALAR_FIELD(array_collid);
560 37839 : COPY_SCALAR_FIELD(element_typeid);
561 37839 : COPY_NODE_FIELD(elements);
562 37839 : COPY_SCALAR_FIELD(multidims);
563 37839 : COPY_LOCATION_FIELD(list_start);
564 37839 : COPY_LOCATION_FIELD(list_end);
565 37839 : COPY_LOCATION_FIELD(location);
566 :
567 37839 : return newnode;
568 : }
569 :
570 : static RowExpr *
571 12989 : _copyRowExpr(const RowExpr *from)
572 : {
573 12989 : RowExpr *newnode = makeNode(RowExpr);
574 :
575 12989 : COPY_NODE_FIELD(args);
576 12989 : COPY_SCALAR_FIELD(row_typeid);
577 12989 : COPY_SCALAR_FIELD(row_format);
578 12989 : COPY_NODE_FIELD(colnames);
579 12989 : COPY_LOCATION_FIELD(location);
580 :
581 12989 : 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 17035 : _copyCoalesceExpr(const CoalesceExpr *from)
601 : {
602 17035 : CoalesceExpr *newnode = makeNode(CoalesceExpr);
603 :
604 17035 : COPY_SCALAR_FIELD(coalescetype);
605 17035 : COPY_SCALAR_FIELD(coalescecollid);
606 17035 : COPY_NODE_FIELD(args);
607 17035 : COPY_LOCATION_FIELD(location);
608 :
609 17035 : return newnode;
610 : }
611 :
612 : static MinMaxExpr *
613 1352 : _copyMinMaxExpr(const MinMaxExpr *from)
614 : {
615 1352 : MinMaxExpr *newnode = makeNode(MinMaxExpr);
616 :
617 1352 : COPY_SCALAR_FIELD(minmaxtype);
618 1352 : COPY_SCALAR_FIELD(minmaxcollid);
619 1352 : COPY_SCALAR_FIELD(inputcollid);
620 1352 : COPY_SCALAR_FIELD(op);
621 1352 : COPY_NODE_FIELD(args);
622 1352 : COPY_LOCATION_FIELD(location);
623 :
624 1352 : return newnode;
625 : }
626 :
627 : static SQLValueFunction *
628 22928 : _copySQLValueFunction(const SQLValueFunction *from)
629 : {
630 22928 : SQLValueFunction *newnode = makeNode(SQLValueFunction);
631 :
632 22928 : COPY_SCALAR_FIELD(op);
633 22928 : COPY_SCALAR_FIELD(type);
634 22928 : COPY_SCALAR_FIELD(typmod);
635 22928 : COPY_LOCATION_FIELD(location);
636 :
637 22928 : return newnode;
638 : }
639 :
640 : static XmlExpr *
641 1655 : _copyXmlExpr(const XmlExpr *from)
642 : {
643 1655 : XmlExpr *newnode = makeNode(XmlExpr);
644 :
645 1655 : COPY_SCALAR_FIELD(op);
646 1655 : COPY_STRING_FIELD(name);
647 1655 : COPY_NODE_FIELD(named_args);
648 1655 : COPY_NODE_FIELD(arg_names);
649 1655 : COPY_NODE_FIELD(args);
650 1655 : COPY_SCALAR_FIELD(xmloption);
651 1655 : COPY_SCALAR_FIELD(indent);
652 1655 : COPY_SCALAR_FIELD(type);
653 1655 : COPY_SCALAR_FIELD(typmod);
654 1655 : COPY_LOCATION_FIELD(location);
655 :
656 1655 : return newnode;
657 : }
658 :
659 : static JsonFormat *
660 23364 : _copyJsonFormat(const JsonFormat *from)
661 : {
662 23364 : JsonFormat *newnode = makeNode(JsonFormat);
663 :
664 23364 : COPY_SCALAR_FIELD(format_type);
665 23364 : COPY_SCALAR_FIELD(encoding);
666 23364 : COPY_LOCATION_FIELD(location);
667 :
668 23364 : return newnode;
669 : }
670 :
671 : static JsonReturning *
672 9915 : _copyJsonReturning(const JsonReturning *from)
673 : {
674 9915 : JsonReturning *newnode = makeNode(JsonReturning);
675 :
676 9915 : COPY_NODE_FIELD(format);
677 9915 : COPY_SCALAR_FIELD(typid);
678 9915 : COPY_SCALAR_FIELD(typmod);
679 :
680 9915 : 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 2313 : _copyJsonConstructorExpr(const JsonConstructorExpr *from)
697 : {
698 2313 : JsonConstructorExpr *newnode = makeNode(JsonConstructorExpr);
699 :
700 2313 : COPY_SCALAR_FIELD(type);
701 2313 : COPY_NODE_FIELD(args);
702 2313 : COPY_NODE_FIELD(func);
703 2313 : COPY_NODE_FIELD(coercion);
704 2313 : COPY_NODE_FIELD(returning);
705 2313 : COPY_NODE_FIELD(orig_query);
706 2313 : COPY_SCALAR_FIELD(absent_on_null);
707 2313 : COPY_SCALAR_FIELD(unique);
708 2313 : COPY_LOCATION_FIELD(location);
709 :
710 2313 : 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 64853 : _copyNullTest(const NullTest *from)
804 : {
805 64853 : NullTest *newnode = makeNode(NullTest);
806 :
807 64853 : COPY_NODE_FIELD(arg);
808 64853 : COPY_SCALAR_FIELD(nulltesttype);
809 64853 : COPY_SCALAR_FIELD(argisrow);
810 64853 : COPY_LOCATION_FIELD(location);
811 :
812 64853 : return newnode;
813 : }
814 :
815 : static BooleanTest *
816 3423 : _copyBooleanTest(const BooleanTest *from)
817 : {
818 3423 : BooleanTest *newnode = makeNode(BooleanTest);
819 :
820 3423 : COPY_NODE_FIELD(arg);
821 3423 : COPY_SCALAR_FIELD(booltesttype);
822 3423 : COPY_LOCATION_FIELD(location);
823 :
824 3423 : return newnode;
825 : }
826 :
827 : static MergeAction *
828 6546 : _copyMergeAction(const MergeAction *from)
829 : {
830 6546 : MergeAction *newnode = makeNode(MergeAction);
831 :
832 6546 : COPY_SCALAR_FIELD(matchKind);
833 6546 : COPY_SCALAR_FIELD(commandType);
834 6546 : COPY_SCALAR_FIELD(override);
835 6546 : COPY_NODE_FIELD(qual);
836 6546 : COPY_NODE_FIELD(targetList);
837 6546 : COPY_NODE_FIELD(updateColnos);
838 :
839 6546 : 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 2830 : _copyCoerceToDomainValue(const CoerceToDomainValue *from)
859 : {
860 2830 : CoerceToDomainValue *newnode = makeNode(CoerceToDomainValue);
861 :
862 2830 : COPY_SCALAR_FIELD(typeId);
863 2830 : COPY_SCALAR_FIELD(typeMod);
864 2830 : COPY_SCALAR_FIELD(collation);
865 2830 : COPY_LOCATION_FIELD(location);
866 :
867 2830 : return newnode;
868 : }
869 :
870 : static SetToDefault *
871 1363 : _copySetToDefault(const SetToDefault *from)
872 : {
873 1363 : SetToDefault *newnode = makeNode(SetToDefault);
874 :
875 1363 : COPY_SCALAR_FIELD(typeId);
876 1363 : COPY_SCALAR_FIELD(typeMod);
877 1363 : COPY_SCALAR_FIELD(collation);
878 1363 : COPY_LOCATION_FIELD(location);
879 :
880 1363 : 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 67 : _copyGraphLabelRef(const GraphLabelRef *from)
932 : {
933 67 : GraphLabelRef *newnode = makeNode(GraphLabelRef);
934 :
935 67 : COPY_SCALAR_FIELD(labelid);
936 67 : COPY_LOCATION_FIELD(location);
937 :
938 67 : return newnode;
939 : }
940 :
941 : static GraphPropertyRef *
942 42 : _copyGraphPropertyRef(const GraphPropertyRef *from)
943 : {
944 42 : GraphPropertyRef *newnode = makeNode(GraphPropertyRef);
945 :
946 42 : COPY_STRING_FIELD(elvarname);
947 42 : COPY_SCALAR_FIELD(propid);
948 42 : COPY_SCALAR_FIELD(typeId);
949 42 : COPY_SCALAR_FIELD(typmod);
950 42 : COPY_SCALAR_FIELD(collation);
951 42 : COPY_LOCATION_FIELD(location);
952 :
953 42 : return newnode;
954 : }
955 :
956 : static TargetEntry *
957 6174394 : _copyTargetEntry(const TargetEntry *from)
958 : {
959 6174394 : TargetEntry *newnode = makeNode(TargetEntry);
960 :
961 6174394 : COPY_NODE_FIELD(expr);
962 6174394 : COPY_SCALAR_FIELD(resno);
963 6174394 : COPY_STRING_FIELD(resname);
964 6174394 : COPY_SCALAR_FIELD(ressortgroupref);
965 6174394 : COPY_SCALAR_FIELD(resorigtbl);
966 6174394 : COPY_SCALAR_FIELD(resorigcol);
967 6174394 : COPY_SCALAR_FIELD(resjunk);
968 :
969 6174394 : return newnode;
970 : }
971 :
972 : static RangeTblRef *
973 717859 : _copyRangeTblRef(const RangeTblRef *from)
974 : {
975 717859 : RangeTblRef *newnode = makeNode(RangeTblRef);
976 :
977 717859 : COPY_SCALAR_FIELD(rtindex);
978 :
979 717859 : return newnode;
980 : }
981 :
982 : static JoinExpr *
983 194638 : _copyJoinExpr(const JoinExpr *from)
984 : {
985 194638 : JoinExpr *newnode = makeNode(JoinExpr);
986 :
987 194638 : COPY_SCALAR_FIELD(jointype);
988 194638 : COPY_SCALAR_FIELD(isNatural);
989 194638 : COPY_NODE_FIELD(larg);
990 194638 : COPY_NODE_FIELD(rarg);
991 194638 : COPY_NODE_FIELD(usingClause);
992 194638 : COPY_NODE_FIELD(join_using_alias);
993 194638 : COPY_NODE_FIELD(quals);
994 194638 : COPY_NODE_FIELD(alias);
995 194638 : COPY_SCALAR_FIELD(rtindex);
996 :
997 194638 : return newnode;
998 : }
999 :
1000 : static FromExpr *
1001 687864 : _copyFromExpr(const FromExpr *from)
1002 : {
1003 687864 : FromExpr *newnode = makeNode(FromExpr);
1004 :
1005 687864 : COPY_NODE_FIELD(fromlist);
1006 687864 : COPY_NODE_FIELD(quals);
1007 :
1008 687864 : 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 945545 : _copyQuery(const Query *from)
1052 : {
1053 945545 : Query *newnode = makeNode(Query);
1054 :
1055 945545 : COPY_SCALAR_FIELD(commandType);
1056 945545 : COPY_SCALAR_FIELD(querySource);
1057 945545 : COPY_SCALAR_FIELD(queryId);
1058 945545 : COPY_SCALAR_FIELD(canSetTag);
1059 945545 : COPY_NODE_FIELD(utilityStmt);
1060 945545 : COPY_SCALAR_FIELD(resultRelation);
1061 945545 : COPY_NODE_FIELD(forPortionOf);
1062 945545 : COPY_SCALAR_FIELD(hasAggs);
1063 945545 : COPY_SCALAR_FIELD(hasWindowFuncs);
1064 945545 : COPY_SCALAR_FIELD(hasTargetSRFs);
1065 945545 : COPY_SCALAR_FIELD(hasSubLinks);
1066 945545 : COPY_SCALAR_FIELD(hasDistinctOn);
1067 945545 : COPY_SCALAR_FIELD(hasRecursive);
1068 945545 : COPY_SCALAR_FIELD(hasModifyingCTE);
1069 945545 : COPY_SCALAR_FIELD(hasForUpdate);
1070 945545 : COPY_SCALAR_FIELD(hasRowSecurity);
1071 945545 : COPY_SCALAR_FIELD(hasGroupRTE);
1072 945545 : COPY_SCALAR_FIELD(isReturn);
1073 945545 : COPY_NODE_FIELD(cteList);
1074 945545 : COPY_NODE_FIELD(rtable);
1075 945545 : COPY_NODE_FIELD(rteperminfos);
1076 945545 : COPY_NODE_FIELD(jointree);
1077 945545 : COPY_NODE_FIELD(mergeActionList);
1078 945545 : COPY_SCALAR_FIELD(mergeTargetRelation);
1079 945545 : COPY_NODE_FIELD(mergeJoinCondition);
1080 945545 : COPY_NODE_FIELD(targetList);
1081 945545 : COPY_SCALAR_FIELD(override);
1082 945545 : COPY_NODE_FIELD(onConflict);
1083 945545 : COPY_STRING_FIELD(returningOldAlias);
1084 945545 : COPY_STRING_FIELD(returningNewAlias);
1085 945545 : COPY_NODE_FIELD(returningList);
1086 945545 : COPY_NODE_FIELD(groupClause);
1087 945545 : COPY_SCALAR_FIELD(groupDistinct);
1088 945545 : COPY_SCALAR_FIELD(groupByAll);
1089 945545 : COPY_NODE_FIELD(groupingSets);
1090 945545 : COPY_NODE_FIELD(havingQual);
1091 945545 : COPY_NODE_FIELD(windowClause);
1092 945545 : COPY_NODE_FIELD(distinctClause);
1093 945545 : COPY_NODE_FIELD(sortClause);
1094 945545 : COPY_NODE_FIELD(limitOffset);
1095 945545 : COPY_NODE_FIELD(limitCount);
1096 945545 : COPY_SCALAR_FIELD(limitOption);
1097 945545 : COPY_NODE_FIELD(rowMarks);
1098 945545 : COPY_NODE_FIELD(setOperations);
1099 945545 : COPY_NODE_FIELD(constraintDeps);
1100 945545 : COPY_NODE_FIELD(withCheckOptions);
1101 945545 : COPY_LOCATION_FIELD(stmt_location);
1102 945545 : COPY_LOCATION_FIELD(stmt_len);
1103 :
1104 945545 : return newnode;
1105 : }
1106 :
1107 : static TypeName *
1108 499703 : _copyTypeName(const TypeName *from)
1109 : {
1110 499703 : TypeName *newnode = makeNode(TypeName);
1111 :
1112 499703 : COPY_NODE_FIELD(names);
1113 499703 : COPY_SCALAR_FIELD(typeOid);
1114 499703 : COPY_SCALAR_FIELD(setof);
1115 499703 : COPY_SCALAR_FIELD(pct_type);
1116 499703 : COPY_NODE_FIELD(typmods);
1117 499703 : COPY_SCALAR_FIELD(typemod);
1118 499703 : COPY_NODE_FIELD(arrayBounds);
1119 499703 : COPY_LOCATION_FIELD(location);
1120 :
1121 499703 : return newnode;
1122 : }
1123 :
1124 : static ColumnRef *
1125 1466643 : _copyColumnRef(const ColumnRef *from)
1126 : {
1127 1466643 : ColumnRef *newnode = makeNode(ColumnRef);
1128 :
1129 1466643 : COPY_NODE_FIELD(fields);
1130 1466643 : COPY_LOCATION_FIELD(location);
1131 :
1132 1466643 : return newnode;
1133 : }
1134 :
1135 : static ParamRef *
1136 45953 : _copyParamRef(const ParamRef *from)
1137 : {
1138 45953 : ParamRef *newnode = makeNode(ParamRef);
1139 :
1140 45953 : COPY_SCALAR_FIELD(number);
1141 45953 : COPY_LOCATION_FIELD(location);
1142 :
1143 45953 : return newnode;
1144 : }
1145 :
1146 : static A_Expr *
1147 468759 : _copyA_Expr(const A_Expr *from)
1148 : {
1149 468759 : A_Expr *newnode = makeNode(A_Expr);
1150 :
1151 468759 : COPY_SCALAR_FIELD(kind);
1152 468759 : COPY_NODE_FIELD(name);
1153 468759 : COPY_NODE_FIELD(lexpr);
1154 468759 : COPY_NODE_FIELD(rexpr);
1155 468759 : COPY_LOCATION_FIELD(rexpr_list_start);
1156 468759 : COPY_LOCATION_FIELD(rexpr_list_end);
1157 468759 : COPY_LOCATION_FIELD(location);
1158 :
1159 468759 : return newnode;
1160 : }
1161 :
1162 : static TypeCast *
1163 247928 : _copyTypeCast(const TypeCast *from)
1164 : {
1165 247928 : TypeCast *newnode = makeNode(TypeCast);
1166 :
1167 247928 : COPY_NODE_FIELD(arg);
1168 247928 : COPY_NODE_FIELD(typeName);
1169 247928 : COPY_LOCATION_FIELD(location);
1170 :
1171 247928 : return newnode;
1172 : }
1173 :
1174 : static CollateClause *
1175 8026 : _copyCollateClause(const CollateClause *from)
1176 : {
1177 8026 : CollateClause *newnode = makeNode(CollateClause);
1178 :
1179 8026 : COPY_NODE_FIELD(arg);
1180 8026 : COPY_NODE_FIELD(collname);
1181 8026 : COPY_LOCATION_FIELD(location);
1182 :
1183 8026 : return newnode;
1184 : }
1185 :
1186 : static RoleSpec *
1187 36364 : _copyRoleSpec(const RoleSpec *from)
1188 : {
1189 36364 : RoleSpec *newnode = makeNode(RoleSpec);
1190 :
1191 36364 : COPY_SCALAR_FIELD(roletype);
1192 36364 : COPY_STRING_FIELD(rolename);
1193 36364 : COPY_LOCATION_FIELD(location);
1194 :
1195 36364 : return newnode;
1196 : }
1197 :
1198 : static FuncCall *
1199 290617 : _copyFuncCall(const FuncCall *from)
1200 : {
1201 290617 : FuncCall *newnode = makeNode(FuncCall);
1202 :
1203 290617 : COPY_NODE_FIELD(funcname);
1204 290617 : COPY_NODE_FIELD(args);
1205 290617 : COPY_NODE_FIELD(agg_order);
1206 290617 : COPY_NODE_FIELD(agg_filter);
1207 290617 : COPY_NODE_FIELD(over);
1208 290617 : COPY_SCALAR_FIELD(ignore_nulls);
1209 290617 : COPY_SCALAR_FIELD(agg_within_group);
1210 290617 : COPY_SCALAR_FIELD(agg_star);
1211 290617 : COPY_SCALAR_FIELD(agg_distinct);
1212 290617 : COPY_SCALAR_FIELD(func_variadic);
1213 290617 : COPY_SCALAR_FIELD(funcformat);
1214 290617 : COPY_LOCATION_FIELD(location);
1215 :
1216 290617 : return newnode;
1217 : }
1218 :
1219 : static A_Star *
1220 51392 : _copyA_Star(const A_Star *from)
1221 : {
1222 51392 : A_Star *newnode = makeNode(A_Star);
1223 :
1224 :
1225 51392 : return newnode;
1226 : }
1227 :
1228 : static A_Indices *
1229 11347 : _copyA_Indices(const A_Indices *from)
1230 : {
1231 11347 : A_Indices *newnode = makeNode(A_Indices);
1232 :
1233 11347 : COPY_SCALAR_FIELD(is_slice);
1234 11347 : COPY_NODE_FIELD(lidx);
1235 11347 : COPY_NODE_FIELD(uidx);
1236 :
1237 11347 : return newnode;
1238 : }
1239 :
1240 : static A_Indirection *
1241 27456 : _copyA_Indirection(const A_Indirection *from)
1242 : {
1243 27456 : A_Indirection *newnode = makeNode(A_Indirection);
1244 :
1245 27456 : COPY_NODE_FIELD(arg);
1246 27456 : COPY_NODE_FIELD(indirection);
1247 :
1248 27456 : return newnode;
1249 : }
1250 :
1251 : static A_ArrayExpr *
1252 6099 : _copyA_ArrayExpr(const A_ArrayExpr *from)
1253 : {
1254 6099 : A_ArrayExpr *newnode = makeNode(A_ArrayExpr);
1255 :
1256 6099 : COPY_NODE_FIELD(elements);
1257 6099 : COPY_LOCATION_FIELD(list_start);
1258 6099 : COPY_LOCATION_FIELD(list_end);
1259 6099 : COPY_LOCATION_FIELD(location);
1260 :
1261 6099 : return newnode;
1262 : }
1263 :
1264 : static ResTarget *
1265 920716 : _copyResTarget(const ResTarget *from)
1266 : {
1267 920716 : ResTarget *newnode = makeNode(ResTarget);
1268 :
1269 920716 : COPY_STRING_FIELD(name);
1270 920716 : COPY_NODE_FIELD(indirection);
1271 920716 : COPY_NODE_FIELD(val);
1272 920716 : COPY_LOCATION_FIELD(location);
1273 :
1274 920716 : 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 79093 : _copySortBy(const SortBy *from)
1291 : {
1292 79093 : SortBy *newnode = makeNode(SortBy);
1293 :
1294 79093 : COPY_NODE_FIELD(node);
1295 79093 : COPY_SCALAR_FIELD(sortby_dir);
1296 79093 : COPY_SCALAR_FIELD(sortby_nulls);
1297 79093 : COPY_NODE_FIELD(useOp);
1298 79093 : COPY_LOCATION_FIELD(location);
1299 :
1300 79093 : return newnode;
1301 : }
1302 :
1303 : static WindowDef *
1304 3267 : _copyWindowDef(const WindowDef *from)
1305 : {
1306 3267 : WindowDef *newnode = makeNode(WindowDef);
1307 :
1308 3267 : COPY_STRING_FIELD(name);
1309 3267 : COPY_STRING_FIELD(refname);
1310 3267 : COPY_NODE_FIELD(partitionClause);
1311 3267 : COPY_NODE_FIELD(orderClause);
1312 3267 : COPY_SCALAR_FIELD(frameOptions);
1313 3267 : COPY_NODE_FIELD(startOffset);
1314 3267 : COPY_NODE_FIELD(endOffset);
1315 3267 : COPY_LOCATION_FIELD(location);
1316 :
1317 3267 : return newnode;
1318 : }
1319 :
1320 : static RangeSubselect *
1321 16573 : _copyRangeSubselect(const RangeSubselect *from)
1322 : {
1323 16573 : RangeSubselect *newnode = makeNode(RangeSubselect);
1324 :
1325 16573 : COPY_SCALAR_FIELD(lateral);
1326 16573 : COPY_NODE_FIELD(subquery);
1327 16573 : COPY_NODE_FIELD(alias);
1328 :
1329 16573 : return newnode;
1330 : }
1331 :
1332 : static RangeFunction *
1333 34558 : _copyRangeFunction(const RangeFunction *from)
1334 : {
1335 34558 : RangeFunction *newnode = makeNode(RangeFunction);
1336 :
1337 34558 : COPY_SCALAR_FIELD(lateral);
1338 34558 : COPY_SCALAR_FIELD(ordinality);
1339 34558 : COPY_SCALAR_FIELD(is_rowsfrom);
1340 34558 : COPY_NODE_FIELD(functions);
1341 34558 : COPY_NODE_FIELD(alias);
1342 34558 : COPY_NODE_FIELD(coldeflist);
1343 :
1344 34558 : 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 642 : _copyRangeGraphTable(const RangeGraphTable *from)
1381 : {
1382 642 : RangeGraphTable *newnode = makeNode(RangeGraphTable);
1383 :
1384 642 : COPY_NODE_FIELD(graph_name);
1385 642 : COPY_NODE_FIELD(graph_pattern);
1386 642 : COPY_NODE_FIELD(columns);
1387 642 : COPY_NODE_FIELD(alias);
1388 642 : COPY_LOCATION_FIELD(location);
1389 :
1390 642 : 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 101477 : _copyColumnDef(const ColumnDef *from)
1409 : {
1410 101477 : ColumnDef *newnode = makeNode(ColumnDef);
1411 :
1412 101477 : COPY_STRING_FIELD(colname);
1413 101477 : COPY_NODE_FIELD(typeName);
1414 101477 : COPY_STRING_FIELD(compression);
1415 101477 : COPY_SCALAR_FIELD(inhcount);
1416 101477 : COPY_SCALAR_FIELD(is_local);
1417 101477 : COPY_SCALAR_FIELD(is_not_null);
1418 101477 : COPY_SCALAR_FIELD(is_from_type);
1419 101477 : COPY_SCALAR_FIELD(storage);
1420 101477 : COPY_STRING_FIELD(storage_name);
1421 101477 : COPY_NODE_FIELD(raw_default);
1422 101477 : COPY_NODE_FIELD(cooked_default);
1423 101477 : COPY_SCALAR_FIELD(identity);
1424 101477 : COPY_NODE_FIELD(identitySequence);
1425 101477 : COPY_SCALAR_FIELD(generated);
1426 101477 : COPY_NODE_FIELD(collClause);
1427 101477 : COPY_SCALAR_FIELD(collOid);
1428 101477 : COPY_NODE_FIELD(constraints);
1429 101477 : COPY_NODE_FIELD(fdwoptions);
1430 101477 : COPY_LOCATION_FIELD(location);
1431 :
1432 101477 : 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 13879 : _copyIndexElem(const IndexElem *from)
1449 : {
1450 13879 : IndexElem *newnode = makeNode(IndexElem);
1451 :
1452 13879 : COPY_STRING_FIELD(name);
1453 13879 : COPY_NODE_FIELD(expr);
1454 13879 : COPY_STRING_FIELD(indexcolname);
1455 13879 : COPY_NODE_FIELD(collation);
1456 13879 : COPY_NODE_FIELD(opclass);
1457 13879 : COPY_NODE_FIELD(opclassopts);
1458 13879 : COPY_SCALAR_FIELD(ordering);
1459 13879 : COPY_SCALAR_FIELD(nulls_ordering);
1460 13879 : COPY_LOCATION_FIELD(location);
1461 :
1462 13879 : return newnode;
1463 : }
1464 :
1465 : static DefElem *
1466 479976 : _copyDefElem(const DefElem *from)
1467 : {
1468 479976 : DefElem *newnode = makeNode(DefElem);
1469 :
1470 479976 : COPY_STRING_FIELD(defnamespace);
1471 479976 : COPY_STRING_FIELD(defname);
1472 479976 : COPY_NODE_FIELD(arg);
1473 479976 : COPY_SCALAR_FIELD(defaction);
1474 479976 : COPY_LOCATION_FIELD(location);
1475 :
1476 479976 : return newnode;
1477 : }
1478 :
1479 : static LockingClause *
1480 5122 : _copyLockingClause(const LockingClause *from)
1481 : {
1482 5122 : LockingClause *newnode = makeNode(LockingClause);
1483 :
1484 5122 : COPY_NODE_FIELD(lockedRels);
1485 5122 : COPY_SCALAR_FIELD(strength);
1486 5122 : COPY_SCALAR_FIELD(waitPolicy);
1487 :
1488 5122 : 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 8215 : _copyPartitionElem(const PartitionElem *from)
1507 : {
1508 8215 : PartitionElem *newnode = makeNode(PartitionElem);
1509 :
1510 8215 : COPY_STRING_FIELD(name);
1511 8215 : COPY_NODE_FIELD(expr);
1512 8215 : COPY_NODE_FIELD(collation);
1513 8215 : COPY_NODE_FIELD(opclass);
1514 8215 : COPY_LOCATION_FIELD(location);
1515 :
1516 8215 : return newnode;
1517 : }
1518 :
1519 : static PartitionSpec *
1520 7339 : _copyPartitionSpec(const PartitionSpec *from)
1521 : {
1522 7339 : PartitionSpec *newnode = makeNode(PartitionSpec);
1523 :
1524 7339 : COPY_SCALAR_FIELD(strategy);
1525 7339 : COPY_NODE_FIELD(partParams);
1526 7339 : COPY_LOCATION_FIELD(location);
1527 :
1528 7339 : return newnode;
1529 : }
1530 :
1531 : static PartitionBoundSpec *
1532 29055 : _copyPartitionBoundSpec(const PartitionBoundSpec *from)
1533 : {
1534 29055 : PartitionBoundSpec *newnode = makeNode(PartitionBoundSpec);
1535 :
1536 29055 : COPY_SCALAR_FIELD(strategy);
1537 29055 : COPY_SCALAR_FIELD(is_default);
1538 29055 : COPY_SCALAR_FIELD(modulus);
1539 29055 : COPY_SCALAR_FIELD(remainder);
1540 29055 : COPY_NODE_FIELD(listdatums);
1541 29055 : COPY_NODE_FIELD(lowerdatums);
1542 29055 : COPY_NODE_FIELD(upperdatums);
1543 29055 : COPY_LOCATION_FIELD(location);
1544 :
1545 29055 : 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 2282 : _copySinglePartitionSpec(const SinglePartitionSpec *from)
1562 : {
1563 2282 : SinglePartitionSpec *newnode = makeNode(SinglePartitionSpec);
1564 :
1565 2282 : COPY_NODE_FIELD(name);
1566 2282 : COPY_NODE_FIELD(bound);
1567 :
1568 2282 : return newnode;
1569 : }
1570 :
1571 : static PartitionCmd *
1572 8324 : _copyPartitionCmd(const PartitionCmd *from)
1573 : {
1574 8324 : PartitionCmd *newnode = makeNode(PartitionCmd);
1575 :
1576 8324 : COPY_NODE_FIELD(name);
1577 8324 : COPY_NODE_FIELD(bound);
1578 8324 : COPY_NODE_FIELD(partlist);
1579 8324 : COPY_SCALAR_FIELD(concurrent);
1580 :
1581 8324 : return newnode;
1582 : }
1583 :
1584 : static GraphPattern *
1585 673 : _copyGraphPattern(const GraphPattern *from)
1586 : {
1587 673 : GraphPattern *newnode = makeNode(GraphPattern);
1588 :
1589 673 : COPY_NODE_FIELD(path_pattern_list);
1590 673 : COPY_NODE_FIELD(whereClause);
1591 :
1592 673 : return newnode;
1593 : }
1594 :
1595 : static GraphElementPattern *
1596 2033 : _copyGraphElementPattern(const GraphElementPattern *from)
1597 : {
1598 2033 : GraphElementPattern *newnode = makeNode(GraphElementPattern);
1599 :
1600 2033 : COPY_SCALAR_FIELD(kind);
1601 2033 : COPY_STRING_FIELD(variable);
1602 2033 : COPY_NODE_FIELD(labelexpr);
1603 2033 : COPY_NODE_FIELD(subexpr);
1604 2033 : COPY_NODE_FIELD(whereClause);
1605 2033 : COPY_NODE_FIELD(quantifier);
1606 2033 : COPY_LOCATION_FIELD(location);
1607 :
1608 2033 : return newnode;
1609 : }
1610 :
1611 : static RangeTblEntry *
1612 1618314 : _copyRangeTblEntry(const RangeTblEntry *from)
1613 : {
1614 1618314 : RangeTblEntry *newnode = makeNode(RangeTblEntry);
1615 :
1616 1618314 : COPY_NODE_FIELD(alias);
1617 1618314 : COPY_NODE_FIELD(eref);
1618 1618314 : COPY_SCALAR_FIELD(rtekind);
1619 1618314 : COPY_SCALAR_FIELD(relid);
1620 1618314 : COPY_SCALAR_FIELD(inh);
1621 1618314 : COPY_SCALAR_FIELD(relkind);
1622 1618314 : COPY_SCALAR_FIELD(rellockmode);
1623 1618314 : COPY_SCALAR_FIELD(perminfoindex);
1624 1618314 : COPY_NODE_FIELD(tablesample);
1625 1618314 : COPY_NODE_FIELD(subquery);
1626 1618314 : COPY_SCALAR_FIELD(security_barrier);
1627 1618314 : COPY_SCALAR_FIELD(jointype);
1628 1618314 : COPY_SCALAR_FIELD(joinmergedcols);
1629 1618314 : COPY_NODE_FIELD(joinaliasvars);
1630 1618314 : COPY_NODE_FIELD(joinleftcols);
1631 1618314 : COPY_NODE_FIELD(joinrightcols);
1632 1618314 : COPY_NODE_FIELD(join_using_alias);
1633 1618314 : COPY_NODE_FIELD(functions);
1634 1618314 : COPY_SCALAR_FIELD(funcordinality);
1635 1618314 : COPY_NODE_FIELD(tablefunc);
1636 1618314 : COPY_NODE_FIELD(graph_pattern);
1637 1618314 : COPY_NODE_FIELD(graph_table_columns);
1638 1618314 : COPY_NODE_FIELD(values_lists);
1639 1618314 : COPY_STRING_FIELD(ctename);
1640 1618314 : COPY_SCALAR_FIELD(ctelevelsup);
1641 1618314 : COPY_SCALAR_FIELD(self_reference);
1642 1618314 : COPY_NODE_FIELD(coltypes);
1643 1618314 : COPY_NODE_FIELD(coltypmods);
1644 1618314 : COPY_NODE_FIELD(colcollations);
1645 1618314 : COPY_STRING_FIELD(enrname);
1646 1618314 : COPY_SCALAR_FIELD(enrtuples);
1647 1618314 : COPY_NODE_FIELD(groupexprs);
1648 1618314 : COPY_SCALAR_FIELD(lateral);
1649 1618314 : COPY_SCALAR_FIELD(inFromCl);
1650 1618314 : COPY_NODE_FIELD(securityQuals);
1651 :
1652 1618314 : return newnode;
1653 : }
1654 :
1655 : static RTEPermissionInfo *
1656 958738 : _copyRTEPermissionInfo(const RTEPermissionInfo *from)
1657 : {
1658 958738 : RTEPermissionInfo *newnode = makeNode(RTEPermissionInfo);
1659 :
1660 958738 : COPY_SCALAR_FIELD(relid);
1661 958738 : COPY_SCALAR_FIELD(inh);
1662 958738 : COPY_SCALAR_FIELD(requiredPerms);
1663 958738 : COPY_SCALAR_FIELD(checkAsUser);
1664 958738 : COPY_BITMAPSET_FIELD(selectedCols);
1665 958738 : COPY_BITMAPSET_FIELD(insertedCols);
1666 958738 : COPY_BITMAPSET_FIELD(updatedCols);
1667 :
1668 958738 : return newnode;
1669 : }
1670 :
1671 : static RangeTblFunction *
1672 94108 : _copyRangeTblFunction(const RangeTblFunction *from)
1673 : {
1674 94108 : RangeTblFunction *newnode = makeNode(RangeTblFunction);
1675 :
1676 94108 : COPY_NODE_FIELD(funcexpr);
1677 94108 : COPY_SCALAR_FIELD(funccolcount);
1678 94108 : COPY_NODE_FIELD(funccolnames);
1679 94108 : COPY_NODE_FIELD(funccoltypes);
1680 94108 : COPY_NODE_FIELD(funccoltypmods);
1681 94108 : COPY_NODE_FIELD(funccolcollations);
1682 94108 : COPY_BITMAPSET_FIELD(funcparams);
1683 :
1684 94108 : 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 212901 : _copySortGroupClause(const SortGroupClause *from)
1715 : {
1716 212901 : SortGroupClause *newnode = makeNode(SortGroupClause);
1717 :
1718 212901 : COPY_SCALAR_FIELD(tleSortGroupRef);
1719 212901 : COPY_SCALAR_FIELD(eqop);
1720 212901 : COPY_SCALAR_FIELD(sortop);
1721 212901 : COPY_SCALAR_FIELD(reverse_sort);
1722 212901 : COPY_SCALAR_FIELD(nulls_first);
1723 212901 : COPY_SCALAR_FIELD(hashable);
1724 :
1725 212901 : 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 3311 : _copyWindowClause(const WindowClause *from)
1742 : {
1743 3311 : WindowClause *newnode = makeNode(WindowClause);
1744 :
1745 3311 : COPY_STRING_FIELD(name);
1746 3311 : COPY_STRING_FIELD(refname);
1747 3311 : COPY_NODE_FIELD(partitionClause);
1748 3311 : COPY_NODE_FIELD(orderClause);
1749 3311 : COPY_SCALAR_FIELD(frameOptions);
1750 3311 : COPY_NODE_FIELD(startOffset);
1751 3311 : COPY_NODE_FIELD(endOffset);
1752 3311 : COPY_SCALAR_FIELD(startInRangeFunc);
1753 3311 : COPY_SCALAR_FIELD(endInRangeFunc);
1754 3311 : COPY_SCALAR_FIELD(inRangeColl);
1755 3311 : COPY_SCALAR_FIELD(inRangeAsc);
1756 3311 : COPY_SCALAR_FIELD(inRangeNullsFirst);
1757 3311 : COPY_SCALAR_FIELD(winref);
1758 3311 : COPY_SCALAR_FIELD(copiedOrder);
1759 :
1760 3311 : return newnode;
1761 : }
1762 :
1763 : static RowMarkClause *
1764 12660 : _copyRowMarkClause(const RowMarkClause *from)
1765 : {
1766 12660 : RowMarkClause *newnode = makeNode(RowMarkClause);
1767 :
1768 12660 : COPY_SCALAR_FIELD(rti);
1769 12660 : COPY_SCALAR_FIELD(strength);
1770 12660 : COPY_SCALAR_FIELD(waitPolicy);
1771 12660 : COPY_SCALAR_FIELD(pushedDown);
1772 :
1773 12660 : return newnode;
1774 : }
1775 :
1776 : static ForPortionOfClause *
1777 1025 : _copyForPortionOfClause(const ForPortionOfClause *from)
1778 : {
1779 1025 : ForPortionOfClause *newnode = makeNode(ForPortionOfClause);
1780 :
1781 1025 : COPY_STRING_FIELD(range_name);
1782 1025 : COPY_LOCATION_FIELD(location);
1783 1025 : COPY_LOCATION_FIELD(target_location);
1784 1025 : COPY_NODE_FIELD(target);
1785 1025 : COPY_NODE_FIELD(target_start);
1786 1025 : COPY_NODE_FIELD(target_end);
1787 :
1788 1025 : return newnode;
1789 : }
1790 :
1791 : static WithClause *
1792 2331 : _copyWithClause(const WithClause *from)
1793 : {
1794 2331 : WithClause *newnode = makeNode(WithClause);
1795 :
1796 2331 : COPY_NODE_FIELD(ctes);
1797 2331 : COPY_SCALAR_FIELD(recursive);
1798 2331 : COPY_LOCATION_FIELD(location);
1799 :
1800 2331 : 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 7450 : _copyCommonTableExpr(const CommonTableExpr *from)
1865 : {
1866 7450 : CommonTableExpr *newnode = makeNode(CommonTableExpr);
1867 :
1868 7450 : COPY_STRING_FIELD(ctename);
1869 7450 : COPY_NODE_FIELD(aliascolnames);
1870 7450 : COPY_SCALAR_FIELD(ctematerialized);
1871 7450 : COPY_NODE_FIELD(ctequery);
1872 7450 : COPY_NODE_FIELD(search_clause);
1873 7450 : COPY_NODE_FIELD(cycle_clause);
1874 7450 : COPY_LOCATION_FIELD(location);
1875 7450 : COPY_SCALAR_FIELD(cterecursive);
1876 7450 : COPY_SCALAR_FIELD(cterefcount);
1877 7450 : COPY_NODE_FIELD(ctecolnames);
1878 7450 : COPY_NODE_FIELD(ctecoltypes);
1879 7450 : COPY_NODE_FIELD(ctecoltypmods);
1880 7450 : COPY_NODE_FIELD(ctecolcollations);
1881 :
1882 7450 : return newnode;
1883 : }
1884 :
1885 : static MergeWhenClause *
1886 2272 : _copyMergeWhenClause(const MergeWhenClause *from)
1887 : {
1888 2272 : MergeWhenClause *newnode = makeNode(MergeWhenClause);
1889 :
1890 2272 : COPY_SCALAR_FIELD(matchKind);
1891 2272 : COPY_SCALAR_FIELD(commandType);
1892 2272 : COPY_SCALAR_FIELD(override);
1893 2272 : COPY_NODE_FIELD(condition);
1894 2272 : COPY_NODE_FIELD(targetList);
1895 2272 : COPY_NODE_FIELD(values);
1896 :
1897 2272 : 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 2737 : _copyReturningClause(const ReturningClause *from)
1914 : {
1915 2737 : ReturningClause *newnode = makeNode(ReturningClause);
1916 :
1917 2737 : COPY_NODE_FIELD(options);
1918 2737 : COPY_NODE_FIELD(exprs);
1919 :
1920 2737 : 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 1670 : _copyJsonOutput(const JsonOutput *from)
1937 : {
1938 1670 : JsonOutput *newnode = makeNode(JsonOutput);
1939 :
1940 1670 : COPY_NODE_FIELD(typeName);
1941 1670 : COPY_NODE_FIELD(returning);
1942 :
1943 1670 : 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 108 : _copyJsonArrayQueryConstructor(const JsonArrayQueryConstructor *from)
2104 : {
2105 108 : JsonArrayQueryConstructor *newnode = makeNode(JsonArrayQueryConstructor);
2106 :
2107 108 : COPY_NODE_FIELD(query);
2108 108 : COPY_NODE_FIELD(output);
2109 108 : COPY_NODE_FIELD(format);
2110 108 : COPY_SCALAR_FIELD(absent_on_null);
2111 108 : COPY_LOCATION_FIELD(location);
2112 :
2113 108 : 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 514056 : _copyRawStmt(const RawStmt *from)
2157 : {
2158 514056 : RawStmt *newnode = makeNode(RawStmt);
2159 :
2160 514056 : COPY_NODE_FIELD(stmt);
2161 514056 : COPY_LOCATION_FIELD(stmt_location);
2162 514056 : COPY_LOCATION_FIELD(stmt_len);
2163 :
2164 514056 : return newnode;
2165 : }
2166 :
2167 : static InsertStmt *
2168 48448 : _copyInsertStmt(const InsertStmt *from)
2169 : {
2170 48448 : InsertStmt *newnode = makeNode(InsertStmt);
2171 :
2172 48448 : COPY_NODE_FIELD(relation);
2173 48448 : COPY_NODE_FIELD(cols);
2174 48448 : COPY_NODE_FIELD(selectStmt);
2175 48448 : COPY_NODE_FIELD(onConflictClause);
2176 48448 : COPY_NODE_FIELD(returningClause);
2177 48448 : COPY_NODE_FIELD(withClause);
2178 48448 : COPY_SCALAR_FIELD(override);
2179 :
2180 48448 : return newnode;
2181 : }
2182 :
2183 : static DeleteStmt *
2184 3520 : _copyDeleteStmt(const DeleteStmt *from)
2185 : {
2186 3520 : DeleteStmt *newnode = makeNode(DeleteStmt);
2187 :
2188 3520 : COPY_NODE_FIELD(relation);
2189 3520 : COPY_NODE_FIELD(usingClause);
2190 3520 : COPY_NODE_FIELD(whereClause);
2191 3520 : COPY_NODE_FIELD(returningClause);
2192 3520 : COPY_NODE_FIELD(withClause);
2193 3520 : COPY_NODE_FIELD(forPortionOf);
2194 :
2195 3520 : 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 1445 : _copyMergeStmt(const MergeStmt *from)
2216 : {
2217 1445 : MergeStmt *newnode = makeNode(MergeStmt);
2218 :
2219 1445 : COPY_NODE_FIELD(relation);
2220 1445 : COPY_NODE_FIELD(sourceRelation);
2221 1445 : COPY_NODE_FIELD(joinCondition);
2222 1445 : COPY_NODE_FIELD(mergeWhenClauses);
2223 1445 : COPY_NODE_FIELD(returningClause);
2224 1445 : COPY_NODE_FIELD(withClause);
2225 :
2226 1445 : return newnode;
2227 : }
2228 :
2229 : static SelectStmt *
2230 388711 : _copySelectStmt(const SelectStmt *from)
2231 : {
2232 388711 : SelectStmt *newnode = makeNode(SelectStmt);
2233 :
2234 388711 : COPY_NODE_FIELD(distinctClause);
2235 388711 : COPY_NODE_FIELD(intoClause);
2236 388711 : COPY_NODE_FIELD(targetList);
2237 388711 : COPY_NODE_FIELD(fromClause);
2238 388711 : COPY_NODE_FIELD(whereClause);
2239 388711 : COPY_NODE_FIELD(groupClause);
2240 388711 : COPY_SCALAR_FIELD(groupDistinct);
2241 388711 : COPY_SCALAR_FIELD(groupByAll);
2242 388711 : COPY_NODE_FIELD(havingClause);
2243 388711 : COPY_NODE_FIELD(windowClause);
2244 388711 : COPY_NODE_FIELD(valuesLists);
2245 388711 : COPY_NODE_FIELD(sortClause);
2246 388711 : COPY_NODE_FIELD(limitOffset);
2247 388711 : COPY_NODE_FIELD(limitCount);
2248 388711 : COPY_SCALAR_FIELD(limitOption);
2249 388711 : COPY_NODE_FIELD(lockingClause);
2250 388711 : COPY_NODE_FIELD(withClause);
2251 388711 : COPY_SCALAR_FIELD(op);
2252 388711 : COPY_SCALAR_FIELD(all);
2253 388711 : COPY_NODE_FIELD(larg);
2254 388711 : COPY_NODE_FIELD(rarg);
2255 :
2256 388711 : return newnode;
2257 : }
2258 :
2259 : static SetOperationStmt *
2260 24575 : _copySetOperationStmt(const SetOperationStmt *from)
2261 : {
2262 24575 : SetOperationStmt *newnode = makeNode(SetOperationStmt);
2263 :
2264 24575 : COPY_SCALAR_FIELD(op);
2265 24575 : COPY_SCALAR_FIELD(all);
2266 24575 : COPY_NODE_FIELD(larg);
2267 24575 : COPY_NODE_FIELD(rarg);
2268 24575 : COPY_NODE_FIELD(colTypes);
2269 24575 : COPY_NODE_FIELD(colTypmods);
2270 24575 : COPY_NODE_FIELD(colCollations);
2271 24575 : COPY_NODE_FIELD(groupClauses);
2272 :
2273 24575 : 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 3416 : _copyPLAssignStmt(const PLAssignStmt *from)
2288 : {
2289 3416 : PLAssignStmt *newnode = makeNode(PLAssignStmt);
2290 :
2291 3416 : COPY_STRING_FIELD(name);
2292 3416 : COPY_NODE_FIELD(indirection);
2293 3416 : COPY_SCALAR_FIELD(nnames);
2294 3416 : COPY_NODE_FIELD(val);
2295 3416 : COPY_LOCATION_FIELD(location);
2296 :
2297 3416 : return newnode;
2298 : }
2299 :
2300 : static CreateSchemaStmt *
2301 1504 : _copyCreateSchemaStmt(const CreateSchemaStmt *from)
2302 : {
2303 1504 : CreateSchemaStmt *newnode = makeNode(CreateSchemaStmt);
2304 :
2305 1504 : COPY_STRING_FIELD(schemaname);
2306 1504 : COPY_NODE_FIELD(authrole);
2307 1504 : COPY_NODE_FIELD(schemaElts);
2308 1504 : COPY_SCALAR_FIELD(if_not_exists);
2309 :
2310 1504 : return newnode;
2311 : }
2312 :
2313 : static AlterTableStmt *
2314 41839 : _copyAlterTableStmt(const AlterTableStmt *from)
2315 : {
2316 41839 : AlterTableStmt *newnode = makeNode(AlterTableStmt);
2317 :
2318 41839 : COPY_NODE_FIELD(relation);
2319 41839 : COPY_NODE_FIELD(cmds);
2320 41839 : COPY_SCALAR_FIELD(objtype);
2321 41839 : COPY_SCALAR_FIELD(missing_ok);
2322 :
2323 41839 : return newnode;
2324 : }
2325 :
2326 : static AlterTableCmd *
2327 69164 : _copyAlterTableCmd(const AlterTableCmd *from)
2328 : {
2329 69164 : AlterTableCmd *newnode = makeNode(AlterTableCmd);
2330 :
2331 69164 : COPY_SCALAR_FIELD(subtype);
2332 69164 : COPY_STRING_FIELD(name);
2333 69164 : COPY_SCALAR_FIELD(num);
2334 69164 : COPY_NODE_FIELD(newowner);
2335 69164 : COPY_NODE_FIELD(def);
2336 69164 : COPY_SCALAR_FIELD(behavior);
2337 69164 : COPY_SCALAR_FIELD(missing_ok);
2338 69164 : COPY_SCALAR_FIELD(recurse);
2339 :
2340 69164 : return newnode;
2341 : }
2342 :
2343 : static ATAlterConstraint *
2344 900 : _copyATAlterConstraint(const ATAlterConstraint *from)
2345 : {
2346 900 : ATAlterConstraint *newnode = makeNode(ATAlterConstraint);
2347 :
2348 900 : COPY_STRING_FIELD(conname);
2349 900 : COPY_SCALAR_FIELD(alterEnforceability);
2350 900 : COPY_SCALAR_FIELD(is_enforced);
2351 900 : COPY_SCALAR_FIELD(alterDeferrability);
2352 900 : COPY_SCALAR_FIELD(deferrable);
2353 900 : COPY_SCALAR_FIELD(initdeferred);
2354 900 : COPY_SCALAR_FIELD(alterInheritability);
2355 900 : COPY_SCALAR_FIELD(noinherit);
2356 :
2357 900 : return newnode;
2358 : }
2359 :
2360 : static ReplicaIdentityStmt *
2361 936 : _copyReplicaIdentityStmt(const ReplicaIdentityStmt *from)
2362 : {
2363 936 : ReplicaIdentityStmt *newnode = makeNode(ReplicaIdentityStmt);
2364 :
2365 936 : COPY_SCALAR_FIELD(identity_type);
2366 936 : COPY_STRING_FIELD(name);
2367 :
2368 936 : 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 23325 : _copyGrantStmt(const GrantStmt *from)
2398 : {
2399 23325 : GrantStmt *newnode = makeNode(GrantStmt);
2400 :
2401 23325 : COPY_SCALAR_FIELD(is_grant);
2402 23325 : COPY_SCALAR_FIELD(targtype);
2403 23325 : COPY_SCALAR_FIELD(objtype);
2404 23325 : COPY_NODE_FIELD(objects);
2405 23325 : COPY_NODE_FIELD(privileges);
2406 23325 : COPY_NODE_FIELD(grantees);
2407 23325 : COPY_SCALAR_FIELD(grant_option);
2408 23325 : COPY_NODE_FIELD(grantor);
2409 23325 : COPY_SCALAR_FIELD(behavior);
2410 :
2411 23325 : return newnode;
2412 : }
2413 :
2414 : static ObjectWithArgs *
2415 15977 : _copyObjectWithArgs(const ObjectWithArgs *from)
2416 : {
2417 15977 : ObjectWithArgs *newnode = makeNode(ObjectWithArgs);
2418 :
2419 15977 : COPY_NODE_FIELD(objname);
2420 15977 : COPY_NODE_FIELD(objargs);
2421 15977 : COPY_NODE_FIELD(objfuncargs);
2422 15977 : COPY_SCALAR_FIELD(args_unspecified);
2423 :
2424 15977 : return newnode;
2425 : }
2426 :
2427 : static AccessPriv *
2428 21648 : _copyAccessPriv(const AccessPriv *from)
2429 : {
2430 21648 : AccessPriv *newnode = makeNode(AccessPriv);
2431 :
2432 21648 : COPY_STRING_FIELD(priv_name);
2433 21648 : COPY_NODE_FIELD(cols);
2434 :
2435 21648 : 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 13516 : _copyCopyStmt(const CopyStmt *from)
2466 : {
2467 13516 : CopyStmt *newnode = makeNode(CopyStmt);
2468 :
2469 13516 : COPY_NODE_FIELD(relation);
2470 13516 : COPY_NODE_FIELD(query);
2471 13516 : COPY_NODE_FIELD(attlist);
2472 13516 : COPY_SCALAR_FIELD(is_from);
2473 13516 : COPY_SCALAR_FIELD(is_program);
2474 13516 : COPY_STRING_FIELD(filename);
2475 13516 : COPY_NODE_FIELD(options);
2476 13516 : COPY_NODE_FIELD(whereClause);
2477 :
2478 13516 : return newnode;
2479 : }
2480 :
2481 : static VariableSetStmt *
2482 47252 : _copyVariableSetStmt(const VariableSetStmt *from)
2483 : {
2484 47252 : VariableSetStmt *newnode = makeNode(VariableSetStmt);
2485 :
2486 47252 : COPY_SCALAR_FIELD(kind);
2487 47252 : COPY_STRING_FIELD(name);
2488 47252 : COPY_NODE_FIELD(args);
2489 47252 : COPY_SCALAR_FIELD(jumble_args);
2490 47252 : COPY_SCALAR_FIELD(is_local);
2491 47252 : COPY_LOCATION_FIELD(location);
2492 :
2493 47252 : 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 52996 : _copyCreateStmt(const CreateStmt *from)
2508 : {
2509 52996 : CreateStmt *newnode = makeNode(CreateStmt);
2510 :
2511 52996 : COPY_NODE_FIELD(relation);
2512 52996 : COPY_NODE_FIELD(tableElts);
2513 52996 : COPY_NODE_FIELD(inhRelations);
2514 52996 : COPY_NODE_FIELD(partbound);
2515 52996 : COPY_NODE_FIELD(partspec);
2516 52996 : COPY_NODE_FIELD(ofTypename);
2517 52996 : COPY_NODE_FIELD(constraints);
2518 52996 : COPY_NODE_FIELD(nnconstraints);
2519 52996 : COPY_NODE_FIELD(options);
2520 52996 : COPY_SCALAR_FIELD(oncommit);
2521 52996 : COPY_STRING_FIELD(tablespacename);
2522 52996 : COPY_STRING_FIELD(accessMethod);
2523 52996 : COPY_SCALAR_FIELD(if_not_exists);
2524 :
2525 52996 : return newnode;
2526 : }
2527 :
2528 : static Constraint *
2529 67832 : _copyConstraint(const Constraint *from)
2530 : {
2531 67832 : Constraint *newnode = makeNode(Constraint);
2532 :
2533 67832 : COPY_SCALAR_FIELD(contype);
2534 67832 : COPY_STRING_FIELD(conname);
2535 67832 : COPY_SCALAR_FIELD(deferrable);
2536 67832 : COPY_SCALAR_FIELD(initdeferred);
2537 67832 : COPY_SCALAR_FIELD(is_enforced);
2538 67832 : COPY_SCALAR_FIELD(skip_validation);
2539 67832 : COPY_SCALAR_FIELD(initially_valid);
2540 67832 : COPY_SCALAR_FIELD(is_no_inherit);
2541 67832 : COPY_NODE_FIELD(raw_expr);
2542 67832 : COPY_STRING_FIELD(cooked_expr);
2543 67832 : COPY_SCALAR_FIELD(generated_when);
2544 67832 : COPY_SCALAR_FIELD(generated_kind);
2545 67832 : COPY_SCALAR_FIELD(nulls_not_distinct);
2546 67832 : COPY_NODE_FIELD(keys);
2547 67832 : COPY_SCALAR_FIELD(without_overlaps);
2548 67832 : COPY_NODE_FIELD(including);
2549 67832 : COPY_NODE_FIELD(exclusions);
2550 67832 : COPY_NODE_FIELD(options);
2551 67832 : COPY_STRING_FIELD(indexname);
2552 67832 : COPY_STRING_FIELD(indexspace);
2553 67832 : COPY_SCALAR_FIELD(reset_default_tblspc);
2554 67832 : COPY_STRING_FIELD(access_method);
2555 67832 : COPY_NODE_FIELD(where_clause);
2556 67832 : COPY_NODE_FIELD(pktable);
2557 67832 : COPY_NODE_FIELD(fk_attrs);
2558 67832 : COPY_NODE_FIELD(pk_attrs);
2559 67832 : COPY_SCALAR_FIELD(fk_with_period);
2560 67832 : COPY_SCALAR_FIELD(pk_with_period);
2561 67832 : COPY_SCALAR_FIELD(fk_matchtype);
2562 67832 : COPY_SCALAR_FIELD(fk_upd_action);
2563 67832 : COPY_SCALAR_FIELD(fk_del_action);
2564 67832 : COPY_NODE_FIELD(fk_del_set_cols);
2565 67832 : COPY_NODE_FIELD(old_conpfeqop);
2566 67832 : COPY_SCALAR_FIELD(old_pktable_oid);
2567 67832 : COPY_LOCATION_FIELD(location);
2568 :
2569 67832 : return newnode;
2570 : }
2571 :
2572 : static CreateTableSpaceStmt *
2573 154 : _copyCreateTableSpaceStmt(const CreateTableSpaceStmt *from)
2574 : {
2575 154 : CreateTableSpaceStmt *newnode = makeNode(CreateTableSpaceStmt);
2576 :
2577 154 : COPY_STRING_FIELD(tablespacename);
2578 154 : COPY_NODE_FIELD(owner);
2579 154 : COPY_STRING_FIELD(location);
2580 154 : COPY_NODE_FIELD(options);
2581 :
2582 154 : return newnode;
2583 : }
2584 :
2585 : static DropTableSpaceStmt *
2586 70 : _copyDropTableSpaceStmt(const DropTableSpaceStmt *from)
2587 : {
2588 70 : DropTableSpaceStmt *newnode = makeNode(DropTableSpaceStmt);
2589 :
2590 70 : COPY_STRING_FIELD(tablespacename);
2591 70 : COPY_SCALAR_FIELD(missing_ok);
2592 :
2593 70 : 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 60 : _copyAlterTableMoveAllStmt(const AlterTableMoveAllStmt *from)
2610 : {
2611 60 : AlterTableMoveAllStmt *newnode = makeNode(AlterTableMoveAllStmt);
2612 :
2613 60 : COPY_STRING_FIELD(orig_tablespacename);
2614 60 : COPY_SCALAR_FIELD(objtype);
2615 60 : COPY_NODE_FIELD(roles);
2616 60 : COPY_STRING_FIELD(new_tablespacename);
2617 60 : COPY_SCALAR_FIELD(nowait);
2618 :
2619 60 : return newnode;
2620 : }
2621 :
2622 : static CreateExtensionStmt *
2623 643 : _copyCreateExtensionStmt(const CreateExtensionStmt *from)
2624 : {
2625 643 : CreateExtensionStmt *newnode = makeNode(CreateExtensionStmt);
2626 :
2627 643 : COPY_STRING_FIELD(extname);
2628 643 : COPY_SCALAR_FIELD(if_not_exists);
2629 643 : COPY_NODE_FIELD(options);
2630 :
2631 643 : 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 202 : _copyAlterFdwStmt(const AlterFdwStmt *from)
2672 : {
2673 202 : AlterFdwStmt *newnode = makeNode(AlterFdwStmt);
2674 :
2675 202 : COPY_STRING_FIELD(fdwname);
2676 202 : COPY_NODE_FIELD(func_options);
2677 202 : COPY_NODE_FIELD(options);
2678 :
2679 202 : return newnode;
2680 : }
2681 :
2682 : static CreateForeignServerStmt *
2683 390 : _copyCreateForeignServerStmt(const CreateForeignServerStmt *from)
2684 : {
2685 390 : CreateForeignServerStmt *newnode = makeNode(CreateForeignServerStmt);
2686 :
2687 390 : COPY_STRING_FIELD(servername);
2688 390 : COPY_STRING_FIELD(servertype);
2689 390 : COPY_STRING_FIELD(version);
2690 390 : COPY_STRING_FIELD(fdwname);
2691 390 : COPY_SCALAR_FIELD(if_not_exists);
2692 390 : COPY_NODE_FIELD(options);
2693 :
2694 390 : 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 572 : _copyCreateForeignTableStmt(const CreateForeignTableStmt *from)
2712 : {
2713 572 : CreateForeignTableStmt *newnode = makeNode(CreateForeignTableStmt);
2714 :
2715 572 : COPY_NODE_FIELD(base.relation);
2716 572 : COPY_NODE_FIELD(base.tableElts);
2717 572 : COPY_NODE_FIELD(base.inhRelations);
2718 572 : COPY_NODE_FIELD(base.partbound);
2719 572 : COPY_NODE_FIELD(base.partspec);
2720 572 : COPY_NODE_FIELD(base.ofTypename);
2721 572 : COPY_NODE_FIELD(base.constraints);
2722 572 : COPY_NODE_FIELD(base.nnconstraints);
2723 572 : COPY_NODE_FIELD(base.options);
2724 572 : COPY_SCALAR_FIELD(base.oncommit);
2725 572 : COPY_STRING_FIELD(base.tablespacename);
2726 572 : COPY_STRING_FIELD(base.accessMethod);
2727 572 : COPY_SCALAR_FIELD(base.if_not_exists);
2728 572 : COPY_STRING_FIELD(servername);
2729 572 : COPY_NODE_FIELD(options);
2730 :
2731 572 : return newnode;
2732 : }
2733 :
2734 : static CreateUserMappingStmt *
2735 332 : _copyCreateUserMappingStmt(const CreateUserMappingStmt *from)
2736 : {
2737 332 : CreateUserMappingStmt *newnode = makeNode(CreateUserMappingStmt);
2738 :
2739 332 : COPY_NODE_FIELD(user);
2740 332 : COPY_STRING_FIELD(servername);
2741 332 : COPY_SCALAR_FIELD(if_not_exists);
2742 332 : COPY_NODE_FIELD(options);
2743 :
2744 332 : return newnode;
2745 : }
2746 :
2747 : static AlterUserMappingStmt *
2748 144 : _copyAlterUserMappingStmt(const AlterUserMappingStmt *from)
2749 : {
2750 144 : AlterUserMappingStmt *newnode = makeNode(AlterUserMappingStmt);
2751 :
2752 144 : COPY_NODE_FIELD(user);
2753 144 : COPY_STRING_FIELD(servername);
2754 144 : COPY_NODE_FIELD(options);
2755 :
2756 144 : 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 4789 : _copyCreateTrigStmt(const CreateTrigStmt *from)
2830 : {
2831 4789 : CreateTrigStmt *newnode = makeNode(CreateTrigStmt);
2832 :
2833 4789 : COPY_SCALAR_FIELD(replace);
2834 4789 : COPY_SCALAR_FIELD(isconstraint);
2835 4789 : COPY_STRING_FIELD(trigname);
2836 4789 : COPY_NODE_FIELD(relation);
2837 4789 : COPY_NODE_FIELD(funcname);
2838 4789 : COPY_NODE_FIELD(args);
2839 4789 : COPY_SCALAR_FIELD(row);
2840 4789 : COPY_SCALAR_FIELD(timing);
2841 4789 : COPY_SCALAR_FIELD(events);
2842 4789 : COPY_NODE_FIELD(columns);
2843 4789 : COPY_NODE_FIELD(whenClause);
2844 4789 : COPY_NODE_FIELD(transitionRels);
2845 4789 : COPY_SCALAR_FIELD(deferrable);
2846 4789 : COPY_SCALAR_FIELD(initdeferred);
2847 4789 : COPY_NODE_FIELD(constrrel);
2848 :
2849 4789 : 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 2580 : _copyCreateRoleStmt(const CreateRoleStmt *from)
2893 : {
2894 2580 : CreateRoleStmt *newnode = makeNode(CreateRoleStmt);
2895 :
2896 2580 : COPY_SCALAR_FIELD(stmt_type);
2897 2580 : COPY_STRING_FIELD(role);
2898 2580 : COPY_NODE_FIELD(options);
2899 :
2900 2580 : 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 2444 : _copyDropRoleStmt(const DropRoleStmt *from)
2929 : {
2930 2444 : DropRoleStmt *newnode = makeNode(DropRoleStmt);
2931 :
2932 2444 : COPY_NODE_FIELD(roles);
2933 2444 : COPY_SCALAR_FIELD(missing_ok);
2934 :
2935 2444 : return newnode;
2936 : }
2937 :
2938 : static CreateSeqStmt *
2939 950 : _copyCreateSeqStmt(const CreateSeqStmt *from)
2940 : {
2941 950 : CreateSeqStmt *newnode = makeNode(CreateSeqStmt);
2942 :
2943 950 : COPY_NODE_FIELD(sequence);
2944 950 : COPY_NODE_FIELD(options);
2945 950 : COPY_SCALAR_FIELD(ownerId);
2946 950 : COPY_SCALAR_FIELD(for_identity);
2947 950 : COPY_SCALAR_FIELD(if_not_exists);
2948 :
2949 950 : return newnode;
2950 : }
2951 :
2952 : static AlterSeqStmt *
2953 333 : _copyAlterSeqStmt(const AlterSeqStmt *from)
2954 : {
2955 333 : AlterSeqStmt *newnode = makeNode(AlterSeqStmt);
2956 :
2957 333 : COPY_NODE_FIELD(sequence);
2958 333 : COPY_NODE_FIELD(options);
2959 333 : COPY_SCALAR_FIELD(for_identity);
2960 333 : COPY_SCALAR_FIELD(missing_ok);
2961 :
2962 333 : 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 35164 : _copyDropStmt(const DropStmt *from)
3050 : {
3051 35164 : DropStmt *newnode = makeNode(DropStmt);
3052 :
3053 35164 : COPY_NODE_FIELD(objects);
3054 35164 : COPY_SCALAR_FIELD(removeType);
3055 35164 : COPY_SCALAR_FIELD(behavior);
3056 35164 : COPY_SCALAR_FIELD(missing_ok);
3057 35164 : COPY_SCALAR_FIELD(concurrent);
3058 :
3059 35164 : return newnode;
3060 : }
3061 :
3062 : static TruncateStmt *
3063 2338 : _copyTruncateStmt(const TruncateStmt *from)
3064 : {
3065 2338 : TruncateStmt *newnode = makeNode(TruncateStmt);
3066 :
3067 2338 : COPY_NODE_FIELD(relations);
3068 2338 : COPY_SCALAR_FIELD(restart_seqs);
3069 2338 : COPY_SCALAR_FIELD(behavior);
3070 :
3071 2338 : 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 9057 : _copyDeclareCursorStmt(const DeclareCursorStmt *from)
3101 : {
3102 9057 : DeclareCursorStmt *newnode = makeNode(DeclareCursorStmt);
3103 :
3104 9057 : COPY_STRING_FIELD(portalname);
3105 9057 : COPY_SCALAR_FIELD(options);
3106 9057 : COPY_NODE_FIELD(query);
3107 :
3108 9057 : return newnode;
3109 : }
3110 :
3111 : static ClosePortalStmt *
3112 2362 : _copyClosePortalStmt(const ClosePortalStmt *from)
3113 : {
3114 2362 : ClosePortalStmt *newnode = makeNode(ClosePortalStmt);
3115 :
3116 2362 : COPY_STRING_FIELD(portalname);
3117 :
3118 2362 : return newnode;
3119 : }
3120 :
3121 : static FetchStmt *
3122 8870 : _copyFetchStmt(const FetchStmt *from)
3123 : {
3124 8870 : FetchStmt *newnode = makeNode(FetchStmt);
3125 :
3126 8870 : COPY_SCALAR_FIELD(direction);
3127 8870 : COPY_SCALAR_FIELD(howMany);
3128 8870 : COPY_STRING_FIELD(portalname);
3129 8870 : COPY_SCALAR_FIELD(ismove);
3130 8870 : COPY_SCALAR_FIELD(direction_keyword);
3131 8870 : COPY_LOCATION_FIELD(location);
3132 :
3133 8870 : return newnode;
3134 : }
3135 :
3136 : static IndexStmt *
3137 9166 : _copyIndexStmt(const IndexStmt *from)
3138 : {
3139 9166 : IndexStmt *newnode = makeNode(IndexStmt);
3140 :
3141 9166 : COPY_STRING_FIELD(idxname);
3142 9166 : COPY_NODE_FIELD(relation);
3143 9166 : COPY_STRING_FIELD(accessMethod);
3144 9166 : COPY_STRING_FIELD(tableSpace);
3145 9166 : COPY_NODE_FIELD(indexParams);
3146 9166 : COPY_NODE_FIELD(indexIncludingParams);
3147 9166 : COPY_NODE_FIELD(options);
3148 9166 : COPY_NODE_FIELD(whereClause);
3149 9166 : COPY_NODE_FIELD(excludeOpNames);
3150 9166 : COPY_STRING_FIELD(idxcomment);
3151 9166 : COPY_SCALAR_FIELD(indexOid);
3152 9166 : COPY_SCALAR_FIELD(oldNumber);
3153 9166 : COPY_SCALAR_FIELD(oldCreateSubid);
3154 9166 : COPY_SCALAR_FIELD(oldFirstRelfilelocatorSubid);
3155 9166 : COPY_SCALAR_FIELD(unique);
3156 9166 : COPY_SCALAR_FIELD(nulls_not_distinct);
3157 9166 : COPY_SCALAR_FIELD(primary);
3158 9166 : COPY_SCALAR_FIELD(isconstraint);
3159 9166 : COPY_SCALAR_FIELD(iswithoutoverlaps);
3160 9166 : COPY_SCALAR_FIELD(deferrable);
3161 9166 : COPY_SCALAR_FIELD(initdeferred);
3162 9166 : COPY_SCALAR_FIELD(transformed);
3163 9166 : COPY_SCALAR_FIELD(concurrent);
3164 9166 : COPY_SCALAR_FIELD(if_not_exists);
3165 9166 : COPY_SCALAR_FIELD(reset_default_tblspc);
3166 :
3167 9166 : 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 25892 : _copyCreateFunctionStmt(const CreateFunctionStmt *from)
3211 : {
3212 25892 : CreateFunctionStmt *newnode = makeNode(CreateFunctionStmt);
3213 :
3214 25892 : COPY_SCALAR_FIELD(is_procedure);
3215 25892 : COPY_SCALAR_FIELD(replace);
3216 25892 : COPY_NODE_FIELD(funcname);
3217 25892 : COPY_NODE_FIELD(parameters);
3218 25892 : COPY_NODE_FIELD(returnType);
3219 25892 : COPY_NODE_FIELD(options);
3220 25892 : COPY_NODE_FIELD(sql_body);
3221 :
3222 25892 : return newnode;
3223 : }
3224 :
3225 : static FunctionParameter *
3226 67292 : _copyFunctionParameter(const FunctionParameter *from)
3227 : {
3228 67292 : FunctionParameter *newnode = makeNode(FunctionParameter);
3229 :
3230 67292 : COPY_STRING_FIELD(name);
3231 67292 : COPY_NODE_FIELD(argType);
3232 67292 : COPY_SCALAR_FIELD(mode);
3233 67292 : COPY_NODE_FIELD(defexpr);
3234 67292 : COPY_LOCATION_FIELD(location);
3235 :
3236 67292 : return newnode;
3237 : }
3238 :
3239 : static AlterFunctionStmt *
3240 422 : _copyAlterFunctionStmt(const AlterFunctionStmt *from)
3241 : {
3242 422 : AlterFunctionStmt *newnode = makeNode(AlterFunctionStmt);
3243 :
3244 422 : COPY_SCALAR_FIELD(objtype);
3245 422 : COPY_NODE_FIELD(func);
3246 422 : COPY_NODE_FIELD(actions);
3247 :
3248 422 : return newnode;
3249 : }
3250 :
3251 : static DoStmt *
3252 1592 : _copyDoStmt(const DoStmt *from)
3253 : {
3254 1592 : DoStmt *newnode = makeNode(DoStmt);
3255 :
3256 1592 : COPY_NODE_FIELD(args);
3257 :
3258 1592 : return newnode;
3259 : }
3260 :
3261 : static CallStmt *
3262 969 : _copyCallStmt(const CallStmt *from)
3263 : {
3264 969 : CallStmt *newnode = makeNode(CallStmt);
3265 :
3266 969 : COPY_NODE_FIELD(funccall);
3267 969 : COPY_NODE_FIELD(funcexpr);
3268 969 : COPY_NODE_FIELD(outargs);
3269 :
3270 969 : return newnode;
3271 : }
3272 :
3273 : static RenameStmt *
3274 2030 : _copyRenameStmt(const RenameStmt *from)
3275 : {
3276 2030 : RenameStmt *newnode = makeNode(RenameStmt);
3277 :
3278 2030 : COPY_SCALAR_FIELD(renameType);
3279 2030 : COPY_SCALAR_FIELD(relationType);
3280 2030 : COPY_NODE_FIELD(relation);
3281 2030 : COPY_NODE_FIELD(object);
3282 2030 : COPY_STRING_FIELD(subname);
3283 2030 : COPY_STRING_FIELD(newname);
3284 2030 : COPY_SCALAR_FIELD(behavior);
3285 2030 : COPY_SCALAR_FIELD(missing_ok);
3286 :
3287 2030 : 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 1996 : _copyAlterOwnerStmt(const AlterOwnerStmt *from)
3320 : {
3321 1996 : AlterOwnerStmt *newnode = makeNode(AlterOwnerStmt);
3322 :
3323 1996 : COPY_SCALAR_FIELD(objectType);
3324 1996 : COPY_NODE_FIELD(relation);
3325 1996 : COPY_NODE_FIELD(object);
3326 1996 : COPY_NODE_FIELD(newowner);
3327 :
3328 1996 : 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 55605 : _copyTransactionStmt(const TransactionStmt *from)
3402 : {
3403 55605 : TransactionStmt *newnode = makeNode(TransactionStmt);
3404 :
3405 55605 : COPY_SCALAR_FIELD(kind);
3406 55605 : COPY_NODE_FIELD(options);
3407 55605 : COPY_STRING_FIELD(savepoint_name);
3408 55605 : COPY_STRING_FIELD(gid);
3409 55605 : COPY_SCALAR_FIELD(chain);
3410 55605 : COPY_LOCATION_FIELD(location);
3411 :
3412 55605 : return newnode;
3413 : }
3414 :
3415 : static CompositeTypeStmt *
3416 4745 : _copyCompositeTypeStmt(const CompositeTypeStmt *from)
3417 : {
3418 4745 : CompositeTypeStmt *newnode = makeNode(CompositeTypeStmt);
3419 :
3420 4745 : COPY_NODE_FIELD(typevar);
3421 4745 : COPY_NODE_FIELD(coldeflist);
3422 :
3423 4745 : 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 303 : _copyCreateRangeStmt(const CreateRangeStmt *from)
3439 : {
3440 303 : CreateRangeStmt *newnode = makeNode(CreateRangeStmt);
3441 :
3442 303 : COPY_NODE_FIELD(typeName);
3443 303 : COPY_NODE_FIELD(params);
3444 :
3445 303 : 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 21940 : _copyViewStmt(const ViewStmt *from)
3465 : {
3466 21940 : ViewStmt *newnode = makeNode(ViewStmt);
3467 :
3468 21940 : COPY_NODE_FIELD(view);
3469 21940 : COPY_NODE_FIELD(aliases);
3470 21940 : COPY_NODE_FIELD(query);
3471 21940 : COPY_SCALAR_FIELD(replace);
3472 21940 : COPY_NODE_FIELD(options);
3473 21940 : COPY_SCALAR_FIELD(withCheckOption);
3474 :
3475 21940 : 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 896 : _copyCreatedbStmt(const CreatedbStmt *from)
3490 : {
3491 896 : CreatedbStmt *newnode = makeNode(CreatedbStmt);
3492 :
3493 896 : COPY_STRING_FIELD(dbname);
3494 896 : COPY_NODE_FIELD(options);
3495 :
3496 896 : 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 148 : _copyDropdbStmt(const DropdbStmt *from)
3533 : {
3534 148 : DropdbStmt *newnode = makeNode(DropdbStmt);
3535 :
3536 148 : COPY_STRING_FIELD(dbname);
3537 148 : COPY_SCALAR_FIELD(missing_ok);
3538 148 : COPY_NODE_FIELD(options);
3539 :
3540 148 : return newnode;
3541 : }
3542 :
3543 : static AlterSystemStmt *
3544 236 : _copyAlterSystemStmt(const AlterSystemStmt *from)
3545 : {
3546 236 : AlterSystemStmt *newnode = makeNode(AlterSystemStmt);
3547 :
3548 236 : COPY_NODE_FIELD(setstmt);
3549 :
3550 236 : return newnode;
3551 : }
3552 :
3553 : static VacuumStmt *
3554 17594 : _copyVacuumStmt(const VacuumStmt *from)
3555 : {
3556 17594 : VacuumStmt *newnode = makeNode(VacuumStmt);
3557 :
3558 17594 : COPY_NODE_FIELD(options);
3559 17594 : COPY_NODE_FIELD(rels);
3560 17594 : COPY_SCALAR_FIELD(is_vacuumcmd);
3561 :
3562 17594 : return newnode;
3563 : }
3564 :
3565 : static VacuumRelation *
3566 17852 : _copyVacuumRelation(const VacuumRelation *from)
3567 : {
3568 17852 : VacuumRelation *newnode = makeNode(VacuumRelation);
3569 :
3570 17852 : COPY_NODE_FIELD(relation);
3571 17852 : COPY_SCALAR_FIELD(oid);
3572 17852 : COPY_NODE_FIELD(va_cols);
3573 :
3574 17852 : return newnode;
3575 : }
3576 :
3577 : static RepackStmt *
3578 468 : _copyRepackStmt(const RepackStmt *from)
3579 : {
3580 468 : RepackStmt *newnode = makeNode(RepackStmt);
3581 :
3582 468 : COPY_SCALAR_FIELD(command);
3583 468 : COPY_NODE_FIELD(relation);
3584 468 : COPY_STRING_FIELD(indexname);
3585 468 : COPY_SCALAR_FIELD(usingindex);
3586 468 : COPY_NODE_FIELD(params);
3587 :
3588 468 : return newnode;
3589 : }
3590 :
3591 : static ExplainStmt *
3592 54767 : _copyExplainStmt(const ExplainStmt *from)
3593 : {
3594 54767 : ExplainStmt *newnode = makeNode(ExplainStmt);
3595 :
3596 54767 : COPY_NODE_FIELD(query);
3597 54767 : COPY_NODE_FIELD(options);
3598 :
3599 54767 : return newnode;
3600 : }
3601 :
3602 : static CreateTableAsStmt *
3603 2696 : _copyCreateTableAsStmt(const CreateTableAsStmt *from)
3604 : {
3605 2696 : CreateTableAsStmt *newnode = makeNode(CreateTableAsStmt);
3606 :
3607 2696 : COPY_NODE_FIELD(query);
3608 2696 : COPY_NODE_FIELD(into);
3609 2696 : COPY_SCALAR_FIELD(objtype);
3610 2696 : COPY_SCALAR_FIELD(is_select_into);
3611 2696 : COPY_SCALAR_FIELD(if_not_exists);
3612 :
3613 2696 : 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 615 : _copyCheckPointStmt(const CheckPointStmt *from)
3630 : {
3631 615 : CheckPointStmt *newnode = makeNode(CheckPointStmt);
3632 :
3633 615 : COPY_NODE_FIELD(options);
3634 :
3635 615 : 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 1334 : _copyLockStmt(const LockStmt *from)
3650 : {
3651 1334 : LockStmt *newnode = makeNode(LockStmt);
3652 :
3653 1334 : COPY_NODE_FIELD(relations);
3654 1334 : COPY_SCALAR_FIELD(mode);
3655 1334 : COPY_SCALAR_FIELD(nowait);
3656 :
3657 1334 : 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 2040 : _copyPublicationTable(const PublicationTable *from)
3903 : {
3904 2040 : PublicationTable *newnode = makeNode(PublicationTable);
3905 :
3906 2040 : COPY_NODE_FIELD(relation);
3907 2040 : COPY_NODE_FIELD(whereClause);
3908 2040 : COPY_NODE_FIELD(columns);
3909 2040 : COPY_SCALAR_FIELD(except);
3910 :
3911 2040 : return newnode;
3912 : }
3913 :
3914 : static PublicationObjSpec *
3915 2568 : _copyPublicationObjSpec(const PublicationObjSpec *from)
3916 : {
3917 2568 : PublicationObjSpec *newnode = makeNode(PublicationObjSpec);
3918 :
3919 2568 : COPY_SCALAR_FIELD(pubobjtype);
3920 2568 : COPY_STRING_FIELD(name);
3921 2568 : COPY_NODE_FIELD(pubtable);
3922 2568 : COPY_LOCATION_FIELD(location);
3923 :
3924 2568 : 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 1260 : _copyCreatePublicationStmt(const CreatePublicationStmt *from)
3941 : {
3942 1260 : CreatePublicationStmt *newnode = makeNode(CreatePublicationStmt);
3943 :
3944 1260 : COPY_STRING_FIELD(pubname);
3945 1260 : COPY_NODE_FIELD(options);
3946 1260 : COPY_NODE_FIELD(pubobjects);
3947 1260 : COPY_SCALAR_FIELD(for_all_tables);
3948 1260 : COPY_SCALAR_FIELD(for_all_sequences);
3949 :
3950 1260 : 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 502 : _copyWaitStmt(const WaitStmt *from)
4011 : {
4012 502 : WaitStmt *newnode = makeNode(WaitStmt);
4013 :
4014 502 : COPY_STRING_FIELD(lsn_literal);
4015 502 : COPY_NODE_FIELD(options);
4016 :
4017 502 : 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 44847 : _copyAppendRelInfo(const AppendRelInfo *from)
4129 : {
4130 44847 : AppendRelInfo *newnode = makeNode(AppendRelInfo);
4131 :
4132 44847 : COPY_SCALAR_FIELD(parent_relid);
4133 44847 : COPY_SCALAR_FIELD(child_relid);
4134 44847 : COPY_SCALAR_FIELD(parent_reltype);
4135 44847 : COPY_SCALAR_FIELD(child_reltype);
4136 44847 : COPY_NODE_FIELD(translated_vars);
4137 44847 : COPY_SCALAR_FIELD(num_child_cols);
4138 44847 : COPY_POINTER_FIELD(parent_colnos, from->num_child_cols * sizeof(AttrNumber));
4139 44847 : COPY_SCALAR_FIELD(parent_reloid);
4140 :
4141 44847 : 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 369765 : _copyPlannedStmt(const PlannedStmt *from)
4184 : {
4185 369765 : PlannedStmt *newnode = makeNode(PlannedStmt);
4186 :
4187 369765 : COPY_SCALAR_FIELD(commandType);
4188 369765 : COPY_SCALAR_FIELD(queryId);
4189 369765 : COPY_SCALAR_FIELD(planId);
4190 369765 : COPY_SCALAR_FIELD(planOrigin);
4191 369765 : COPY_SCALAR_FIELD(hasReturning);
4192 369765 : COPY_SCALAR_FIELD(hasModifyingCTE);
4193 369765 : COPY_SCALAR_FIELD(canSetTag);
4194 369765 : COPY_SCALAR_FIELD(transientPlan);
4195 369765 : COPY_SCALAR_FIELD(dependsOnRole);
4196 369765 : COPY_SCALAR_FIELD(parallelModeNeeded);
4197 369765 : COPY_SCALAR_FIELD(jitFlags);
4198 369765 : COPY_NODE_FIELD(planTree);
4199 369765 : COPY_NODE_FIELD(partPruneInfos);
4200 369765 : COPY_NODE_FIELD(rtable);
4201 369765 : COPY_BITMAPSET_FIELD(unprunableRelids);
4202 369765 : COPY_NODE_FIELD(permInfos);
4203 369765 : COPY_BITMAPSET_FIELD(resultRelationRelids);
4204 369765 : COPY_NODE_FIELD(appendRelations);
4205 369765 : COPY_NODE_FIELD(subplans);
4206 369765 : COPY_NODE_FIELD(subrtinfos);
4207 369765 : COPY_BITMAPSET_FIELD(rewindPlanIDs);
4208 369765 : COPY_NODE_FIELD(rowMarks);
4209 369765 : COPY_BITMAPSET_FIELD(rowMarkRelids);
4210 369765 : COPY_NODE_FIELD(relationOids);
4211 369765 : COPY_NODE_FIELD(invalItems);
4212 369765 : COPY_NODE_FIELD(paramExecTypes);
4213 369765 : COPY_NODE_FIELD(utilityStmt);
4214 369765 : COPY_NODE_FIELD(elidedNodes);
4215 369765 : COPY_NODE_FIELD(extension_state);
4216 369765 : COPY_LOCATION_FIELD(stmt_location);
4217 369765 : COPY_LOCATION_FIELD(stmt_len);
4218 :
4219 369765 : return newnode;
4220 : }
4221 :
4222 : static Result *
4223 163067 : _copyResult(const Result *from)
4224 : {
4225 163067 : Result *newnode = makeNode(Result);
4226 :
4227 163067 : COPY_SCALAR_FIELD(plan.disabled_nodes);
4228 163067 : COPY_SCALAR_FIELD(plan.startup_cost);
4229 163067 : COPY_SCALAR_FIELD(plan.total_cost);
4230 163067 : COPY_SCALAR_FIELD(plan.plan_rows);
4231 163067 : COPY_SCALAR_FIELD(plan.plan_width);
4232 163067 : COPY_SCALAR_FIELD(plan.parallel_aware);
4233 163067 : COPY_SCALAR_FIELD(plan.parallel_safe);
4234 163067 : COPY_SCALAR_FIELD(plan.async_capable);
4235 163067 : COPY_SCALAR_FIELD(plan.plan_node_id);
4236 163067 : COPY_NODE_FIELD(plan.targetlist);
4237 163067 : COPY_NODE_FIELD(plan.qual);
4238 163067 : COPY_NODE_FIELD(plan.lefttree);
4239 163067 : COPY_NODE_FIELD(plan.righttree);
4240 163067 : COPY_NODE_FIELD(plan.initPlan);
4241 163067 : COPY_BITMAPSET_FIELD(plan.extParam);
4242 163067 : COPY_BITMAPSET_FIELD(plan.allParam);
4243 163067 : COPY_SCALAR_FIELD(result_type);
4244 163067 : COPY_NODE_FIELD(resconstantqual);
4245 163067 : COPY_BITMAPSET_FIELD(relids);
4246 :
4247 163067 : return newnode;
4248 : }
4249 :
4250 : static ProjectSet *
4251 9063 : _copyProjectSet(const ProjectSet *from)
4252 : {
4253 9063 : ProjectSet *newnode = makeNode(ProjectSet);
4254 :
4255 9063 : COPY_SCALAR_FIELD(plan.disabled_nodes);
4256 9063 : COPY_SCALAR_FIELD(plan.startup_cost);
4257 9063 : COPY_SCALAR_FIELD(plan.total_cost);
4258 9063 : COPY_SCALAR_FIELD(plan.plan_rows);
4259 9063 : COPY_SCALAR_FIELD(plan.plan_width);
4260 9063 : COPY_SCALAR_FIELD(plan.parallel_aware);
4261 9063 : COPY_SCALAR_FIELD(plan.parallel_safe);
4262 9063 : COPY_SCALAR_FIELD(plan.async_capable);
4263 9063 : COPY_SCALAR_FIELD(plan.plan_node_id);
4264 9063 : COPY_NODE_FIELD(plan.targetlist);
4265 9063 : COPY_NODE_FIELD(plan.qual);
4266 9063 : COPY_NODE_FIELD(plan.lefttree);
4267 9063 : COPY_NODE_FIELD(plan.righttree);
4268 9063 : COPY_NODE_FIELD(plan.initPlan);
4269 9063 : COPY_BITMAPSET_FIELD(plan.extParam);
4270 9063 : COPY_BITMAPSET_FIELD(plan.allParam);
4271 :
4272 9063 : return newnode;
4273 : }
4274 :
4275 : static ModifyTable *
4276 62467 : _copyModifyTable(const ModifyTable *from)
4277 : {
4278 62467 : ModifyTable *newnode = makeNode(ModifyTable);
4279 :
4280 62467 : COPY_SCALAR_FIELD(plan.disabled_nodes);
4281 62467 : COPY_SCALAR_FIELD(plan.startup_cost);
4282 62467 : COPY_SCALAR_FIELD(plan.total_cost);
4283 62467 : COPY_SCALAR_FIELD(plan.plan_rows);
4284 62467 : COPY_SCALAR_FIELD(plan.plan_width);
4285 62467 : COPY_SCALAR_FIELD(plan.parallel_aware);
4286 62467 : COPY_SCALAR_FIELD(plan.parallel_safe);
4287 62467 : COPY_SCALAR_FIELD(plan.async_capable);
4288 62467 : COPY_SCALAR_FIELD(plan.plan_node_id);
4289 62467 : COPY_NODE_FIELD(plan.targetlist);
4290 62467 : COPY_NODE_FIELD(plan.qual);
4291 62467 : COPY_NODE_FIELD(plan.lefttree);
4292 62467 : COPY_NODE_FIELD(plan.righttree);
4293 62467 : COPY_NODE_FIELD(plan.initPlan);
4294 62467 : COPY_BITMAPSET_FIELD(plan.extParam);
4295 62467 : COPY_BITMAPSET_FIELD(plan.allParam);
4296 62467 : COPY_SCALAR_FIELD(operation);
4297 62467 : COPY_SCALAR_FIELD(canSetTag);
4298 62467 : COPY_SCALAR_FIELD(nominalRelation);
4299 62467 : COPY_SCALAR_FIELD(rootRelation);
4300 62467 : COPY_NODE_FIELD(resultRelations);
4301 62467 : COPY_NODE_FIELD(updateColnosLists);
4302 62467 : COPY_NODE_FIELD(withCheckOptionLists);
4303 62467 : COPY_STRING_FIELD(returningOldAlias);
4304 62467 : COPY_STRING_FIELD(returningNewAlias);
4305 62467 : COPY_NODE_FIELD(returningLists);
4306 62467 : COPY_NODE_FIELD(fdwPrivLists);
4307 62467 : COPY_BITMAPSET_FIELD(fdwDirectModifyPlans);
4308 62467 : COPY_NODE_FIELD(rowMarks);
4309 62467 : COPY_SCALAR_FIELD(epqParam);
4310 62467 : COPY_SCALAR_FIELD(onConflictAction);
4311 62467 : COPY_NODE_FIELD(arbiterIndexes);
4312 62467 : COPY_SCALAR_FIELD(onConflictLockStrength);
4313 62467 : COPY_NODE_FIELD(onConflictSet);
4314 62467 : COPY_NODE_FIELD(onConflictCols);
4315 62467 : COPY_NODE_FIELD(onConflictWhere);
4316 62467 : COPY_NODE_FIELD(forPortionOf);
4317 62467 : COPY_SCALAR_FIELD(exclRelRTI);
4318 62467 : COPY_NODE_FIELD(exclRelTlist);
4319 62467 : COPY_NODE_FIELD(mergeActionLists);
4320 62467 : COPY_NODE_FIELD(mergeJoinConditions);
4321 :
4322 62467 : return newnode;
4323 : }
4324 :
4325 : static Append *
4326 13037 : _copyAppend(const Append *from)
4327 : {
4328 13037 : Append *newnode = makeNode(Append);
4329 :
4330 13037 : COPY_SCALAR_FIELD(plan.disabled_nodes);
4331 13037 : COPY_SCALAR_FIELD(plan.startup_cost);
4332 13037 : COPY_SCALAR_FIELD(plan.total_cost);
4333 13037 : COPY_SCALAR_FIELD(plan.plan_rows);
4334 13037 : COPY_SCALAR_FIELD(plan.plan_width);
4335 13037 : COPY_SCALAR_FIELD(plan.parallel_aware);
4336 13037 : COPY_SCALAR_FIELD(plan.parallel_safe);
4337 13037 : COPY_SCALAR_FIELD(plan.async_capable);
4338 13037 : COPY_SCALAR_FIELD(plan.plan_node_id);
4339 13037 : COPY_NODE_FIELD(plan.targetlist);
4340 13037 : COPY_NODE_FIELD(plan.qual);
4341 13037 : COPY_NODE_FIELD(plan.lefttree);
4342 13037 : COPY_NODE_FIELD(plan.righttree);
4343 13037 : COPY_NODE_FIELD(plan.initPlan);
4344 13037 : COPY_BITMAPSET_FIELD(plan.extParam);
4345 13037 : COPY_BITMAPSET_FIELD(plan.allParam);
4346 13037 : COPY_BITMAPSET_FIELD(apprelids);
4347 13037 : COPY_NODE_FIELD(child_append_relid_sets);
4348 13037 : COPY_NODE_FIELD(appendplans);
4349 13037 : COPY_SCALAR_FIELD(nasyncplans);
4350 13037 : COPY_SCALAR_FIELD(first_partial_plan);
4351 13037 : COPY_SCALAR_FIELD(part_prune_index);
4352 :
4353 13037 : 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 615 : _copyRecursiveUnion(const RecursiveUnion *from)
4392 : {
4393 615 : RecursiveUnion *newnode = makeNode(RecursiveUnion);
4394 :
4395 615 : COPY_SCALAR_FIELD(plan.disabled_nodes);
4396 615 : COPY_SCALAR_FIELD(plan.startup_cost);
4397 615 : COPY_SCALAR_FIELD(plan.total_cost);
4398 615 : COPY_SCALAR_FIELD(plan.plan_rows);
4399 615 : COPY_SCALAR_FIELD(plan.plan_width);
4400 615 : COPY_SCALAR_FIELD(plan.parallel_aware);
4401 615 : COPY_SCALAR_FIELD(plan.parallel_safe);
4402 615 : COPY_SCALAR_FIELD(plan.async_capable);
4403 615 : COPY_SCALAR_FIELD(plan.plan_node_id);
4404 615 : COPY_NODE_FIELD(plan.targetlist);
4405 615 : COPY_NODE_FIELD(plan.qual);
4406 615 : COPY_NODE_FIELD(plan.lefttree);
4407 615 : COPY_NODE_FIELD(plan.righttree);
4408 615 : COPY_NODE_FIELD(plan.initPlan);
4409 615 : COPY_BITMAPSET_FIELD(plan.extParam);
4410 615 : COPY_BITMAPSET_FIELD(plan.allParam);
4411 615 : COPY_SCALAR_FIELD(wtParam);
4412 615 : COPY_SCALAR_FIELD(numCols);
4413 615 : COPY_POINTER_FIELD(dupColIdx, from->numCols * sizeof(AttrNumber));
4414 615 : COPY_POINTER_FIELD(dupOperators, from->numCols * sizeof(Oid));
4415 615 : COPY_POINTER_FIELD(dupCollations, from->numCols * sizeof(Oid));
4416 615 : COPY_SCALAR_FIELD(numGroups);
4417 :
4418 615 : 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 170599 : _copySeqScan(const SeqScan *from)
4476 : {
4477 170599 : SeqScan *newnode = makeNode(SeqScan);
4478 :
4479 170599 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4480 170599 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4481 170599 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4482 170599 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4483 170599 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4484 170599 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4485 170599 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4486 170599 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4487 170599 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4488 170599 : COPY_NODE_FIELD(scan.plan.targetlist);
4489 170599 : COPY_NODE_FIELD(scan.plan.qual);
4490 170599 : COPY_NODE_FIELD(scan.plan.lefttree);
4491 170599 : COPY_NODE_FIELD(scan.plan.righttree);
4492 170599 : COPY_NODE_FIELD(scan.plan.initPlan);
4493 170599 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4494 170599 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4495 170599 : COPY_SCALAR_FIELD(scan.scanrelid);
4496 :
4497 170599 : 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 98659 : _copyIndexScan(const IndexScan *from)
4529 : {
4530 98659 : IndexScan *newnode = makeNode(IndexScan);
4531 :
4532 98659 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4533 98659 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4534 98659 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4535 98659 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4536 98659 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4537 98659 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4538 98659 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4539 98659 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4540 98659 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4541 98659 : COPY_NODE_FIELD(scan.plan.targetlist);
4542 98659 : COPY_NODE_FIELD(scan.plan.qual);
4543 98659 : COPY_NODE_FIELD(scan.plan.lefttree);
4544 98659 : COPY_NODE_FIELD(scan.plan.righttree);
4545 98659 : COPY_NODE_FIELD(scan.plan.initPlan);
4546 98659 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4547 98659 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4548 98659 : COPY_SCALAR_FIELD(scan.scanrelid);
4549 98659 : COPY_SCALAR_FIELD(indexid);
4550 98659 : COPY_NODE_FIELD(indexqual);
4551 98659 : COPY_NODE_FIELD(indexqualorig);
4552 98659 : COPY_NODE_FIELD(indexorderby);
4553 98659 : COPY_NODE_FIELD(indexorderbyorig);
4554 98659 : COPY_NODE_FIELD(indexorderbyops);
4555 98659 : COPY_SCALAR_FIELD(indexorderdir);
4556 :
4557 98659 : return newnode;
4558 : }
4559 :
4560 : static IndexOnlyScan *
4561 13720 : _copyIndexOnlyScan(const IndexOnlyScan *from)
4562 : {
4563 13720 : IndexOnlyScan *newnode = makeNode(IndexOnlyScan);
4564 :
4565 13720 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4566 13720 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4567 13720 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4568 13720 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4569 13720 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4570 13720 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4571 13720 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4572 13720 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4573 13720 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4574 13720 : COPY_NODE_FIELD(scan.plan.targetlist);
4575 13720 : COPY_NODE_FIELD(scan.plan.qual);
4576 13720 : COPY_NODE_FIELD(scan.plan.lefttree);
4577 13720 : COPY_NODE_FIELD(scan.plan.righttree);
4578 13720 : COPY_NODE_FIELD(scan.plan.initPlan);
4579 13720 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4580 13720 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4581 13720 : COPY_SCALAR_FIELD(scan.scanrelid);
4582 13720 : COPY_SCALAR_FIELD(indexid);
4583 13720 : COPY_NODE_FIELD(indexqual);
4584 13720 : COPY_NODE_FIELD(recheckqual);
4585 13720 : COPY_NODE_FIELD(indexorderby);
4586 13720 : COPY_NODE_FIELD(indextlist);
4587 13720 : COPY_SCALAR_FIELD(indexorderdir);
4588 :
4589 13720 : return newnode;
4590 : }
4591 :
4592 : static BitmapIndexScan *
4593 17673 : _copyBitmapIndexScan(const BitmapIndexScan *from)
4594 : {
4595 17673 : BitmapIndexScan *newnode = makeNode(BitmapIndexScan);
4596 :
4597 17673 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4598 17673 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4599 17673 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4600 17673 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4601 17673 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4602 17673 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4603 17673 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4604 17673 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4605 17673 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4606 17673 : COPY_NODE_FIELD(scan.plan.targetlist);
4607 17673 : COPY_NODE_FIELD(scan.plan.qual);
4608 17673 : COPY_NODE_FIELD(scan.plan.lefttree);
4609 17673 : COPY_NODE_FIELD(scan.plan.righttree);
4610 17673 : COPY_NODE_FIELD(scan.plan.initPlan);
4611 17673 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4612 17673 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4613 17673 : COPY_SCALAR_FIELD(scan.scanrelid);
4614 17673 : COPY_SCALAR_FIELD(indexid);
4615 17673 : COPY_SCALAR_FIELD(isshared);
4616 17673 : COPY_NODE_FIELD(indexqual);
4617 17673 : COPY_NODE_FIELD(indexqualorig);
4618 :
4619 17673 : return newnode;
4620 : }
4621 :
4622 : static BitmapHeapScan *
4623 17268 : _copyBitmapHeapScan(const BitmapHeapScan *from)
4624 : {
4625 17268 : BitmapHeapScan *newnode = makeNode(BitmapHeapScan);
4626 :
4627 17268 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4628 17268 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4629 17268 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4630 17268 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4631 17268 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4632 17268 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4633 17268 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4634 17268 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4635 17268 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4636 17268 : COPY_NODE_FIELD(scan.plan.targetlist);
4637 17268 : COPY_NODE_FIELD(scan.plan.qual);
4638 17268 : COPY_NODE_FIELD(scan.plan.lefttree);
4639 17268 : COPY_NODE_FIELD(scan.plan.righttree);
4640 17268 : COPY_NODE_FIELD(scan.plan.initPlan);
4641 17268 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4642 17268 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4643 17268 : COPY_SCALAR_FIELD(scan.scanrelid);
4644 17268 : COPY_NODE_FIELD(bitmapqualorig);
4645 :
4646 17268 : 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 15469 : _copySubqueryScan(const SubqueryScan *from)
4705 : {
4706 15469 : SubqueryScan *newnode = makeNode(SubqueryScan);
4707 :
4708 15469 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4709 15469 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4710 15469 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4711 15469 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4712 15469 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4713 15469 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4714 15469 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4715 15469 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4716 15469 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4717 15469 : COPY_NODE_FIELD(scan.plan.targetlist);
4718 15469 : COPY_NODE_FIELD(scan.plan.qual);
4719 15469 : COPY_NODE_FIELD(scan.plan.lefttree);
4720 15469 : COPY_NODE_FIELD(scan.plan.righttree);
4721 15469 : COPY_NODE_FIELD(scan.plan.initPlan);
4722 15469 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4723 15469 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4724 15469 : COPY_SCALAR_FIELD(scan.scanrelid);
4725 15469 : COPY_NODE_FIELD(subplan);
4726 15469 : COPY_SCALAR_FIELD(scanstatus);
4727 :
4728 15469 : return newnode;
4729 : }
4730 :
4731 : static FunctionScan *
4732 34307 : _copyFunctionScan(const FunctionScan *from)
4733 : {
4734 34307 : FunctionScan *newnode = makeNode(FunctionScan);
4735 :
4736 34307 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4737 34307 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4738 34307 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4739 34307 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4740 34307 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4741 34307 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4742 34307 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4743 34307 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4744 34307 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4745 34307 : COPY_NODE_FIELD(scan.plan.targetlist);
4746 34307 : COPY_NODE_FIELD(scan.plan.qual);
4747 34307 : COPY_NODE_FIELD(scan.plan.lefttree);
4748 34307 : COPY_NODE_FIELD(scan.plan.righttree);
4749 34307 : COPY_NODE_FIELD(scan.plan.initPlan);
4750 34307 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4751 34307 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4752 34307 : COPY_SCALAR_FIELD(scan.scanrelid);
4753 34307 : COPY_NODE_FIELD(functions);
4754 34307 : COPY_SCALAR_FIELD(funcordinality);
4755 :
4756 34307 : return newnode;
4757 : }
4758 :
4759 : static ValuesScan *
4760 5845 : _copyValuesScan(const ValuesScan *from)
4761 : {
4762 5845 : ValuesScan *newnode = makeNode(ValuesScan);
4763 :
4764 5845 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4765 5845 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4766 5845 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4767 5845 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4768 5845 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4769 5845 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4770 5845 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4771 5845 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4772 5845 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4773 5845 : COPY_NODE_FIELD(scan.plan.targetlist);
4774 5845 : COPY_NODE_FIELD(scan.plan.qual);
4775 5845 : COPY_NODE_FIELD(scan.plan.lefttree);
4776 5845 : COPY_NODE_FIELD(scan.plan.righttree);
4777 5845 : COPY_NODE_FIELD(scan.plan.initPlan);
4778 5845 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4779 5845 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4780 5845 : COPY_SCALAR_FIELD(scan.scanrelid);
4781 5845 : COPY_NODE_FIELD(values_lists);
4782 :
4783 5845 : 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 2832 : _copyCteScan(const CteScan *from)
4815 : {
4816 2832 : CteScan *newnode = makeNode(CteScan);
4817 :
4818 2832 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4819 2832 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4820 2832 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4821 2832 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4822 2832 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4823 2832 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4824 2832 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4825 2832 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4826 2832 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4827 2832 : COPY_NODE_FIELD(scan.plan.targetlist);
4828 2832 : COPY_NODE_FIELD(scan.plan.qual);
4829 2832 : COPY_NODE_FIELD(scan.plan.lefttree);
4830 2832 : COPY_NODE_FIELD(scan.plan.righttree);
4831 2832 : COPY_NODE_FIELD(scan.plan.initPlan);
4832 2832 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4833 2832 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4834 2832 : COPY_SCALAR_FIELD(scan.scanrelid);
4835 2832 : COPY_SCALAR_FIELD(ctePlanId);
4836 2832 : COPY_SCALAR_FIELD(cteParam);
4837 :
4838 2832 : return newnode;
4839 : }
4840 :
4841 : static NamedTuplestoreScan *
4842 686 : _copyNamedTuplestoreScan(const NamedTuplestoreScan *from)
4843 : {
4844 686 : NamedTuplestoreScan *newnode = makeNode(NamedTuplestoreScan);
4845 :
4846 686 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4847 686 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4848 686 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4849 686 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4850 686 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4851 686 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4852 686 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4853 686 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4854 686 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4855 686 : COPY_NODE_FIELD(scan.plan.targetlist);
4856 686 : COPY_NODE_FIELD(scan.plan.qual);
4857 686 : COPY_NODE_FIELD(scan.plan.lefttree);
4858 686 : COPY_NODE_FIELD(scan.plan.righttree);
4859 686 : COPY_NODE_FIELD(scan.plan.initPlan);
4860 686 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4861 686 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4862 686 : COPY_SCALAR_FIELD(scan.scanrelid);
4863 686 : COPY_STRING_FIELD(enrname);
4864 :
4865 686 : return newnode;
4866 : }
4867 :
4868 : static WorkTableScan *
4869 615 : _copyWorkTableScan(const WorkTableScan *from)
4870 : {
4871 615 : WorkTableScan *newnode = makeNode(WorkTableScan);
4872 :
4873 615 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4874 615 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4875 615 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4876 615 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4877 615 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4878 615 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4879 615 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4880 615 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4881 615 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4882 615 : COPY_NODE_FIELD(scan.plan.targetlist);
4883 615 : COPY_NODE_FIELD(scan.plan.qual);
4884 615 : COPY_NODE_FIELD(scan.plan.lefttree);
4885 615 : COPY_NODE_FIELD(scan.plan.righttree);
4886 615 : COPY_NODE_FIELD(scan.plan.initPlan);
4887 615 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4888 615 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4889 615 : COPY_SCALAR_FIELD(scan.scanrelid);
4890 615 : COPY_SCALAR_FIELD(wtParam);
4891 :
4892 615 : return newnode;
4893 : }
4894 :
4895 : static ForeignScan *
4896 1093 : _copyForeignScan(const ForeignScan *from)
4897 : {
4898 1093 : ForeignScan *newnode = makeNode(ForeignScan);
4899 :
4900 1093 : COPY_SCALAR_FIELD(scan.plan.disabled_nodes);
4901 1093 : COPY_SCALAR_FIELD(scan.plan.startup_cost);
4902 1093 : COPY_SCALAR_FIELD(scan.plan.total_cost);
4903 1093 : COPY_SCALAR_FIELD(scan.plan.plan_rows);
4904 1093 : COPY_SCALAR_FIELD(scan.plan.plan_width);
4905 1093 : COPY_SCALAR_FIELD(scan.plan.parallel_aware);
4906 1093 : COPY_SCALAR_FIELD(scan.plan.parallel_safe);
4907 1093 : COPY_SCALAR_FIELD(scan.plan.async_capable);
4908 1093 : COPY_SCALAR_FIELD(scan.plan.plan_node_id);
4909 1093 : COPY_NODE_FIELD(scan.plan.targetlist);
4910 1093 : COPY_NODE_FIELD(scan.plan.qual);
4911 1093 : COPY_NODE_FIELD(scan.plan.lefttree);
4912 1093 : COPY_NODE_FIELD(scan.plan.righttree);
4913 1093 : COPY_NODE_FIELD(scan.plan.initPlan);
4914 1093 : COPY_BITMAPSET_FIELD(scan.plan.extParam);
4915 1093 : COPY_BITMAPSET_FIELD(scan.plan.allParam);
4916 1093 : COPY_SCALAR_FIELD(scan.scanrelid);
4917 1093 : COPY_SCALAR_FIELD(operation);
4918 1093 : COPY_SCALAR_FIELD(resultRelation);
4919 1093 : COPY_SCALAR_FIELD(checkAsUser);
4920 1093 : COPY_SCALAR_FIELD(fs_server);
4921 1093 : COPY_NODE_FIELD(fdw_exprs);
4922 1093 : COPY_NODE_FIELD(fdw_private);
4923 1093 : COPY_NODE_FIELD(fdw_scan_tlist);
4924 1093 : COPY_NODE_FIELD(fdw_recheck_quals);
4925 1093 : COPY_BITMAPSET_FIELD(fs_relids);
4926 1093 : COPY_BITMAPSET_FIELD(fs_base_relids);
4927 1093 : COPY_SCALAR_FIELD(fsSystemCol);
4928 :
4929 1093 : 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 70105 : _copyNestLoop(const NestLoop *from)
4967 : {
4968 70105 : NestLoop *newnode = makeNode(NestLoop);
4969 :
4970 70105 : COPY_SCALAR_FIELD(join.plan.disabled_nodes);
4971 70105 : COPY_SCALAR_FIELD(join.plan.startup_cost);
4972 70105 : COPY_SCALAR_FIELD(join.plan.total_cost);
4973 70105 : COPY_SCALAR_FIELD(join.plan.plan_rows);
4974 70105 : COPY_SCALAR_FIELD(join.plan.plan_width);
4975 70105 : COPY_SCALAR_FIELD(join.plan.parallel_aware);
4976 70105 : COPY_SCALAR_FIELD(join.plan.parallel_safe);
4977 70105 : COPY_SCALAR_FIELD(join.plan.async_capable);
4978 70105 : COPY_SCALAR_FIELD(join.plan.plan_node_id);
4979 70105 : COPY_NODE_FIELD(join.plan.targetlist);
4980 70105 : COPY_NODE_FIELD(join.plan.qual);
4981 70105 : COPY_NODE_FIELD(join.plan.lefttree);
4982 70105 : COPY_NODE_FIELD(join.plan.righttree);
4983 70105 : COPY_NODE_FIELD(join.plan.initPlan);
4984 70105 : COPY_BITMAPSET_FIELD(join.plan.extParam);
4985 70105 : COPY_BITMAPSET_FIELD(join.plan.allParam);
4986 70105 : COPY_SCALAR_FIELD(join.jointype);
4987 70105 : COPY_SCALAR_FIELD(join.inner_unique);
4988 70105 : COPY_NODE_FIELD(join.joinqual);
4989 70105 : COPY_NODE_FIELD(nestParams);
4990 :
4991 70105 : return newnode;
4992 : }
4993 :
4994 : static NestLoopParam *
4995 43102 : _copyNestLoopParam(const NestLoopParam *from)
4996 : {
4997 43102 : NestLoopParam *newnode = makeNode(NestLoopParam);
4998 :
4999 43102 : COPY_SCALAR_FIELD(paramno);
5000 43102 : COPY_NODE_FIELD(paramval);
5001 :
5002 43102 : return newnode;
5003 : }
5004 :
5005 : static MergeJoin *
5006 6093 : _copyMergeJoin(const MergeJoin *from)
5007 : {
5008 6093 : MergeJoin *newnode = makeNode(MergeJoin);
5009 :
5010 6093 : COPY_SCALAR_FIELD(join.plan.disabled_nodes);
5011 6093 : COPY_SCALAR_FIELD(join.plan.startup_cost);
5012 6093 : COPY_SCALAR_FIELD(join.plan.total_cost);
5013 6093 : COPY_SCALAR_FIELD(join.plan.plan_rows);
5014 6093 : COPY_SCALAR_FIELD(join.plan.plan_width);
5015 6093 : COPY_SCALAR_FIELD(join.plan.parallel_aware);
5016 6093 : COPY_SCALAR_FIELD(join.plan.parallel_safe);
5017 6093 : COPY_SCALAR_FIELD(join.plan.async_capable);
5018 6093 : COPY_SCALAR_FIELD(join.plan.plan_node_id);
5019 6093 : COPY_NODE_FIELD(join.plan.targetlist);
5020 6093 : COPY_NODE_FIELD(join.plan.qual);
5021 6093 : COPY_NODE_FIELD(join.plan.lefttree);
5022 6093 : COPY_NODE_FIELD(join.plan.righttree);
5023 6093 : COPY_NODE_FIELD(join.plan.initPlan);
5024 6093 : COPY_BITMAPSET_FIELD(join.plan.extParam);
5025 6093 : COPY_BITMAPSET_FIELD(join.plan.allParam);
5026 6093 : COPY_SCALAR_FIELD(join.jointype);
5027 6093 : COPY_SCALAR_FIELD(join.inner_unique);
5028 6093 : COPY_NODE_FIELD(join.joinqual);
5029 6093 : COPY_SCALAR_FIELD(skip_mark_restore);
5030 6093 : COPY_NODE_FIELD(mergeclauses);
5031 6093 : COPY_POINTER_FIELD(mergeFamilies, list_length(from->mergeclauses) * sizeof(Oid));
5032 6093 : COPY_POINTER_FIELD(mergeCollations, list_length(from->mergeclauses) * sizeof(Oid));
5033 6093 : COPY_POINTER_FIELD(mergeReversals, list_length(from->mergeclauses) * sizeof(bool));
5034 6093 : COPY_POINTER_FIELD(mergeNullsFirst, list_length(from->mergeclauses) * sizeof(bool));
5035 :
5036 6093 : return newnode;
5037 : }
5038 :
5039 : static HashJoin *
5040 30121 : _copyHashJoin(const HashJoin *from)
5041 : {
5042 30121 : HashJoin *newnode = makeNode(HashJoin);
5043 :
5044 30121 : COPY_SCALAR_FIELD(join.plan.disabled_nodes);
5045 30121 : COPY_SCALAR_FIELD(join.plan.startup_cost);
5046 30121 : COPY_SCALAR_FIELD(join.plan.total_cost);
5047 30121 : COPY_SCALAR_FIELD(join.plan.plan_rows);
5048 30121 : COPY_SCALAR_FIELD(join.plan.plan_width);
5049 30121 : COPY_SCALAR_FIELD(join.plan.parallel_aware);
5050 30121 : COPY_SCALAR_FIELD(join.plan.parallel_safe);
5051 30121 : COPY_SCALAR_FIELD(join.plan.async_capable);
5052 30121 : COPY_SCALAR_FIELD(join.plan.plan_node_id);
5053 30121 : COPY_NODE_FIELD(join.plan.targetlist);
5054 30121 : COPY_NODE_FIELD(join.plan.qual);
5055 30121 : COPY_NODE_FIELD(join.plan.lefttree);
5056 30121 : COPY_NODE_FIELD(join.plan.righttree);
5057 30121 : COPY_NODE_FIELD(join.plan.initPlan);
5058 30121 : COPY_BITMAPSET_FIELD(join.plan.extParam);
5059 30121 : COPY_BITMAPSET_FIELD(join.plan.allParam);
5060 30121 : COPY_SCALAR_FIELD(join.jointype);
5061 30121 : COPY_SCALAR_FIELD(join.inner_unique);
5062 30121 : COPY_NODE_FIELD(join.joinqual);
5063 30121 : COPY_NODE_FIELD(hashclauses);
5064 30121 : COPY_NODE_FIELD(hashoperators);
5065 30121 : COPY_NODE_FIELD(hashcollations);
5066 30121 : COPY_NODE_FIELD(hashkeys);
5067 :
5068 30121 : return newnode;
5069 : }
5070 :
5071 : static Material *
5072 3013 : _copyMaterial(const Material *from)
5073 : {
5074 3013 : Material *newnode = makeNode(Material);
5075 :
5076 3013 : COPY_SCALAR_FIELD(plan.disabled_nodes);
5077 3013 : COPY_SCALAR_FIELD(plan.startup_cost);
5078 3013 : COPY_SCALAR_FIELD(plan.total_cost);
5079 3013 : COPY_SCALAR_FIELD(plan.plan_rows);
5080 3013 : COPY_SCALAR_FIELD(plan.plan_width);
5081 3013 : COPY_SCALAR_FIELD(plan.parallel_aware);
5082 3013 : COPY_SCALAR_FIELD(plan.parallel_safe);
5083 3013 : COPY_SCALAR_FIELD(plan.async_capable);
5084 3013 : COPY_SCALAR_FIELD(plan.plan_node_id);
5085 3013 : COPY_NODE_FIELD(plan.targetlist);
5086 3013 : COPY_NODE_FIELD(plan.qual);
5087 3013 : COPY_NODE_FIELD(plan.lefttree);
5088 3013 : COPY_NODE_FIELD(plan.righttree);
5089 3013 : COPY_NODE_FIELD(plan.initPlan);
5090 3013 : COPY_BITMAPSET_FIELD(plan.extParam);
5091 3013 : COPY_BITMAPSET_FIELD(plan.allParam);
5092 :
5093 3013 : return newnode;
5094 : }
5095 :
5096 : static Memoize *
5097 1767 : _copyMemoize(const Memoize *from)
5098 : {
5099 1767 : Memoize *newnode = makeNode(Memoize);
5100 :
5101 1767 : COPY_SCALAR_FIELD(plan.disabled_nodes);
5102 1767 : COPY_SCALAR_FIELD(plan.startup_cost);
5103 1767 : COPY_SCALAR_FIELD(plan.total_cost);
5104 1767 : COPY_SCALAR_FIELD(plan.plan_rows);
5105 1767 : COPY_SCALAR_FIELD(plan.plan_width);
5106 1767 : COPY_SCALAR_FIELD(plan.parallel_aware);
5107 1767 : COPY_SCALAR_FIELD(plan.parallel_safe);
5108 1767 : COPY_SCALAR_FIELD(plan.async_capable);
5109 1767 : COPY_SCALAR_FIELD(plan.plan_node_id);
5110 1767 : COPY_NODE_FIELD(plan.targetlist);
5111 1767 : COPY_NODE_FIELD(plan.qual);
5112 1767 : COPY_NODE_FIELD(plan.lefttree);
5113 1767 : COPY_NODE_FIELD(plan.righttree);
5114 1767 : COPY_NODE_FIELD(plan.initPlan);
5115 1767 : COPY_BITMAPSET_FIELD(plan.extParam);
5116 1767 : COPY_BITMAPSET_FIELD(plan.allParam);
5117 1767 : COPY_SCALAR_FIELD(numKeys);
5118 1767 : COPY_POINTER_FIELD(hashOperators, from->numKeys * sizeof(Oid));
5119 1767 : COPY_POINTER_FIELD(collations, from->numKeys * sizeof(Oid));
5120 1767 : COPY_NODE_FIELD(param_exprs);
5121 1767 : COPY_SCALAR_FIELD(singlerow);
5122 1767 : COPY_SCALAR_FIELD(binary_mode);
5123 1767 : COPY_SCALAR_FIELD(est_entries);
5124 1767 : COPY_BITMAPSET_FIELD(keyparamids);
5125 1767 : COPY_SCALAR_FIELD(est_calls);
5126 1767 : COPY_SCALAR_FIELD(est_unique_keys);
5127 1767 : COPY_SCALAR_FIELD(est_hit_ratio);
5128 :
5129 1767 : return newnode;
5130 : }
5131 :
5132 : static Sort *
5133 58836 : _copySort(const Sort *from)
5134 : {
5135 58836 : Sort *newnode = makeNode(Sort);
5136 :
5137 58836 : COPY_SCALAR_FIELD(plan.disabled_nodes);
5138 58836 : COPY_SCALAR_FIELD(plan.startup_cost);
5139 58836 : COPY_SCALAR_FIELD(plan.total_cost);
5140 58836 : COPY_SCALAR_FIELD(plan.plan_rows);
5141 58836 : COPY_SCALAR_FIELD(plan.plan_width);
5142 58836 : COPY_SCALAR_FIELD(plan.parallel_aware);
5143 58836 : COPY_SCALAR_FIELD(plan.parallel_safe);
5144 58836 : COPY_SCALAR_FIELD(plan.async_capable);
5145 58836 : COPY_SCALAR_FIELD(plan.plan_node_id);
5146 58836 : COPY_NODE_FIELD(plan.targetlist);
5147 58836 : COPY_NODE_FIELD(plan.qual);
5148 58836 : COPY_NODE_FIELD(plan.lefttree);
5149 58836 : COPY_NODE_FIELD(plan.righttree);
5150 58836 : COPY_NODE_FIELD(plan.initPlan);
5151 58836 : COPY_BITMAPSET_FIELD(plan.extParam);
5152 58836 : COPY_BITMAPSET_FIELD(plan.allParam);
5153 58836 : COPY_SCALAR_FIELD(numCols);
5154 58836 : COPY_POINTER_FIELD(sortColIdx, from->numCols * sizeof(AttrNumber));
5155 58836 : COPY_POINTER_FIELD(sortOperators, from->numCols * sizeof(Oid));
5156 58836 : COPY_POINTER_FIELD(collations, from->numCols * sizeof(Oid));
5157 58836 : COPY_POINTER_FIELD(nullsFirst, from->numCols * sizeof(bool));
5158 :
5159 58836 : 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 186 : _copyGroup(const Group *from)
5195 : {
5196 186 : Group *newnode = makeNode(Group);
5197 :
5198 186 : COPY_SCALAR_FIELD(plan.disabled_nodes);
5199 186 : COPY_SCALAR_FIELD(plan.startup_cost);
5200 186 : COPY_SCALAR_FIELD(plan.total_cost);
5201 186 : COPY_SCALAR_FIELD(plan.plan_rows);
5202 186 : COPY_SCALAR_FIELD(plan.plan_width);
5203 186 : COPY_SCALAR_FIELD(plan.parallel_aware);
5204 186 : COPY_SCALAR_FIELD(plan.parallel_safe);
5205 186 : COPY_SCALAR_FIELD(plan.async_capable);
5206 186 : COPY_SCALAR_FIELD(plan.plan_node_id);
5207 186 : COPY_NODE_FIELD(plan.targetlist);
5208 186 : COPY_NODE_FIELD(plan.qual);
5209 186 : COPY_NODE_FIELD(plan.lefttree);
5210 186 : COPY_NODE_FIELD(plan.righttree);
5211 186 : COPY_NODE_FIELD(plan.initPlan);
5212 186 : COPY_BITMAPSET_FIELD(plan.extParam);
5213 186 : COPY_BITMAPSET_FIELD(plan.allParam);
5214 186 : COPY_SCALAR_FIELD(numCols);
5215 186 : COPY_POINTER_FIELD(grpColIdx, from->numCols * sizeof(AttrNumber));
5216 186 : COPY_POINTER_FIELD(grpOperators, from->numCols * sizeof(Oid));
5217 186 : COPY_POINTER_FIELD(grpCollations, from->numCols * sizeof(Oid));
5218 :
5219 186 : return newnode;
5220 : }
5221 :
5222 : static Agg *
5223 35398 : _copyAgg(const Agg *from)
5224 : {
5225 35398 : Agg *newnode = makeNode(Agg);
5226 :
5227 35398 : COPY_SCALAR_FIELD(plan.disabled_nodes);
5228 35398 : COPY_SCALAR_FIELD(plan.startup_cost);
5229 35398 : COPY_SCALAR_FIELD(plan.total_cost);
5230 35398 : COPY_SCALAR_FIELD(plan.plan_rows);
5231 35398 : COPY_SCALAR_FIELD(plan.plan_width);
5232 35398 : COPY_SCALAR_FIELD(plan.parallel_aware);
5233 35398 : COPY_SCALAR_FIELD(plan.parallel_safe);
5234 35398 : COPY_SCALAR_FIELD(plan.async_capable);
5235 35398 : COPY_SCALAR_FIELD(plan.plan_node_id);
5236 35398 : COPY_NODE_FIELD(plan.targetlist);
5237 35398 : COPY_NODE_FIELD(plan.qual);
5238 35398 : COPY_NODE_FIELD(plan.lefttree);
5239 35398 : COPY_NODE_FIELD(plan.righttree);
5240 35398 : COPY_NODE_FIELD(plan.initPlan);
5241 35398 : COPY_BITMAPSET_FIELD(plan.extParam);
5242 35398 : COPY_BITMAPSET_FIELD(plan.allParam);
5243 35398 : COPY_SCALAR_FIELD(aggstrategy);
5244 35398 : COPY_SCALAR_FIELD(aggsplit);
5245 35398 : COPY_SCALAR_FIELD(numCols);
5246 35398 : COPY_POINTER_FIELD(grpColIdx, from->numCols * sizeof(AttrNumber));
5247 35398 : COPY_POINTER_FIELD(grpOperators, from->numCols * sizeof(Oid));
5248 35398 : COPY_POINTER_FIELD(grpCollations, from->numCols * sizeof(Oid));
5249 35398 : COPY_SCALAR_FIELD(numGroups);
5250 35398 : COPY_SCALAR_FIELD(transitionSpace);
5251 35398 : COPY_BITMAPSET_FIELD(aggParams);
5252 35398 : COPY_NODE_FIELD(groupingSets);
5253 35398 : COPY_NODE_FIELD(chain);
5254 :
5255 35398 : return newnode;
5256 : }
5257 :
5258 : static WindowAgg *
5259 1959 : _copyWindowAgg(const WindowAgg *from)
5260 : {
5261 1959 : WindowAgg *newnode = makeNode(WindowAgg);
5262 :
5263 1959 : COPY_SCALAR_FIELD(plan.disabled_nodes);
5264 1959 : COPY_SCALAR_FIELD(plan.startup_cost);
5265 1959 : COPY_SCALAR_FIELD(plan.total_cost);
5266 1959 : COPY_SCALAR_FIELD(plan.plan_rows);
5267 1959 : COPY_SCALAR_FIELD(plan.plan_width);
5268 1959 : COPY_SCALAR_FIELD(plan.parallel_aware);
5269 1959 : COPY_SCALAR_FIELD(plan.parallel_safe);
5270 1959 : COPY_SCALAR_FIELD(plan.async_capable);
5271 1959 : COPY_SCALAR_FIELD(plan.plan_node_id);
5272 1959 : COPY_NODE_FIELD(plan.targetlist);
5273 1959 : COPY_NODE_FIELD(plan.qual);
5274 1959 : COPY_NODE_FIELD(plan.lefttree);
5275 1959 : COPY_NODE_FIELD(plan.righttree);
5276 1959 : COPY_NODE_FIELD(plan.initPlan);
5277 1959 : COPY_BITMAPSET_FIELD(plan.extParam);
5278 1959 : COPY_BITMAPSET_FIELD(plan.allParam);
5279 1959 : COPY_STRING_FIELD(winname);
5280 1959 : COPY_SCALAR_FIELD(winref);
5281 1959 : COPY_SCALAR_FIELD(partNumCols);
5282 1959 : COPY_POINTER_FIELD(partColIdx, from->partNumCols * sizeof(AttrNumber));
5283 1959 : COPY_POINTER_FIELD(partOperators, from->partNumCols * sizeof(Oid));
5284 1959 : COPY_POINTER_FIELD(partCollations, from->partNumCols * sizeof(Oid));
5285 1959 : COPY_SCALAR_FIELD(ordNumCols);
5286 1959 : COPY_POINTER_FIELD(ordColIdx, from->ordNumCols * sizeof(AttrNumber));
5287 1959 : COPY_POINTER_FIELD(ordOperators, from->ordNumCols * sizeof(Oid));
5288 1959 : COPY_POINTER_FIELD(ordCollations, from->ordNumCols * sizeof(Oid));
5289 1959 : COPY_SCALAR_FIELD(frameOptions);
5290 1959 : COPY_NODE_FIELD(startOffset);
5291 1959 : COPY_NODE_FIELD(endOffset);
5292 1959 : COPY_NODE_FIELD(runCondition);
5293 1959 : COPY_NODE_FIELD(runConditionOrig);
5294 1959 : COPY_SCALAR_FIELD(startInRangeFunc);
5295 1959 : COPY_SCALAR_FIELD(endInRangeFunc);
5296 1959 : COPY_SCALAR_FIELD(inRangeColl);
5297 1959 : COPY_SCALAR_FIELD(inRangeAsc);
5298 1959 : COPY_SCALAR_FIELD(inRangeNullsFirst);
5299 1959 : COPY_SCALAR_FIELD(topWindow);
5300 :
5301 1959 : return newnode;
5302 : }
5303 :
5304 : static Unique *
5305 3592 : _copyUnique(const Unique *from)
5306 : {
5307 3592 : Unique *newnode = makeNode(Unique);
5308 :
5309 3592 : COPY_SCALAR_FIELD(plan.disabled_nodes);
5310 3592 : COPY_SCALAR_FIELD(plan.startup_cost);
5311 3592 : COPY_SCALAR_FIELD(plan.total_cost);
5312 3592 : COPY_SCALAR_FIELD(plan.plan_rows);
5313 3592 : COPY_SCALAR_FIELD(plan.plan_width);
5314 3592 : COPY_SCALAR_FIELD(plan.parallel_aware);
5315 3592 : COPY_SCALAR_FIELD(plan.parallel_safe);
5316 3592 : COPY_SCALAR_FIELD(plan.async_capable);
5317 3592 : COPY_SCALAR_FIELD(plan.plan_node_id);
5318 3592 : COPY_NODE_FIELD(plan.targetlist);
5319 3592 : COPY_NODE_FIELD(plan.qual);
5320 3592 : COPY_NODE_FIELD(plan.lefttree);
5321 3592 : COPY_NODE_FIELD(plan.righttree);
5322 3592 : COPY_NODE_FIELD(plan.initPlan);
5323 3592 : COPY_BITMAPSET_FIELD(plan.extParam);
5324 3592 : COPY_BITMAPSET_FIELD(plan.allParam);
5325 3592 : COPY_SCALAR_FIELD(numCols);
5326 3592 : COPY_POINTER_FIELD(uniqColIdx, from->numCols * sizeof(AttrNumber));
5327 3592 : COPY_POINTER_FIELD(uniqOperators, from->numCols * sizeof(Oid));
5328 3592 : COPY_POINTER_FIELD(uniqCollations, from->numCols * sizeof(Oid));
5329 :
5330 3592 : return newnode;
5331 : }
5332 :
5333 : static Gather *
5334 839 : _copyGather(const Gather *from)
5335 : {
5336 839 : Gather *newnode = makeNode(Gather);
5337 :
5338 839 : COPY_SCALAR_FIELD(plan.disabled_nodes);
5339 839 : COPY_SCALAR_FIELD(plan.startup_cost);
5340 839 : COPY_SCALAR_FIELD(plan.total_cost);
5341 839 : COPY_SCALAR_FIELD(plan.plan_rows);
5342 839 : COPY_SCALAR_FIELD(plan.plan_width);
5343 839 : COPY_SCALAR_FIELD(plan.parallel_aware);
5344 839 : COPY_SCALAR_FIELD(plan.parallel_safe);
5345 839 : COPY_SCALAR_FIELD(plan.async_capable);
5346 839 : COPY_SCALAR_FIELD(plan.plan_node_id);
5347 839 : COPY_NODE_FIELD(plan.targetlist);
5348 839 : COPY_NODE_FIELD(plan.qual);
5349 839 : COPY_NODE_FIELD(plan.lefttree);
5350 839 : COPY_NODE_FIELD(plan.righttree);
5351 839 : COPY_NODE_FIELD(plan.initPlan);
5352 839 : COPY_BITMAPSET_FIELD(plan.extParam);
5353 839 : COPY_BITMAPSET_FIELD(plan.allParam);
5354 839 : COPY_SCALAR_FIELD(num_workers);
5355 839 : COPY_SCALAR_FIELD(rescan_param);
5356 839 : COPY_SCALAR_FIELD(single_copy);
5357 839 : COPY_SCALAR_FIELD(invisible);
5358 839 : COPY_BITMAPSET_FIELD(initParam);
5359 :
5360 839 : 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 30121 : _copyHash(const Hash *from)
5398 : {
5399 30121 : Hash *newnode = makeNode(Hash);
5400 :
5401 30121 : COPY_SCALAR_FIELD(plan.disabled_nodes);
5402 30121 : COPY_SCALAR_FIELD(plan.startup_cost);
5403 30121 : COPY_SCALAR_FIELD(plan.total_cost);
5404 30121 : COPY_SCALAR_FIELD(plan.plan_rows);
5405 30121 : COPY_SCALAR_FIELD(plan.plan_width);
5406 30121 : COPY_SCALAR_FIELD(plan.parallel_aware);
5407 30121 : COPY_SCALAR_FIELD(plan.parallel_safe);
5408 30121 : COPY_SCALAR_FIELD(plan.async_capable);
5409 30121 : COPY_SCALAR_FIELD(plan.plan_node_id);
5410 30121 : COPY_NODE_FIELD(plan.targetlist);
5411 30121 : COPY_NODE_FIELD(plan.qual);
5412 30121 : COPY_NODE_FIELD(plan.lefttree);
5413 30121 : COPY_NODE_FIELD(plan.righttree);
5414 30121 : COPY_NODE_FIELD(plan.initPlan);
5415 30121 : COPY_BITMAPSET_FIELD(plan.extParam);
5416 30121 : COPY_BITMAPSET_FIELD(plan.allParam);
5417 30121 : COPY_NODE_FIELD(hashkeys);
5418 30121 : COPY_SCALAR_FIELD(skewTable);
5419 30121 : COPY_SCALAR_FIELD(skewColumn);
5420 30121 : COPY_SCALAR_FIELD(skewInherit);
5421 30121 : COPY_SCALAR_FIELD(rows_total);
5422 :
5423 30121 : 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 8322 : _copyLockRows(const LockRows *from)
5461 : {
5462 8322 : LockRows *newnode = makeNode(LockRows);
5463 :
5464 8322 : COPY_SCALAR_FIELD(plan.disabled_nodes);
5465 8322 : COPY_SCALAR_FIELD(plan.startup_cost);
5466 8322 : COPY_SCALAR_FIELD(plan.total_cost);
5467 8322 : COPY_SCALAR_FIELD(plan.plan_rows);
5468 8322 : COPY_SCALAR_FIELD(plan.plan_width);
5469 8322 : COPY_SCALAR_FIELD(plan.parallel_aware);
5470 8322 : COPY_SCALAR_FIELD(plan.parallel_safe);
5471 8322 : COPY_SCALAR_FIELD(plan.async_capable);
5472 8322 : COPY_SCALAR_FIELD(plan.plan_node_id);
5473 8322 : COPY_NODE_FIELD(plan.targetlist);
5474 8322 : COPY_NODE_FIELD(plan.qual);
5475 8322 : COPY_NODE_FIELD(plan.lefttree);
5476 8322 : COPY_NODE_FIELD(plan.righttree);
5477 8322 : COPY_NODE_FIELD(plan.initPlan);
5478 8322 : COPY_BITMAPSET_FIELD(plan.extParam);
5479 8322 : COPY_BITMAPSET_FIELD(plan.allParam);
5480 8322 : COPY_NODE_FIELD(rowMarks);
5481 8322 : COPY_SCALAR_FIELD(epqParam);
5482 :
5483 8322 : return newnode;
5484 : }
5485 :
5486 : static Limit *
5487 3401 : _copyLimit(const Limit *from)
5488 : {
5489 3401 : Limit *newnode = makeNode(Limit);
5490 :
5491 3401 : COPY_SCALAR_FIELD(plan.disabled_nodes);
5492 3401 : COPY_SCALAR_FIELD(plan.startup_cost);
5493 3401 : COPY_SCALAR_FIELD(plan.total_cost);
5494 3401 : COPY_SCALAR_FIELD(plan.plan_rows);
5495 3401 : COPY_SCALAR_FIELD(plan.plan_width);
5496 3401 : COPY_SCALAR_FIELD(plan.parallel_aware);
5497 3401 : COPY_SCALAR_FIELD(plan.parallel_safe);
5498 3401 : COPY_SCALAR_FIELD(plan.async_capable);
5499 3401 : COPY_SCALAR_FIELD(plan.plan_node_id);
5500 3401 : COPY_NODE_FIELD(plan.targetlist);
5501 3401 : COPY_NODE_FIELD(plan.qual);
5502 3401 : COPY_NODE_FIELD(plan.lefttree);
5503 3401 : COPY_NODE_FIELD(plan.righttree);
5504 3401 : COPY_NODE_FIELD(plan.initPlan);
5505 3401 : COPY_BITMAPSET_FIELD(plan.extParam);
5506 3401 : COPY_BITMAPSET_FIELD(plan.allParam);
5507 3401 : COPY_NODE_FIELD(limitOffset);
5508 3401 : COPY_NODE_FIELD(limitCount);
5509 3401 : COPY_SCALAR_FIELD(limitOption);
5510 3401 : COPY_SCALAR_FIELD(uniqNumCols);
5511 3401 : COPY_POINTER_FIELD(uniqColIdx, from->uniqNumCols * sizeof(AttrNumber));
5512 3401 : COPY_POINTER_FIELD(uniqOperators, from->uniqNumCols * sizeof(Oid));
5513 3401 : COPY_POINTER_FIELD(uniqCollations, from->uniqNumCols * sizeof(Oid));
5514 :
5515 3401 : return newnode;
5516 : }
5517 :
5518 : static PlanRowMark *
5519 26262 : _copyPlanRowMark(const PlanRowMark *from)
5520 : {
5521 26262 : PlanRowMark *newnode = makeNode(PlanRowMark);
5522 :
5523 26262 : COPY_SCALAR_FIELD(rti);
5524 26262 : COPY_SCALAR_FIELD(prti);
5525 26262 : COPY_SCALAR_FIELD(rowmarkId);
5526 26262 : COPY_SCALAR_FIELD(markType);
5527 26262 : COPY_SCALAR_FIELD(allMarkTypes);
5528 26262 : COPY_SCALAR_FIELD(strength);
5529 26262 : COPY_SCALAR_FIELD(waitPolicy);
5530 26262 : COPY_SCALAR_FIELD(isParent);
5531 :
5532 26262 : return newnode;
5533 : }
5534 :
5535 : static PartitionPruneInfo *
5536 499 : _copyPartitionPruneInfo(const PartitionPruneInfo *from)
5537 : {
5538 499 : PartitionPruneInfo *newnode = makeNode(PartitionPruneInfo);
5539 :
5540 499 : COPY_BITMAPSET_FIELD(relids);
5541 499 : COPY_NODE_FIELD(prune_infos);
5542 499 : COPY_BITMAPSET_FIELD(other_subplans);
5543 :
5544 499 : return newnode;
5545 : }
5546 :
5547 : static PartitionedRelPruneInfo *
5548 935 : _copyPartitionedRelPruneInfo(const PartitionedRelPruneInfo *from)
5549 : {
5550 935 : PartitionedRelPruneInfo *newnode = makeNode(PartitionedRelPruneInfo);
5551 :
5552 935 : COPY_SCALAR_FIELD(rtindex);
5553 935 : COPY_BITMAPSET_FIELD(present_parts);
5554 935 : COPY_SCALAR_FIELD(nparts);
5555 935 : COPY_POINTER_FIELD(subplan_map, from->nparts * sizeof(int));
5556 935 : COPY_POINTER_FIELD(subpart_map, from->nparts * sizeof(int));
5557 935 : COPY_POINTER_FIELD(leafpart_rti_map, from->nparts * sizeof(int));
5558 935 : COPY_POINTER_FIELD(relid_map, from->nparts * sizeof(Oid));
5559 935 : COPY_NODE_FIELD(initial_pruning_steps);
5560 935 : COPY_NODE_FIELD(exec_pruning_steps);
5561 935 : COPY_BITMAPSET_FIELD(execparamids);
5562 :
5563 935 : return newnode;
5564 : }
5565 :
5566 : static PartitionPruneStepOp *
5567 936 : _copyPartitionPruneStepOp(const PartitionPruneStepOp *from)
5568 : {
5569 936 : PartitionPruneStepOp *newnode = makeNode(PartitionPruneStepOp);
5570 :
5571 936 : COPY_SCALAR_FIELD(step.step_id);
5572 936 : COPY_SCALAR_FIELD(opstrategy);
5573 936 : COPY_NODE_FIELD(exprs);
5574 936 : COPY_NODE_FIELD(cmpfns);
5575 936 : COPY_BITMAPSET_FIELD(nullkeys);
5576 :
5577 936 : return newnode;
5578 : }
5579 :
5580 : static PartitionPruneStepCombine *
5581 191 : _copyPartitionPruneStepCombine(const PartitionPruneStepCombine *from)
5582 : {
5583 191 : PartitionPruneStepCombine *newnode = makeNode(PartitionPruneStepCombine);
5584 :
5585 191 : COPY_SCALAR_FIELD(step.step_id);
5586 191 : COPY_SCALAR_FIELD(combineOp);
5587 191 : COPY_NODE_FIELD(source_stepids);
5588 :
5589 191 : return newnode;
5590 : }
5591 :
5592 : static PlanInvalItem *
5593 38263 : _copyPlanInvalItem(const PlanInvalItem *from)
5594 : {
5595 38263 : PlanInvalItem *newnode = makeNode(PlanInvalItem);
5596 :
5597 38263 : COPY_SCALAR_FIELD(cacheId);
5598 38263 : COPY_SCALAR_FIELD(hashValue);
5599 :
5600 38263 : return newnode;
5601 : }
5602 :
5603 : static SubPlanRTInfo *
5604 60027 : _copySubPlanRTInfo(const SubPlanRTInfo *from)
5605 : {
5606 60027 : SubPlanRTInfo *newnode = makeNode(SubPlanRTInfo);
5607 :
5608 60027 : COPY_STRING_FIELD(plan_name);
5609 60027 : COPY_SCALAR_FIELD(rtoffset);
5610 60027 : COPY_SCALAR_FIELD(dummy);
5611 :
5612 60027 : return newnode;
5613 : }
5614 :
5615 : static ElidedNode *
5616 18960 : _copyElidedNode(const ElidedNode *from)
5617 : {
5618 18960 : ElidedNode *newnode = makeNode(ElidedNode);
5619 :
5620 18960 : COPY_SCALAR_FIELD(plan_node_id);
5621 18960 : COPY_SCALAR_FIELD(elided_type);
5622 18960 : COPY_BITMAPSET_FIELD(relids);
5623 :
5624 18960 : return newnode;
5625 : }
5626 :
5627 : static Integer *
5628 181974 : _copyInteger(const Integer *from)
5629 : {
5630 181974 : Integer *newnode = makeNode(Integer);
5631 :
5632 181974 : COPY_SCALAR_FIELD(ival);
5633 :
5634 181974 : 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 16583 : _copyBoolean(const Boolean *from)
5649 : {
5650 16583 : Boolean *newnode = makeNode(Boolean);
5651 :
5652 16583 : COPY_SCALAR_FIELD(boolval);
5653 :
5654 16583 : return newnode;
5655 : }
5656 :
5657 : static String *
5658 23725986 : _copyString(const String *from)
5659 : {
5660 23725986 : String *newnode = makeNode(String);
5661 :
5662 23725986 : COPY_STRING_FIELD(sval);
5663 :
5664 23725986 : 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 : }
|