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