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