/src/postgres/bld/src/backend/nodes/equalfuncs.funcs.c
Line | Count | Source |
1 | | /*------------------------------------------------------------------------- |
2 | | * |
3 | | * equalfuncs.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 bool |
43 | | _equalAlias(const Alias *a, const Alias *b) |
44 | 0 | { |
45 | 0 | COMPARE_STRING_FIELD(aliasname); |
46 | 0 | COMPARE_NODE_FIELD(colnames); |
47 | | |
48 | 0 | return true; |
49 | 0 | } |
50 | | |
51 | | static bool |
52 | | _equalRangeVar(const RangeVar *a, const RangeVar *b) |
53 | 0 | { |
54 | 0 | COMPARE_STRING_FIELD(catalogname); |
55 | 0 | COMPARE_STRING_FIELD(schemaname); |
56 | 0 | COMPARE_STRING_FIELD(relname); |
57 | 0 | COMPARE_SCALAR_FIELD(inh); |
58 | 0 | COMPARE_SCALAR_FIELD(relpersistence); |
59 | 0 | COMPARE_NODE_FIELD(alias); |
60 | 0 | COMPARE_LOCATION_FIELD(location); |
61 | |
|
62 | 0 | return true; |
63 | 0 | } |
64 | | |
65 | | static bool |
66 | | _equalTableFunc(const TableFunc *a, const TableFunc *b) |
67 | 0 | { |
68 | 0 | COMPARE_SCALAR_FIELD(functype); |
69 | 0 | COMPARE_NODE_FIELD(ns_uris); |
70 | 0 | COMPARE_NODE_FIELD(ns_names); |
71 | 0 | COMPARE_NODE_FIELD(docexpr); |
72 | 0 | COMPARE_NODE_FIELD(rowexpr); |
73 | 0 | COMPARE_NODE_FIELD(colnames); |
74 | 0 | COMPARE_NODE_FIELD(coltypes); |
75 | 0 | COMPARE_NODE_FIELD(coltypmods); |
76 | 0 | COMPARE_NODE_FIELD(colcollations); |
77 | 0 | COMPARE_NODE_FIELD(colexprs); |
78 | 0 | COMPARE_NODE_FIELD(coldefexprs); |
79 | 0 | COMPARE_NODE_FIELD(colvalexprs); |
80 | 0 | COMPARE_NODE_FIELD(passingvalexprs); |
81 | 0 | COMPARE_BITMAPSET_FIELD(notnulls); |
82 | 0 | COMPARE_NODE_FIELD(plan); |
83 | 0 | COMPARE_SCALAR_FIELD(ordinalitycol); |
84 | 0 | COMPARE_LOCATION_FIELD(location); |
85 | |
|
86 | 0 | return true; |
87 | 0 | } |
88 | | |
89 | | static bool |
90 | | _equalIntoClause(const IntoClause *a, const IntoClause *b) |
91 | 0 | { |
92 | 0 | COMPARE_NODE_FIELD(rel); |
93 | 0 | COMPARE_NODE_FIELD(colNames); |
94 | 0 | COMPARE_STRING_FIELD(accessMethod); |
95 | 0 | COMPARE_NODE_FIELD(options); |
96 | 0 | COMPARE_SCALAR_FIELD(onCommit); |
97 | 0 | COMPARE_STRING_FIELD(tableSpaceName); |
98 | 0 | COMPARE_NODE_FIELD(viewQuery); |
99 | 0 | COMPARE_SCALAR_FIELD(skipData); |
100 | | |
101 | 0 | return true; |
102 | 0 | } |
103 | | |
104 | | static bool |
105 | | _equalVar(const Var *a, const Var *b) |
106 | 0 | { |
107 | 0 | COMPARE_SCALAR_FIELD(varno); |
108 | 0 | COMPARE_SCALAR_FIELD(varattno); |
109 | 0 | COMPARE_SCALAR_FIELD(vartype); |
110 | 0 | COMPARE_SCALAR_FIELD(vartypmod); |
111 | 0 | COMPARE_SCALAR_FIELD(varcollid); |
112 | 0 | COMPARE_BITMAPSET_FIELD(varnullingrels); |
113 | 0 | COMPARE_SCALAR_FIELD(varlevelsup); |
114 | 0 | COMPARE_SCALAR_FIELD(varreturningtype); |
115 | 0 | COMPARE_LOCATION_FIELD(location); |
116 | |
|
117 | 0 | return true; |
118 | 0 | } |
119 | | |
120 | | static bool |
121 | | _equalParam(const Param *a, const Param *b) |
122 | 0 | { |
123 | 0 | COMPARE_SCALAR_FIELD(paramkind); |
124 | 0 | COMPARE_SCALAR_FIELD(paramid); |
125 | 0 | COMPARE_SCALAR_FIELD(paramtype); |
126 | 0 | COMPARE_SCALAR_FIELD(paramtypmod); |
127 | 0 | COMPARE_SCALAR_FIELD(paramcollid); |
128 | 0 | COMPARE_LOCATION_FIELD(location); |
129 | |
|
130 | 0 | return true; |
131 | 0 | } |
132 | | |
133 | | static bool |
134 | | _equalAggref(const Aggref *a, const Aggref *b) |
135 | 0 | { |
136 | 0 | COMPARE_SCALAR_FIELD(aggfnoid); |
137 | 0 | COMPARE_SCALAR_FIELD(aggtype); |
138 | 0 | COMPARE_SCALAR_FIELD(aggcollid); |
139 | 0 | COMPARE_SCALAR_FIELD(inputcollid); |
140 | 0 | COMPARE_NODE_FIELD(aggargtypes); |
141 | 0 | COMPARE_NODE_FIELD(aggdirectargs); |
142 | 0 | COMPARE_NODE_FIELD(args); |
143 | 0 | COMPARE_NODE_FIELD(aggorder); |
144 | 0 | COMPARE_NODE_FIELD(aggdistinct); |
145 | 0 | COMPARE_NODE_FIELD(aggfilter); |
146 | 0 | COMPARE_SCALAR_FIELD(aggstar); |
147 | 0 | COMPARE_SCALAR_FIELD(aggvariadic); |
148 | 0 | COMPARE_SCALAR_FIELD(aggkind); |
149 | 0 | COMPARE_SCALAR_FIELD(agglevelsup); |
150 | 0 | COMPARE_SCALAR_FIELD(aggsplit); |
151 | 0 | COMPARE_SCALAR_FIELD(aggno); |
152 | 0 | COMPARE_SCALAR_FIELD(aggtransno); |
153 | 0 | COMPARE_LOCATION_FIELD(location); |
154 | |
|
155 | 0 | return true; |
156 | 0 | } |
157 | | |
158 | | static bool |
159 | | _equalGroupingFunc(const GroupingFunc *a, const GroupingFunc *b) |
160 | 0 | { |
161 | 0 | COMPARE_NODE_FIELD(args); |
162 | 0 | COMPARE_SCALAR_FIELD(agglevelsup); |
163 | 0 | COMPARE_LOCATION_FIELD(location); |
164 | |
|
165 | 0 | return true; |
166 | 0 | } |
167 | | |
168 | | static bool |
169 | | _equalWindowFunc(const WindowFunc *a, const WindowFunc *b) |
170 | 0 | { |
171 | 0 | COMPARE_SCALAR_FIELD(winfnoid); |
172 | 0 | COMPARE_SCALAR_FIELD(wintype); |
173 | 0 | COMPARE_SCALAR_FIELD(wincollid); |
174 | 0 | COMPARE_SCALAR_FIELD(inputcollid); |
175 | 0 | COMPARE_NODE_FIELD(args); |
176 | 0 | COMPARE_NODE_FIELD(aggfilter); |
177 | 0 | COMPARE_NODE_FIELD(runCondition); |
178 | 0 | COMPARE_SCALAR_FIELD(winref); |
179 | 0 | COMPARE_SCALAR_FIELD(winstar); |
180 | 0 | COMPARE_SCALAR_FIELD(winagg); |
181 | 0 | COMPARE_SCALAR_FIELD(ignore_nulls); |
182 | 0 | COMPARE_LOCATION_FIELD(location); |
183 | |
|
184 | 0 | return true; |
185 | 0 | } |
186 | | |
187 | | static bool |
188 | | _equalWindowFuncRunCondition(const WindowFuncRunCondition *a, const WindowFuncRunCondition *b) |
189 | 0 | { |
190 | 0 | COMPARE_SCALAR_FIELD(opno); |
191 | 0 | COMPARE_SCALAR_FIELD(inputcollid); |
192 | 0 | COMPARE_SCALAR_FIELD(wfunc_left); |
193 | 0 | COMPARE_NODE_FIELD(arg); |
194 | | |
195 | 0 | return true; |
196 | 0 | } |
197 | | |
198 | | static bool |
199 | | _equalMergeSupportFunc(const MergeSupportFunc *a, const MergeSupportFunc *b) |
200 | 0 | { |
201 | 0 | COMPARE_SCALAR_FIELD(msftype); |
202 | 0 | COMPARE_SCALAR_FIELD(msfcollid); |
203 | 0 | COMPARE_LOCATION_FIELD(location); |
204 | |
|
205 | 0 | return true; |
206 | 0 | } |
207 | | |
208 | | static bool |
209 | | _equalSubscriptingRef(const SubscriptingRef *a, const SubscriptingRef *b) |
210 | 0 | { |
211 | 0 | COMPARE_SCALAR_FIELD(refcontainertype); |
212 | 0 | COMPARE_SCALAR_FIELD(refelemtype); |
213 | 0 | COMPARE_SCALAR_FIELD(refrestype); |
214 | 0 | COMPARE_SCALAR_FIELD(reftypmod); |
215 | 0 | COMPARE_SCALAR_FIELD(refcollid); |
216 | 0 | COMPARE_NODE_FIELD(refupperindexpr); |
217 | 0 | COMPARE_NODE_FIELD(reflowerindexpr); |
218 | 0 | COMPARE_NODE_FIELD(refexpr); |
219 | 0 | COMPARE_NODE_FIELD(refassgnexpr); |
220 | | |
221 | 0 | return true; |
222 | 0 | } |
223 | | |
224 | | static bool |
225 | | _equalFuncExpr(const FuncExpr *a, const FuncExpr *b) |
226 | 0 | { |
227 | 0 | COMPARE_SCALAR_FIELD(funcid); |
228 | 0 | COMPARE_SCALAR_FIELD(funcresulttype); |
229 | 0 | COMPARE_SCALAR_FIELD(funcretset); |
230 | 0 | COMPARE_SCALAR_FIELD(funcvariadic); |
231 | 0 | COMPARE_SCALAR_FIELD(funccollid); |
232 | 0 | COMPARE_SCALAR_FIELD(inputcollid); |
233 | 0 | COMPARE_NODE_FIELD(args); |
234 | 0 | COMPARE_LOCATION_FIELD(location); |
235 | |
|
236 | 0 | return true; |
237 | 0 | } |
238 | | |
239 | | static bool |
240 | | _equalNamedArgExpr(const NamedArgExpr *a, const NamedArgExpr *b) |
241 | 0 | { |
242 | 0 | COMPARE_NODE_FIELD(arg); |
243 | 0 | COMPARE_STRING_FIELD(name); |
244 | 0 | COMPARE_SCALAR_FIELD(argnumber); |
245 | 0 | COMPARE_LOCATION_FIELD(location); |
246 | |
|
247 | 0 | return true; |
248 | 0 | } |
249 | | |
250 | | static bool |
251 | | _equalOpExpr(const OpExpr *a, const OpExpr *b) |
252 | 0 | { |
253 | 0 | COMPARE_SCALAR_FIELD(opno); |
254 | 0 | if (a->opfuncid != b->opfuncid && a->opfuncid != 0 && b->opfuncid != 0) |
255 | 0 | return false; |
256 | 0 | COMPARE_SCALAR_FIELD(opresulttype); |
257 | 0 | COMPARE_SCALAR_FIELD(opretset); |
258 | 0 | COMPARE_SCALAR_FIELD(opcollid); |
259 | 0 | COMPARE_SCALAR_FIELD(inputcollid); |
260 | 0 | COMPARE_NODE_FIELD(args); |
261 | 0 | COMPARE_LOCATION_FIELD(location); |
262 | |
|
263 | 0 | return true; |
264 | 0 | } |
265 | | |
266 | | static bool |
267 | | _equalDistinctExpr(const DistinctExpr *a, const DistinctExpr *b) |
268 | 0 | { |
269 | 0 | COMPARE_SCALAR_FIELD(opno); |
270 | 0 | if (a->opfuncid != b->opfuncid && a->opfuncid != 0 && b->opfuncid != 0) |
271 | 0 | return false; |
272 | 0 | COMPARE_SCALAR_FIELD(opresulttype); |
273 | 0 | COMPARE_SCALAR_FIELD(opretset); |
274 | 0 | COMPARE_SCALAR_FIELD(opcollid); |
275 | 0 | COMPARE_SCALAR_FIELD(inputcollid); |
276 | 0 | COMPARE_NODE_FIELD(args); |
277 | 0 | COMPARE_LOCATION_FIELD(location); |
278 | |
|
279 | 0 | return true; |
280 | 0 | } |
281 | | |
282 | | static bool |
283 | | _equalNullIfExpr(const NullIfExpr *a, const NullIfExpr *b) |
284 | 0 | { |
285 | 0 | COMPARE_SCALAR_FIELD(opno); |
286 | 0 | if (a->opfuncid != b->opfuncid && a->opfuncid != 0 && b->opfuncid != 0) |
287 | 0 | return false; |
288 | 0 | COMPARE_SCALAR_FIELD(opresulttype); |
289 | 0 | COMPARE_SCALAR_FIELD(opretset); |
290 | 0 | COMPARE_SCALAR_FIELD(opcollid); |
291 | 0 | COMPARE_SCALAR_FIELD(inputcollid); |
292 | 0 | COMPARE_NODE_FIELD(args); |
293 | 0 | COMPARE_LOCATION_FIELD(location); |
294 | |
|
295 | 0 | return true; |
296 | 0 | } |
297 | | |
298 | | static bool |
299 | | _equalScalarArrayOpExpr(const ScalarArrayOpExpr *a, const ScalarArrayOpExpr *b) |
300 | 0 | { |
301 | 0 | COMPARE_SCALAR_FIELD(opno); |
302 | 0 | if (a->opfuncid != b->opfuncid && a->opfuncid != 0 && b->opfuncid != 0) |
303 | 0 | return false; |
304 | 0 | if (a->hashfuncid != b->hashfuncid && a->hashfuncid != 0 && b->hashfuncid != 0) |
305 | 0 | return false; |
306 | 0 | if (a->negfuncid != b->negfuncid && a->negfuncid != 0 && b->negfuncid != 0) |
307 | 0 | return false; |
308 | 0 | COMPARE_SCALAR_FIELD(useOr); |
309 | 0 | COMPARE_SCALAR_FIELD(inputcollid); |
310 | 0 | COMPARE_NODE_FIELD(args); |
311 | 0 | COMPARE_LOCATION_FIELD(location); |
312 | |
|
313 | 0 | return true; |
314 | 0 | } |
315 | | |
316 | | static bool |
317 | | _equalBoolExpr(const BoolExpr *a, const BoolExpr *b) |
318 | 0 | { |
319 | 0 | COMPARE_SCALAR_FIELD(boolop); |
320 | 0 | COMPARE_NODE_FIELD(args); |
321 | 0 | COMPARE_LOCATION_FIELD(location); |
322 | |
|
323 | 0 | return true; |
324 | 0 | } |
325 | | |
326 | | static bool |
327 | | _equalSubLink(const SubLink *a, const SubLink *b) |
328 | 0 | { |
329 | 0 | COMPARE_SCALAR_FIELD(subLinkType); |
330 | 0 | COMPARE_SCALAR_FIELD(subLinkId); |
331 | 0 | COMPARE_NODE_FIELD(testexpr); |
332 | 0 | COMPARE_NODE_FIELD(operName); |
333 | 0 | COMPARE_NODE_FIELD(subselect); |
334 | 0 | COMPARE_LOCATION_FIELD(location); |
335 | |
|
336 | 0 | return true; |
337 | 0 | } |
338 | | |
339 | | static bool |
340 | | _equalSubPlan(const SubPlan *a, const SubPlan *b) |
341 | 0 | { |
342 | 0 | COMPARE_SCALAR_FIELD(subLinkType); |
343 | 0 | COMPARE_NODE_FIELD(testexpr); |
344 | 0 | COMPARE_NODE_FIELD(paramIds); |
345 | 0 | COMPARE_SCALAR_FIELD(plan_id); |
346 | 0 | COMPARE_STRING_FIELD(plan_name); |
347 | 0 | COMPARE_SCALAR_FIELD(firstColType); |
348 | 0 | COMPARE_SCALAR_FIELD(firstColTypmod); |
349 | 0 | COMPARE_SCALAR_FIELD(firstColCollation); |
350 | 0 | COMPARE_SCALAR_FIELD(isInitPlan); |
351 | 0 | COMPARE_SCALAR_FIELD(useHashTable); |
352 | 0 | COMPARE_SCALAR_FIELD(unknownEqFalse); |
353 | 0 | COMPARE_SCALAR_FIELD(parallel_safe); |
354 | 0 | COMPARE_NODE_FIELD(setParam); |
355 | 0 | COMPARE_NODE_FIELD(parParam); |
356 | 0 | COMPARE_NODE_FIELD(args); |
357 | 0 | COMPARE_SCALAR_FIELD(startup_cost); |
358 | 0 | COMPARE_SCALAR_FIELD(per_call_cost); |
359 | | |
360 | 0 | return true; |
361 | 0 | } |
362 | | |
363 | | static bool |
364 | | _equalAlternativeSubPlan(const AlternativeSubPlan *a, const AlternativeSubPlan *b) |
365 | 0 | { |
366 | 0 | COMPARE_NODE_FIELD(subplans); |
367 | | |
368 | 0 | return true; |
369 | 0 | } |
370 | | |
371 | | static bool |
372 | | _equalFieldSelect(const FieldSelect *a, const FieldSelect *b) |
373 | 0 | { |
374 | 0 | COMPARE_NODE_FIELD(arg); |
375 | 0 | COMPARE_SCALAR_FIELD(fieldnum); |
376 | 0 | COMPARE_SCALAR_FIELD(resulttype); |
377 | 0 | COMPARE_SCALAR_FIELD(resulttypmod); |
378 | 0 | COMPARE_SCALAR_FIELD(resultcollid); |
379 | | |
380 | 0 | return true; |
381 | 0 | } |
382 | | |
383 | | static bool |
384 | | _equalFieldStore(const FieldStore *a, const FieldStore *b) |
385 | 0 | { |
386 | 0 | COMPARE_NODE_FIELD(arg); |
387 | 0 | COMPARE_NODE_FIELD(newvals); |
388 | 0 | COMPARE_NODE_FIELD(fieldnums); |
389 | 0 | COMPARE_SCALAR_FIELD(resulttype); |
390 | | |
391 | 0 | return true; |
392 | 0 | } |
393 | | |
394 | | static bool |
395 | | _equalRelabelType(const RelabelType *a, const RelabelType *b) |
396 | 0 | { |
397 | 0 | COMPARE_NODE_FIELD(arg); |
398 | 0 | COMPARE_SCALAR_FIELD(resulttype); |
399 | 0 | COMPARE_SCALAR_FIELD(resulttypmod); |
400 | 0 | COMPARE_SCALAR_FIELD(resultcollid); |
401 | 0 | COMPARE_LOCATION_FIELD(location); |
402 | |
|
403 | 0 | return true; |
404 | 0 | } |
405 | | |
406 | | static bool |
407 | | _equalCoerceViaIO(const CoerceViaIO *a, const CoerceViaIO *b) |
408 | 0 | { |
409 | 0 | COMPARE_NODE_FIELD(arg); |
410 | 0 | COMPARE_SCALAR_FIELD(resulttype); |
411 | 0 | COMPARE_SCALAR_FIELD(resultcollid); |
412 | 0 | COMPARE_LOCATION_FIELD(location); |
413 | |
|
414 | 0 | return true; |
415 | 0 | } |
416 | | |
417 | | static bool |
418 | | _equalArrayCoerceExpr(const ArrayCoerceExpr *a, const ArrayCoerceExpr *b) |
419 | 0 | { |
420 | 0 | COMPARE_NODE_FIELD(arg); |
421 | 0 | COMPARE_NODE_FIELD(elemexpr); |
422 | 0 | COMPARE_SCALAR_FIELD(resulttype); |
423 | 0 | COMPARE_SCALAR_FIELD(resulttypmod); |
424 | 0 | COMPARE_SCALAR_FIELD(resultcollid); |
425 | 0 | COMPARE_LOCATION_FIELD(location); |
426 | |
|
427 | 0 | return true; |
428 | 0 | } |
429 | | |
430 | | static bool |
431 | | _equalConvertRowtypeExpr(const ConvertRowtypeExpr *a, const ConvertRowtypeExpr *b) |
432 | 0 | { |
433 | 0 | COMPARE_NODE_FIELD(arg); |
434 | 0 | COMPARE_SCALAR_FIELD(resulttype); |
435 | 0 | COMPARE_LOCATION_FIELD(location); |
436 | |
|
437 | 0 | return true; |
438 | 0 | } |
439 | | |
440 | | static bool |
441 | | _equalCollateExpr(const CollateExpr *a, const CollateExpr *b) |
442 | 0 | { |
443 | 0 | COMPARE_NODE_FIELD(arg); |
444 | 0 | COMPARE_SCALAR_FIELD(collOid); |
445 | 0 | COMPARE_LOCATION_FIELD(location); |
446 | |
|
447 | 0 | return true; |
448 | 0 | } |
449 | | |
450 | | static bool |
451 | | _equalCaseExpr(const CaseExpr *a, const CaseExpr *b) |
452 | 0 | { |
453 | 0 | COMPARE_SCALAR_FIELD(casetype); |
454 | 0 | COMPARE_SCALAR_FIELD(casecollid); |
455 | 0 | COMPARE_NODE_FIELD(arg); |
456 | 0 | COMPARE_NODE_FIELD(args); |
457 | 0 | COMPARE_NODE_FIELD(defresult); |
458 | 0 | COMPARE_LOCATION_FIELD(location); |
459 | |
|
460 | 0 | return true; |
461 | 0 | } |
462 | | |
463 | | static bool |
464 | | _equalCaseWhen(const CaseWhen *a, const CaseWhen *b) |
465 | 0 | { |
466 | 0 | COMPARE_NODE_FIELD(expr); |
467 | 0 | COMPARE_NODE_FIELD(result); |
468 | 0 | COMPARE_LOCATION_FIELD(location); |
469 | |
|
470 | 0 | return true; |
471 | 0 | } |
472 | | |
473 | | static bool |
474 | | _equalCaseTestExpr(const CaseTestExpr *a, const CaseTestExpr *b) |
475 | 0 | { |
476 | 0 | COMPARE_SCALAR_FIELD(typeId); |
477 | 0 | COMPARE_SCALAR_FIELD(typeMod); |
478 | 0 | COMPARE_SCALAR_FIELD(collation); |
479 | | |
480 | 0 | return true; |
481 | 0 | } |
482 | | |
483 | | static bool |
484 | | _equalArrayExpr(const ArrayExpr *a, const ArrayExpr *b) |
485 | 0 | { |
486 | 0 | COMPARE_SCALAR_FIELD(array_typeid); |
487 | 0 | COMPARE_SCALAR_FIELD(array_collid); |
488 | 0 | COMPARE_SCALAR_FIELD(element_typeid); |
489 | 0 | COMPARE_NODE_FIELD(elements); |
490 | 0 | COMPARE_SCALAR_FIELD(multidims); |
491 | 0 | COMPARE_LOCATION_FIELD(list_start); |
492 | 0 | COMPARE_LOCATION_FIELD(list_end); |
493 | 0 | COMPARE_LOCATION_FIELD(location); |
494 | |
|
495 | 0 | return true; |
496 | 0 | } |
497 | | |
498 | | static bool |
499 | | _equalRowExpr(const RowExpr *a, const RowExpr *b) |
500 | 0 | { |
501 | 0 | COMPARE_NODE_FIELD(args); |
502 | 0 | COMPARE_SCALAR_FIELD(row_typeid); |
503 | 0 | COMPARE_NODE_FIELD(colnames); |
504 | 0 | COMPARE_LOCATION_FIELD(location); |
505 | |
|
506 | 0 | return true; |
507 | 0 | } |
508 | | |
509 | | static bool |
510 | | _equalRowCompareExpr(const RowCompareExpr *a, const RowCompareExpr *b) |
511 | 0 | { |
512 | 0 | COMPARE_SCALAR_FIELD(cmptype); |
513 | 0 | COMPARE_NODE_FIELD(opnos); |
514 | 0 | COMPARE_NODE_FIELD(opfamilies); |
515 | 0 | COMPARE_NODE_FIELD(inputcollids); |
516 | 0 | COMPARE_NODE_FIELD(largs); |
517 | 0 | COMPARE_NODE_FIELD(rargs); |
518 | | |
519 | 0 | return true; |
520 | 0 | } |
521 | | |
522 | | static bool |
523 | | _equalCoalesceExpr(const CoalesceExpr *a, const CoalesceExpr *b) |
524 | 0 | { |
525 | 0 | COMPARE_SCALAR_FIELD(coalescetype); |
526 | 0 | COMPARE_SCALAR_FIELD(coalescecollid); |
527 | 0 | COMPARE_NODE_FIELD(args); |
528 | 0 | COMPARE_LOCATION_FIELD(location); |
529 | |
|
530 | 0 | return true; |
531 | 0 | } |
532 | | |
533 | | static bool |
534 | | _equalMinMaxExpr(const MinMaxExpr *a, const MinMaxExpr *b) |
535 | 0 | { |
536 | 0 | COMPARE_SCALAR_FIELD(minmaxtype); |
537 | 0 | COMPARE_SCALAR_FIELD(minmaxcollid); |
538 | 0 | COMPARE_SCALAR_FIELD(inputcollid); |
539 | 0 | COMPARE_SCALAR_FIELD(op); |
540 | 0 | COMPARE_NODE_FIELD(args); |
541 | 0 | COMPARE_LOCATION_FIELD(location); |
542 | |
|
543 | 0 | return true; |
544 | 0 | } |
545 | | |
546 | | static bool |
547 | | _equalSQLValueFunction(const SQLValueFunction *a, const SQLValueFunction *b) |
548 | 0 | { |
549 | 0 | COMPARE_SCALAR_FIELD(op); |
550 | 0 | COMPARE_SCALAR_FIELD(type); |
551 | 0 | COMPARE_SCALAR_FIELD(typmod); |
552 | 0 | COMPARE_LOCATION_FIELD(location); |
553 | |
|
554 | 0 | return true; |
555 | 0 | } |
556 | | |
557 | | static bool |
558 | | _equalXmlExpr(const XmlExpr *a, const XmlExpr *b) |
559 | 0 | { |
560 | 0 | COMPARE_SCALAR_FIELD(op); |
561 | 0 | COMPARE_STRING_FIELD(name); |
562 | 0 | COMPARE_NODE_FIELD(named_args); |
563 | 0 | COMPARE_NODE_FIELD(arg_names); |
564 | 0 | COMPARE_NODE_FIELD(args); |
565 | 0 | COMPARE_SCALAR_FIELD(xmloption); |
566 | 0 | COMPARE_SCALAR_FIELD(indent); |
567 | 0 | COMPARE_SCALAR_FIELD(type); |
568 | 0 | COMPARE_SCALAR_FIELD(typmod); |
569 | 0 | COMPARE_LOCATION_FIELD(location); |
570 | |
|
571 | 0 | return true; |
572 | 0 | } |
573 | | |
574 | | static bool |
575 | | _equalJsonFormat(const JsonFormat *a, const JsonFormat *b) |
576 | 0 | { |
577 | 0 | COMPARE_SCALAR_FIELD(format_type); |
578 | 0 | COMPARE_SCALAR_FIELD(encoding); |
579 | 0 | COMPARE_LOCATION_FIELD(location); |
580 | |
|
581 | 0 | return true; |
582 | 0 | } |
583 | | |
584 | | static bool |
585 | | _equalJsonReturning(const JsonReturning *a, const JsonReturning *b) |
586 | 0 | { |
587 | 0 | COMPARE_NODE_FIELD(format); |
588 | 0 | COMPARE_SCALAR_FIELD(typid); |
589 | 0 | COMPARE_SCALAR_FIELD(typmod); |
590 | | |
591 | 0 | return true; |
592 | 0 | } |
593 | | |
594 | | static bool |
595 | | _equalJsonValueExpr(const JsonValueExpr *a, const JsonValueExpr *b) |
596 | 0 | { |
597 | 0 | COMPARE_NODE_FIELD(raw_expr); |
598 | 0 | COMPARE_NODE_FIELD(formatted_expr); |
599 | 0 | COMPARE_NODE_FIELD(format); |
600 | | |
601 | 0 | return true; |
602 | 0 | } |
603 | | |
604 | | static bool |
605 | | _equalJsonConstructorExpr(const JsonConstructorExpr *a, const JsonConstructorExpr *b) |
606 | 0 | { |
607 | 0 | COMPARE_SCALAR_FIELD(type); |
608 | 0 | COMPARE_NODE_FIELD(args); |
609 | 0 | COMPARE_NODE_FIELD(func); |
610 | 0 | COMPARE_NODE_FIELD(coercion); |
611 | 0 | COMPARE_NODE_FIELD(returning); |
612 | 0 | COMPARE_SCALAR_FIELD(absent_on_null); |
613 | 0 | COMPARE_SCALAR_FIELD(unique); |
614 | 0 | COMPARE_LOCATION_FIELD(location); |
615 | |
|
616 | 0 | return true; |
617 | 0 | } |
618 | | |
619 | | static bool |
620 | | _equalJsonIsPredicate(const JsonIsPredicate *a, const JsonIsPredicate *b) |
621 | 0 | { |
622 | 0 | COMPARE_NODE_FIELD(expr); |
623 | 0 | COMPARE_NODE_FIELD(format); |
624 | 0 | COMPARE_SCALAR_FIELD(item_type); |
625 | 0 | COMPARE_SCALAR_FIELD(unique_keys); |
626 | 0 | COMPARE_LOCATION_FIELD(location); |
627 | |
|
628 | 0 | return true; |
629 | 0 | } |
630 | | |
631 | | static bool |
632 | | _equalJsonBehavior(const JsonBehavior *a, const JsonBehavior *b) |
633 | 0 | { |
634 | 0 | COMPARE_SCALAR_FIELD(btype); |
635 | 0 | COMPARE_NODE_FIELD(expr); |
636 | 0 | COMPARE_SCALAR_FIELD(coerce); |
637 | 0 | COMPARE_LOCATION_FIELD(location); |
638 | |
|
639 | 0 | return true; |
640 | 0 | } |
641 | | |
642 | | static bool |
643 | | _equalJsonExpr(const JsonExpr *a, const JsonExpr *b) |
644 | 0 | { |
645 | 0 | COMPARE_SCALAR_FIELD(op); |
646 | 0 | COMPARE_STRING_FIELD(column_name); |
647 | 0 | COMPARE_NODE_FIELD(formatted_expr); |
648 | 0 | COMPARE_NODE_FIELD(format); |
649 | 0 | COMPARE_NODE_FIELD(path_spec); |
650 | 0 | COMPARE_NODE_FIELD(returning); |
651 | 0 | COMPARE_NODE_FIELD(passing_names); |
652 | 0 | COMPARE_NODE_FIELD(passing_values); |
653 | 0 | COMPARE_NODE_FIELD(on_empty); |
654 | 0 | COMPARE_NODE_FIELD(on_error); |
655 | 0 | COMPARE_SCALAR_FIELD(use_io_coercion); |
656 | 0 | COMPARE_SCALAR_FIELD(use_json_coercion); |
657 | 0 | COMPARE_SCALAR_FIELD(wrapper); |
658 | 0 | COMPARE_SCALAR_FIELD(omit_quotes); |
659 | 0 | COMPARE_SCALAR_FIELD(collation); |
660 | 0 | COMPARE_LOCATION_FIELD(location); |
661 | |
|
662 | 0 | return true; |
663 | 0 | } |
664 | | |
665 | | static bool |
666 | | _equalJsonTablePath(const JsonTablePath *a, const JsonTablePath *b) |
667 | 0 | { |
668 | 0 | COMPARE_NODE_FIELD(value); |
669 | 0 | COMPARE_STRING_FIELD(name); |
670 | | |
671 | 0 | return true; |
672 | 0 | } |
673 | | |
674 | | static bool |
675 | | _equalJsonTablePathScan(const JsonTablePathScan *a, const JsonTablePathScan *b) |
676 | 0 | { |
677 | 0 | COMPARE_NODE_FIELD(path); |
678 | 0 | COMPARE_SCALAR_FIELD(errorOnError); |
679 | 0 | COMPARE_NODE_FIELD(child); |
680 | 0 | COMPARE_SCALAR_FIELD(colMin); |
681 | 0 | COMPARE_SCALAR_FIELD(colMax); |
682 | | |
683 | 0 | return true; |
684 | 0 | } |
685 | | |
686 | | static bool |
687 | | _equalJsonTableSiblingJoin(const JsonTableSiblingJoin *a, const JsonTableSiblingJoin *b) |
688 | 0 | { |
689 | 0 | COMPARE_NODE_FIELD(lplan); |
690 | 0 | COMPARE_NODE_FIELD(rplan); |
691 | | |
692 | 0 | return true; |
693 | 0 | } |
694 | | |
695 | | static bool |
696 | | _equalNullTest(const NullTest *a, const NullTest *b) |
697 | 0 | { |
698 | 0 | COMPARE_NODE_FIELD(arg); |
699 | 0 | COMPARE_SCALAR_FIELD(nulltesttype); |
700 | 0 | COMPARE_SCALAR_FIELD(argisrow); |
701 | 0 | COMPARE_LOCATION_FIELD(location); |
702 | |
|
703 | 0 | return true; |
704 | 0 | } |
705 | | |
706 | | static bool |
707 | | _equalBooleanTest(const BooleanTest *a, const BooleanTest *b) |
708 | 0 | { |
709 | 0 | COMPARE_NODE_FIELD(arg); |
710 | 0 | COMPARE_SCALAR_FIELD(booltesttype); |
711 | 0 | COMPARE_LOCATION_FIELD(location); |
712 | |
|
713 | 0 | return true; |
714 | 0 | } |
715 | | |
716 | | static bool |
717 | | _equalMergeAction(const MergeAction *a, const MergeAction *b) |
718 | 0 | { |
719 | 0 | COMPARE_SCALAR_FIELD(matchKind); |
720 | 0 | COMPARE_SCALAR_FIELD(commandType); |
721 | 0 | COMPARE_SCALAR_FIELD(override); |
722 | 0 | COMPARE_NODE_FIELD(qual); |
723 | 0 | COMPARE_NODE_FIELD(targetList); |
724 | 0 | COMPARE_NODE_FIELD(updateColnos); |
725 | | |
726 | 0 | return true; |
727 | 0 | } |
728 | | |
729 | | static bool |
730 | | _equalCoerceToDomain(const CoerceToDomain *a, const CoerceToDomain *b) |
731 | 0 | { |
732 | 0 | COMPARE_NODE_FIELD(arg); |
733 | 0 | COMPARE_SCALAR_FIELD(resulttype); |
734 | 0 | COMPARE_SCALAR_FIELD(resulttypmod); |
735 | 0 | COMPARE_SCALAR_FIELD(resultcollid); |
736 | 0 | COMPARE_LOCATION_FIELD(location); |
737 | |
|
738 | 0 | return true; |
739 | 0 | } |
740 | | |
741 | | static bool |
742 | | _equalCoerceToDomainValue(const CoerceToDomainValue *a, const CoerceToDomainValue *b) |
743 | 0 | { |
744 | 0 | COMPARE_SCALAR_FIELD(typeId); |
745 | 0 | COMPARE_SCALAR_FIELD(typeMod); |
746 | 0 | COMPARE_SCALAR_FIELD(collation); |
747 | 0 | COMPARE_LOCATION_FIELD(location); |
748 | |
|
749 | 0 | return true; |
750 | 0 | } |
751 | | |
752 | | static bool |
753 | | _equalSetToDefault(const SetToDefault *a, const SetToDefault *b) |
754 | 0 | { |
755 | 0 | COMPARE_SCALAR_FIELD(typeId); |
756 | 0 | COMPARE_SCALAR_FIELD(typeMod); |
757 | 0 | COMPARE_SCALAR_FIELD(collation); |
758 | 0 | COMPARE_LOCATION_FIELD(location); |
759 | |
|
760 | 0 | return true; |
761 | 0 | } |
762 | | |
763 | | static bool |
764 | | _equalCurrentOfExpr(const CurrentOfExpr *a, const CurrentOfExpr *b) |
765 | 0 | { |
766 | 0 | COMPARE_SCALAR_FIELD(cvarno); |
767 | 0 | COMPARE_STRING_FIELD(cursor_name); |
768 | 0 | COMPARE_SCALAR_FIELD(cursor_param); |
769 | | |
770 | 0 | return true; |
771 | 0 | } |
772 | | |
773 | | static bool |
774 | | _equalNextValueExpr(const NextValueExpr *a, const NextValueExpr *b) |
775 | 0 | { |
776 | 0 | COMPARE_SCALAR_FIELD(seqid); |
777 | 0 | COMPARE_SCALAR_FIELD(typeId); |
778 | | |
779 | 0 | return true; |
780 | 0 | } |
781 | | |
782 | | static bool |
783 | | _equalInferenceElem(const InferenceElem *a, const InferenceElem *b) |
784 | 0 | { |
785 | 0 | COMPARE_NODE_FIELD(expr); |
786 | 0 | COMPARE_SCALAR_FIELD(infercollid); |
787 | 0 | COMPARE_SCALAR_FIELD(inferopclass); |
788 | | |
789 | 0 | return true; |
790 | 0 | } |
791 | | |
792 | | static bool |
793 | | _equalReturningExpr(const ReturningExpr *a, const ReturningExpr *b) |
794 | 0 | { |
795 | 0 | COMPARE_SCALAR_FIELD(retlevelsup); |
796 | 0 | COMPARE_SCALAR_FIELD(retold); |
797 | 0 | COMPARE_NODE_FIELD(retexpr); |
798 | | |
799 | 0 | return true; |
800 | 0 | } |
801 | | |
802 | | static bool |
803 | | _equalTargetEntry(const TargetEntry *a, const TargetEntry *b) |
804 | 0 | { |
805 | 0 | COMPARE_NODE_FIELD(expr); |
806 | 0 | COMPARE_SCALAR_FIELD(resno); |
807 | 0 | COMPARE_STRING_FIELD(resname); |
808 | 0 | COMPARE_SCALAR_FIELD(ressortgroupref); |
809 | 0 | COMPARE_SCALAR_FIELD(resorigtbl); |
810 | 0 | COMPARE_SCALAR_FIELD(resorigcol); |
811 | 0 | COMPARE_SCALAR_FIELD(resjunk); |
812 | | |
813 | 0 | return true; |
814 | 0 | } |
815 | | |
816 | | static bool |
817 | | _equalRangeTblRef(const RangeTblRef *a, const RangeTblRef *b) |
818 | 0 | { |
819 | 0 | COMPARE_SCALAR_FIELD(rtindex); |
820 | | |
821 | 0 | return true; |
822 | 0 | } |
823 | | |
824 | | static bool |
825 | | _equalJoinExpr(const JoinExpr *a, const JoinExpr *b) |
826 | 0 | { |
827 | 0 | COMPARE_SCALAR_FIELD(jointype); |
828 | 0 | COMPARE_SCALAR_FIELD(isNatural); |
829 | 0 | COMPARE_NODE_FIELD(larg); |
830 | 0 | COMPARE_NODE_FIELD(rarg); |
831 | 0 | COMPARE_NODE_FIELD(usingClause); |
832 | 0 | COMPARE_NODE_FIELD(join_using_alias); |
833 | 0 | COMPARE_NODE_FIELD(quals); |
834 | 0 | COMPARE_NODE_FIELD(alias); |
835 | 0 | COMPARE_SCALAR_FIELD(rtindex); |
836 | | |
837 | 0 | return true; |
838 | 0 | } |
839 | | |
840 | | static bool |
841 | | _equalFromExpr(const FromExpr *a, const FromExpr *b) |
842 | 0 | { |
843 | 0 | COMPARE_NODE_FIELD(fromlist); |
844 | 0 | COMPARE_NODE_FIELD(quals); |
845 | | |
846 | 0 | return true; |
847 | 0 | } |
848 | | |
849 | | static bool |
850 | | _equalOnConflictExpr(const OnConflictExpr *a, const OnConflictExpr *b) |
851 | 0 | { |
852 | 0 | COMPARE_SCALAR_FIELD(action); |
853 | 0 | COMPARE_NODE_FIELD(arbiterElems); |
854 | 0 | COMPARE_NODE_FIELD(arbiterWhere); |
855 | 0 | COMPARE_SCALAR_FIELD(constraint); |
856 | 0 | COMPARE_NODE_FIELD(onConflictSet); |
857 | 0 | COMPARE_NODE_FIELD(onConflictWhere); |
858 | 0 | COMPARE_SCALAR_FIELD(exclRelIndex); |
859 | 0 | COMPARE_NODE_FIELD(exclRelTlist); |
860 | | |
861 | 0 | return true; |
862 | 0 | } |
863 | | |
864 | | static bool |
865 | | _equalQuery(const Query *a, const Query *b) |
866 | 0 | { |
867 | 0 | COMPARE_SCALAR_FIELD(commandType); |
868 | 0 | COMPARE_SCALAR_FIELD(querySource); |
869 | 0 | COMPARE_SCALAR_FIELD(canSetTag); |
870 | 0 | COMPARE_NODE_FIELD(utilityStmt); |
871 | 0 | COMPARE_SCALAR_FIELD(resultRelation); |
872 | 0 | COMPARE_SCALAR_FIELD(hasAggs); |
873 | 0 | COMPARE_SCALAR_FIELD(hasWindowFuncs); |
874 | 0 | COMPARE_SCALAR_FIELD(hasTargetSRFs); |
875 | 0 | COMPARE_SCALAR_FIELD(hasSubLinks); |
876 | 0 | COMPARE_SCALAR_FIELD(hasDistinctOn); |
877 | 0 | COMPARE_SCALAR_FIELD(hasRecursive); |
878 | 0 | COMPARE_SCALAR_FIELD(hasModifyingCTE); |
879 | 0 | COMPARE_SCALAR_FIELD(hasForUpdate); |
880 | 0 | COMPARE_SCALAR_FIELD(hasRowSecurity); |
881 | 0 | COMPARE_SCALAR_FIELD(hasGroupRTE); |
882 | 0 | COMPARE_SCALAR_FIELD(isReturn); |
883 | 0 | COMPARE_NODE_FIELD(cteList); |
884 | 0 | COMPARE_NODE_FIELD(rtable); |
885 | 0 | COMPARE_NODE_FIELD(rteperminfos); |
886 | 0 | COMPARE_NODE_FIELD(jointree); |
887 | 0 | COMPARE_NODE_FIELD(mergeActionList); |
888 | 0 | COMPARE_SCALAR_FIELD(mergeTargetRelation); |
889 | 0 | COMPARE_NODE_FIELD(mergeJoinCondition); |
890 | 0 | COMPARE_NODE_FIELD(targetList); |
891 | 0 | COMPARE_SCALAR_FIELD(override); |
892 | 0 | COMPARE_NODE_FIELD(onConflict); |
893 | 0 | COMPARE_STRING_FIELD(returningOldAlias); |
894 | 0 | COMPARE_STRING_FIELD(returningNewAlias); |
895 | 0 | COMPARE_NODE_FIELD(returningList); |
896 | 0 | COMPARE_NODE_FIELD(groupClause); |
897 | 0 | COMPARE_SCALAR_FIELD(groupDistinct); |
898 | 0 | COMPARE_SCALAR_FIELD(groupByAll); |
899 | 0 | COMPARE_NODE_FIELD(groupingSets); |
900 | 0 | COMPARE_NODE_FIELD(havingQual); |
901 | 0 | COMPARE_NODE_FIELD(windowClause); |
902 | 0 | COMPARE_NODE_FIELD(distinctClause); |
903 | 0 | COMPARE_NODE_FIELD(sortClause); |
904 | 0 | COMPARE_NODE_FIELD(limitOffset); |
905 | 0 | COMPARE_NODE_FIELD(limitCount); |
906 | 0 | COMPARE_SCALAR_FIELD(limitOption); |
907 | 0 | COMPARE_NODE_FIELD(rowMarks); |
908 | 0 | COMPARE_NODE_FIELD(setOperations); |
909 | 0 | COMPARE_NODE_FIELD(constraintDeps); |
910 | 0 | COMPARE_NODE_FIELD(withCheckOptions); |
911 | 0 | COMPARE_LOCATION_FIELD(stmt_location); |
912 | 0 | COMPARE_LOCATION_FIELD(stmt_len); |
913 | |
|
914 | 0 | return true; |
915 | 0 | } |
916 | | |
917 | | static bool |
918 | | _equalTypeName(const TypeName *a, const TypeName *b) |
919 | 0 | { |
920 | 0 | COMPARE_NODE_FIELD(names); |
921 | 0 | COMPARE_SCALAR_FIELD(typeOid); |
922 | 0 | COMPARE_SCALAR_FIELD(setof); |
923 | 0 | COMPARE_SCALAR_FIELD(pct_type); |
924 | 0 | COMPARE_NODE_FIELD(typmods); |
925 | 0 | COMPARE_SCALAR_FIELD(typemod); |
926 | 0 | COMPARE_NODE_FIELD(arrayBounds); |
927 | 0 | COMPARE_LOCATION_FIELD(location); |
928 | |
|
929 | 0 | return true; |
930 | 0 | } |
931 | | |
932 | | static bool |
933 | | _equalColumnRef(const ColumnRef *a, const ColumnRef *b) |
934 | 0 | { |
935 | 0 | COMPARE_NODE_FIELD(fields); |
936 | 0 | COMPARE_LOCATION_FIELD(location); |
937 | |
|
938 | 0 | return true; |
939 | 0 | } |
940 | | |
941 | | static bool |
942 | | _equalParamRef(const ParamRef *a, const ParamRef *b) |
943 | 0 | { |
944 | 0 | COMPARE_SCALAR_FIELD(number); |
945 | 0 | COMPARE_LOCATION_FIELD(location); |
946 | |
|
947 | 0 | return true; |
948 | 0 | } |
949 | | |
950 | | static bool |
951 | | _equalA_Expr(const A_Expr *a, const A_Expr *b) |
952 | 0 | { |
953 | 0 | COMPARE_SCALAR_FIELD(kind); |
954 | 0 | COMPARE_NODE_FIELD(name); |
955 | 0 | COMPARE_NODE_FIELD(lexpr); |
956 | 0 | COMPARE_NODE_FIELD(rexpr); |
957 | 0 | COMPARE_LOCATION_FIELD(rexpr_list_start); |
958 | 0 | COMPARE_LOCATION_FIELD(rexpr_list_end); |
959 | 0 | COMPARE_LOCATION_FIELD(location); |
960 | |
|
961 | 0 | return true; |
962 | 0 | } |
963 | | |
964 | | static bool |
965 | | _equalTypeCast(const TypeCast *a, const TypeCast *b) |
966 | 0 | { |
967 | 0 | COMPARE_NODE_FIELD(arg); |
968 | 0 | COMPARE_NODE_FIELD(typeName); |
969 | 0 | COMPARE_LOCATION_FIELD(location); |
970 | |
|
971 | 0 | return true; |
972 | 0 | } |
973 | | |
974 | | static bool |
975 | | _equalCollateClause(const CollateClause *a, const CollateClause *b) |
976 | 0 | { |
977 | 0 | COMPARE_NODE_FIELD(arg); |
978 | 0 | COMPARE_NODE_FIELD(collname); |
979 | 0 | COMPARE_LOCATION_FIELD(location); |
980 | |
|
981 | 0 | return true; |
982 | 0 | } |
983 | | |
984 | | static bool |
985 | | _equalRoleSpec(const RoleSpec *a, const RoleSpec *b) |
986 | 0 | { |
987 | 0 | COMPARE_SCALAR_FIELD(roletype); |
988 | 0 | COMPARE_STRING_FIELD(rolename); |
989 | 0 | COMPARE_LOCATION_FIELD(location); |
990 | |
|
991 | 0 | return true; |
992 | 0 | } |
993 | | |
994 | | static bool |
995 | | _equalFuncCall(const FuncCall *a, const FuncCall *b) |
996 | 0 | { |
997 | 0 | COMPARE_NODE_FIELD(funcname); |
998 | 0 | COMPARE_NODE_FIELD(args); |
999 | 0 | COMPARE_NODE_FIELD(agg_order); |
1000 | 0 | COMPARE_NODE_FIELD(agg_filter); |
1001 | 0 | COMPARE_NODE_FIELD(over); |
1002 | 0 | COMPARE_SCALAR_FIELD(ignore_nulls); |
1003 | 0 | COMPARE_SCALAR_FIELD(agg_within_group); |
1004 | 0 | COMPARE_SCALAR_FIELD(agg_star); |
1005 | 0 | COMPARE_SCALAR_FIELD(agg_distinct); |
1006 | 0 | COMPARE_SCALAR_FIELD(func_variadic); |
1007 | 0 | COMPARE_LOCATION_FIELD(location); |
1008 | |
|
1009 | 0 | return true; |
1010 | 0 | } |
1011 | | |
1012 | | static bool |
1013 | | _equalA_Star(const A_Star *a, const A_Star *b) |
1014 | 0 | { |
1015 | |
|
1016 | 0 | return true; |
1017 | 0 | } |
1018 | | |
1019 | | static bool |
1020 | | _equalA_Indices(const A_Indices *a, const A_Indices *b) |
1021 | 0 | { |
1022 | 0 | COMPARE_SCALAR_FIELD(is_slice); |
1023 | 0 | COMPARE_NODE_FIELD(lidx); |
1024 | 0 | COMPARE_NODE_FIELD(uidx); |
1025 | | |
1026 | 0 | return true; |
1027 | 0 | } |
1028 | | |
1029 | | static bool |
1030 | | _equalA_Indirection(const A_Indirection *a, const A_Indirection *b) |
1031 | 0 | { |
1032 | 0 | COMPARE_NODE_FIELD(arg); |
1033 | 0 | COMPARE_NODE_FIELD(indirection); |
1034 | | |
1035 | 0 | return true; |
1036 | 0 | } |
1037 | | |
1038 | | static bool |
1039 | | _equalA_ArrayExpr(const A_ArrayExpr *a, const A_ArrayExpr *b) |
1040 | 0 | { |
1041 | 0 | COMPARE_NODE_FIELD(elements); |
1042 | 0 | COMPARE_LOCATION_FIELD(list_start); |
1043 | 0 | COMPARE_LOCATION_FIELD(list_end); |
1044 | 0 | COMPARE_LOCATION_FIELD(location); |
1045 | |
|
1046 | 0 | return true; |
1047 | 0 | } |
1048 | | |
1049 | | static bool |
1050 | | _equalResTarget(const ResTarget *a, const ResTarget *b) |
1051 | 0 | { |
1052 | 0 | COMPARE_STRING_FIELD(name); |
1053 | 0 | COMPARE_NODE_FIELD(indirection); |
1054 | 0 | COMPARE_NODE_FIELD(val); |
1055 | 0 | COMPARE_LOCATION_FIELD(location); |
1056 | |
|
1057 | 0 | return true; |
1058 | 0 | } |
1059 | | |
1060 | | static bool |
1061 | | _equalMultiAssignRef(const MultiAssignRef *a, const MultiAssignRef *b) |
1062 | 0 | { |
1063 | 0 | COMPARE_NODE_FIELD(source); |
1064 | 0 | COMPARE_SCALAR_FIELD(colno); |
1065 | 0 | COMPARE_SCALAR_FIELD(ncolumns); |
1066 | | |
1067 | 0 | return true; |
1068 | 0 | } |
1069 | | |
1070 | | static bool |
1071 | | _equalSortBy(const SortBy *a, const SortBy *b) |
1072 | 0 | { |
1073 | 0 | COMPARE_NODE_FIELD(node); |
1074 | 0 | COMPARE_SCALAR_FIELD(sortby_dir); |
1075 | 0 | COMPARE_SCALAR_FIELD(sortby_nulls); |
1076 | 0 | COMPARE_NODE_FIELD(useOp); |
1077 | 0 | COMPARE_LOCATION_FIELD(location); |
1078 | |
|
1079 | 0 | return true; |
1080 | 0 | } |
1081 | | |
1082 | | static bool |
1083 | | _equalWindowDef(const WindowDef *a, const WindowDef *b) |
1084 | 0 | { |
1085 | 0 | COMPARE_STRING_FIELD(name); |
1086 | 0 | COMPARE_STRING_FIELD(refname); |
1087 | 0 | COMPARE_NODE_FIELD(partitionClause); |
1088 | 0 | COMPARE_NODE_FIELD(orderClause); |
1089 | 0 | COMPARE_SCALAR_FIELD(frameOptions); |
1090 | 0 | COMPARE_NODE_FIELD(startOffset); |
1091 | 0 | COMPARE_NODE_FIELD(endOffset); |
1092 | 0 | COMPARE_LOCATION_FIELD(location); |
1093 | |
|
1094 | 0 | return true; |
1095 | 0 | } |
1096 | | |
1097 | | static bool |
1098 | | _equalRangeSubselect(const RangeSubselect *a, const RangeSubselect *b) |
1099 | 0 | { |
1100 | 0 | COMPARE_SCALAR_FIELD(lateral); |
1101 | 0 | COMPARE_NODE_FIELD(subquery); |
1102 | 0 | COMPARE_NODE_FIELD(alias); |
1103 | | |
1104 | 0 | return true; |
1105 | 0 | } |
1106 | | |
1107 | | static bool |
1108 | | _equalRangeFunction(const RangeFunction *a, const RangeFunction *b) |
1109 | 0 | { |
1110 | 0 | COMPARE_SCALAR_FIELD(lateral); |
1111 | 0 | COMPARE_SCALAR_FIELD(ordinality); |
1112 | 0 | COMPARE_SCALAR_FIELD(is_rowsfrom); |
1113 | 0 | COMPARE_NODE_FIELD(functions); |
1114 | 0 | COMPARE_NODE_FIELD(alias); |
1115 | 0 | COMPARE_NODE_FIELD(coldeflist); |
1116 | | |
1117 | 0 | return true; |
1118 | 0 | } |
1119 | | |
1120 | | static bool |
1121 | | _equalRangeTableFunc(const RangeTableFunc *a, const RangeTableFunc *b) |
1122 | 0 | { |
1123 | 0 | COMPARE_SCALAR_FIELD(lateral); |
1124 | 0 | COMPARE_NODE_FIELD(docexpr); |
1125 | 0 | COMPARE_NODE_FIELD(rowexpr); |
1126 | 0 | COMPARE_NODE_FIELD(namespaces); |
1127 | 0 | COMPARE_NODE_FIELD(columns); |
1128 | 0 | COMPARE_NODE_FIELD(alias); |
1129 | 0 | COMPARE_LOCATION_FIELD(location); |
1130 | |
|
1131 | 0 | return true; |
1132 | 0 | } |
1133 | | |
1134 | | static bool |
1135 | | _equalRangeTableFuncCol(const RangeTableFuncCol *a, const RangeTableFuncCol *b) |
1136 | 0 | { |
1137 | 0 | COMPARE_STRING_FIELD(colname); |
1138 | 0 | COMPARE_NODE_FIELD(typeName); |
1139 | 0 | COMPARE_SCALAR_FIELD(for_ordinality); |
1140 | 0 | COMPARE_SCALAR_FIELD(is_not_null); |
1141 | 0 | COMPARE_NODE_FIELD(colexpr); |
1142 | 0 | COMPARE_NODE_FIELD(coldefexpr); |
1143 | 0 | COMPARE_LOCATION_FIELD(location); |
1144 | |
|
1145 | 0 | return true; |
1146 | 0 | } |
1147 | | |
1148 | | static bool |
1149 | | _equalRangeTableSample(const RangeTableSample *a, const RangeTableSample *b) |
1150 | 0 | { |
1151 | 0 | COMPARE_NODE_FIELD(relation); |
1152 | 0 | COMPARE_NODE_FIELD(method); |
1153 | 0 | COMPARE_NODE_FIELD(args); |
1154 | 0 | COMPARE_NODE_FIELD(repeatable); |
1155 | 0 | COMPARE_LOCATION_FIELD(location); |
1156 | |
|
1157 | 0 | return true; |
1158 | 0 | } |
1159 | | |
1160 | | static bool |
1161 | | _equalColumnDef(const ColumnDef *a, const ColumnDef *b) |
1162 | 0 | { |
1163 | 0 | COMPARE_STRING_FIELD(colname); |
1164 | 0 | COMPARE_NODE_FIELD(typeName); |
1165 | 0 | COMPARE_STRING_FIELD(compression); |
1166 | 0 | COMPARE_SCALAR_FIELD(inhcount); |
1167 | 0 | COMPARE_SCALAR_FIELD(is_local); |
1168 | 0 | COMPARE_SCALAR_FIELD(is_not_null); |
1169 | 0 | COMPARE_SCALAR_FIELD(is_from_type); |
1170 | 0 | COMPARE_SCALAR_FIELD(storage); |
1171 | 0 | COMPARE_STRING_FIELD(storage_name); |
1172 | 0 | COMPARE_NODE_FIELD(raw_default); |
1173 | 0 | COMPARE_NODE_FIELD(cooked_default); |
1174 | 0 | COMPARE_SCALAR_FIELD(identity); |
1175 | 0 | COMPARE_NODE_FIELD(identitySequence); |
1176 | 0 | COMPARE_SCALAR_FIELD(generated); |
1177 | 0 | COMPARE_NODE_FIELD(collClause); |
1178 | 0 | COMPARE_SCALAR_FIELD(collOid); |
1179 | 0 | COMPARE_NODE_FIELD(constraints); |
1180 | 0 | COMPARE_NODE_FIELD(fdwoptions); |
1181 | 0 | COMPARE_LOCATION_FIELD(location); |
1182 | |
|
1183 | 0 | return true; |
1184 | 0 | } |
1185 | | |
1186 | | static bool |
1187 | | _equalTableLikeClause(const TableLikeClause *a, const TableLikeClause *b) |
1188 | 0 | { |
1189 | 0 | COMPARE_NODE_FIELD(relation); |
1190 | 0 | COMPARE_SCALAR_FIELD(options); |
1191 | 0 | COMPARE_SCALAR_FIELD(relationOid); |
1192 | | |
1193 | 0 | return true; |
1194 | 0 | } |
1195 | | |
1196 | | static bool |
1197 | | _equalIndexElem(const IndexElem *a, const IndexElem *b) |
1198 | 0 | { |
1199 | 0 | COMPARE_STRING_FIELD(name); |
1200 | 0 | COMPARE_NODE_FIELD(expr); |
1201 | 0 | COMPARE_STRING_FIELD(indexcolname); |
1202 | 0 | COMPARE_NODE_FIELD(collation); |
1203 | 0 | COMPARE_NODE_FIELD(opclass); |
1204 | 0 | COMPARE_NODE_FIELD(opclassopts); |
1205 | 0 | COMPARE_SCALAR_FIELD(ordering); |
1206 | 0 | COMPARE_SCALAR_FIELD(nulls_ordering); |
1207 | | |
1208 | 0 | return true; |
1209 | 0 | } |
1210 | | |
1211 | | static bool |
1212 | | _equalDefElem(const DefElem *a, const DefElem *b) |
1213 | 0 | { |
1214 | 0 | COMPARE_STRING_FIELD(defnamespace); |
1215 | 0 | COMPARE_STRING_FIELD(defname); |
1216 | 0 | COMPARE_NODE_FIELD(arg); |
1217 | 0 | COMPARE_SCALAR_FIELD(defaction); |
1218 | 0 | COMPARE_LOCATION_FIELD(location); |
1219 | |
|
1220 | 0 | return true; |
1221 | 0 | } |
1222 | | |
1223 | | static bool |
1224 | | _equalLockingClause(const LockingClause *a, const LockingClause *b) |
1225 | 0 | { |
1226 | 0 | COMPARE_NODE_FIELD(lockedRels); |
1227 | 0 | COMPARE_SCALAR_FIELD(strength); |
1228 | 0 | COMPARE_SCALAR_FIELD(waitPolicy); |
1229 | | |
1230 | 0 | return true; |
1231 | 0 | } |
1232 | | |
1233 | | static bool |
1234 | | _equalXmlSerialize(const XmlSerialize *a, const XmlSerialize *b) |
1235 | 0 | { |
1236 | 0 | COMPARE_SCALAR_FIELD(xmloption); |
1237 | 0 | COMPARE_NODE_FIELD(expr); |
1238 | 0 | COMPARE_NODE_FIELD(typeName); |
1239 | 0 | COMPARE_SCALAR_FIELD(indent); |
1240 | 0 | COMPARE_LOCATION_FIELD(location); |
1241 | |
|
1242 | 0 | return true; |
1243 | 0 | } |
1244 | | |
1245 | | static bool |
1246 | | _equalPartitionElem(const PartitionElem *a, const PartitionElem *b) |
1247 | 0 | { |
1248 | 0 | COMPARE_STRING_FIELD(name); |
1249 | 0 | COMPARE_NODE_FIELD(expr); |
1250 | 0 | COMPARE_NODE_FIELD(collation); |
1251 | 0 | COMPARE_NODE_FIELD(opclass); |
1252 | 0 | COMPARE_LOCATION_FIELD(location); |
1253 | |
|
1254 | 0 | return true; |
1255 | 0 | } |
1256 | | |
1257 | | static bool |
1258 | | _equalPartitionSpec(const PartitionSpec *a, const PartitionSpec *b) |
1259 | 0 | { |
1260 | 0 | COMPARE_SCALAR_FIELD(strategy); |
1261 | 0 | COMPARE_NODE_FIELD(partParams); |
1262 | 0 | COMPARE_LOCATION_FIELD(location); |
1263 | |
|
1264 | 0 | return true; |
1265 | 0 | } |
1266 | | |
1267 | | static bool |
1268 | | _equalPartitionBoundSpec(const PartitionBoundSpec *a, const PartitionBoundSpec *b) |
1269 | 0 | { |
1270 | 0 | COMPARE_SCALAR_FIELD(strategy); |
1271 | 0 | COMPARE_SCALAR_FIELD(is_default); |
1272 | 0 | COMPARE_SCALAR_FIELD(modulus); |
1273 | 0 | COMPARE_SCALAR_FIELD(remainder); |
1274 | 0 | COMPARE_NODE_FIELD(listdatums); |
1275 | 0 | COMPARE_NODE_FIELD(lowerdatums); |
1276 | 0 | COMPARE_NODE_FIELD(upperdatums); |
1277 | 0 | COMPARE_LOCATION_FIELD(location); |
1278 | |
|
1279 | 0 | return true; |
1280 | 0 | } |
1281 | | |
1282 | | static bool |
1283 | | _equalPartitionRangeDatum(const PartitionRangeDatum *a, const PartitionRangeDatum *b) |
1284 | 0 | { |
1285 | 0 | COMPARE_SCALAR_FIELD(kind); |
1286 | 0 | COMPARE_NODE_FIELD(value); |
1287 | 0 | COMPARE_LOCATION_FIELD(location); |
1288 | |
|
1289 | 0 | return true; |
1290 | 0 | } |
1291 | | |
1292 | | static bool |
1293 | | _equalPartitionCmd(const PartitionCmd *a, const PartitionCmd *b) |
1294 | 0 | { |
1295 | 0 | COMPARE_NODE_FIELD(name); |
1296 | 0 | COMPARE_NODE_FIELD(bound); |
1297 | 0 | COMPARE_SCALAR_FIELD(concurrent); |
1298 | | |
1299 | 0 | return true; |
1300 | 0 | } |
1301 | | |
1302 | | static bool |
1303 | | _equalRangeTblEntry(const RangeTblEntry *a, const RangeTblEntry *b) |
1304 | 0 | { |
1305 | 0 | COMPARE_NODE_FIELD(alias); |
1306 | 0 | COMPARE_NODE_FIELD(eref); |
1307 | 0 | COMPARE_SCALAR_FIELD(rtekind); |
1308 | 0 | COMPARE_SCALAR_FIELD(relid); |
1309 | 0 | COMPARE_SCALAR_FIELD(inh); |
1310 | 0 | COMPARE_SCALAR_FIELD(relkind); |
1311 | 0 | COMPARE_SCALAR_FIELD(rellockmode); |
1312 | 0 | COMPARE_SCALAR_FIELD(perminfoindex); |
1313 | 0 | COMPARE_NODE_FIELD(tablesample); |
1314 | 0 | COMPARE_NODE_FIELD(subquery); |
1315 | 0 | COMPARE_SCALAR_FIELD(security_barrier); |
1316 | 0 | COMPARE_SCALAR_FIELD(jointype); |
1317 | 0 | COMPARE_SCALAR_FIELD(joinmergedcols); |
1318 | 0 | COMPARE_NODE_FIELD(joinaliasvars); |
1319 | 0 | COMPARE_NODE_FIELD(joinleftcols); |
1320 | 0 | COMPARE_NODE_FIELD(joinrightcols); |
1321 | 0 | COMPARE_NODE_FIELD(join_using_alias); |
1322 | 0 | COMPARE_NODE_FIELD(functions); |
1323 | 0 | COMPARE_SCALAR_FIELD(funcordinality); |
1324 | 0 | COMPARE_NODE_FIELD(tablefunc); |
1325 | 0 | COMPARE_NODE_FIELD(values_lists); |
1326 | 0 | COMPARE_STRING_FIELD(ctename); |
1327 | 0 | COMPARE_SCALAR_FIELD(ctelevelsup); |
1328 | 0 | COMPARE_SCALAR_FIELD(self_reference); |
1329 | 0 | COMPARE_NODE_FIELD(coltypes); |
1330 | 0 | COMPARE_NODE_FIELD(coltypmods); |
1331 | 0 | COMPARE_NODE_FIELD(colcollations); |
1332 | 0 | COMPARE_STRING_FIELD(enrname); |
1333 | 0 | COMPARE_SCALAR_FIELD(enrtuples); |
1334 | 0 | COMPARE_NODE_FIELD(groupexprs); |
1335 | 0 | COMPARE_SCALAR_FIELD(lateral); |
1336 | 0 | COMPARE_SCALAR_FIELD(inFromCl); |
1337 | 0 | COMPARE_NODE_FIELD(securityQuals); |
1338 | | |
1339 | 0 | return true; |
1340 | 0 | } |
1341 | | |
1342 | | static bool |
1343 | | _equalRTEPermissionInfo(const RTEPermissionInfo *a, const RTEPermissionInfo *b) |
1344 | 0 | { |
1345 | 0 | COMPARE_SCALAR_FIELD(relid); |
1346 | 0 | COMPARE_SCALAR_FIELD(inh); |
1347 | 0 | COMPARE_SCALAR_FIELD(requiredPerms); |
1348 | 0 | COMPARE_SCALAR_FIELD(checkAsUser); |
1349 | 0 | COMPARE_BITMAPSET_FIELD(selectedCols); |
1350 | 0 | COMPARE_BITMAPSET_FIELD(insertedCols); |
1351 | 0 | COMPARE_BITMAPSET_FIELD(updatedCols); |
1352 | | |
1353 | 0 | return true; |
1354 | 0 | } |
1355 | | |
1356 | | static bool |
1357 | | _equalRangeTblFunction(const RangeTblFunction *a, const RangeTblFunction *b) |
1358 | 0 | { |
1359 | 0 | COMPARE_NODE_FIELD(funcexpr); |
1360 | 0 | COMPARE_SCALAR_FIELD(funccolcount); |
1361 | 0 | COMPARE_NODE_FIELD(funccolnames); |
1362 | 0 | COMPARE_NODE_FIELD(funccoltypes); |
1363 | 0 | COMPARE_NODE_FIELD(funccoltypmods); |
1364 | 0 | COMPARE_NODE_FIELD(funccolcollations); |
1365 | 0 | COMPARE_BITMAPSET_FIELD(funcparams); |
1366 | | |
1367 | 0 | return true; |
1368 | 0 | } |
1369 | | |
1370 | | static bool |
1371 | | _equalTableSampleClause(const TableSampleClause *a, const TableSampleClause *b) |
1372 | 0 | { |
1373 | 0 | COMPARE_SCALAR_FIELD(tsmhandler); |
1374 | 0 | COMPARE_NODE_FIELD(args); |
1375 | 0 | COMPARE_NODE_FIELD(repeatable); |
1376 | | |
1377 | 0 | return true; |
1378 | 0 | } |
1379 | | |
1380 | | static bool |
1381 | | _equalWithCheckOption(const WithCheckOption *a, const WithCheckOption *b) |
1382 | 0 | { |
1383 | 0 | COMPARE_SCALAR_FIELD(kind); |
1384 | 0 | COMPARE_STRING_FIELD(relname); |
1385 | 0 | COMPARE_STRING_FIELD(polname); |
1386 | 0 | COMPARE_NODE_FIELD(qual); |
1387 | 0 | COMPARE_SCALAR_FIELD(cascaded); |
1388 | | |
1389 | 0 | return true; |
1390 | 0 | } |
1391 | | |
1392 | | static bool |
1393 | | _equalSortGroupClause(const SortGroupClause *a, const SortGroupClause *b) |
1394 | 0 | { |
1395 | 0 | COMPARE_SCALAR_FIELD(tleSortGroupRef); |
1396 | 0 | COMPARE_SCALAR_FIELD(eqop); |
1397 | 0 | COMPARE_SCALAR_FIELD(sortop); |
1398 | 0 | COMPARE_SCALAR_FIELD(reverse_sort); |
1399 | 0 | COMPARE_SCALAR_FIELD(nulls_first); |
1400 | 0 | COMPARE_SCALAR_FIELD(hashable); |
1401 | | |
1402 | 0 | return true; |
1403 | 0 | } |
1404 | | |
1405 | | static bool |
1406 | | _equalGroupingSet(const GroupingSet *a, const GroupingSet *b) |
1407 | 0 | { |
1408 | 0 | COMPARE_SCALAR_FIELD(kind); |
1409 | 0 | COMPARE_NODE_FIELD(content); |
1410 | 0 | COMPARE_LOCATION_FIELD(location); |
1411 | |
|
1412 | 0 | return true; |
1413 | 0 | } |
1414 | | |
1415 | | static bool |
1416 | | _equalWindowClause(const WindowClause *a, const WindowClause *b) |
1417 | 0 | { |
1418 | 0 | COMPARE_STRING_FIELD(name); |
1419 | 0 | COMPARE_STRING_FIELD(refname); |
1420 | 0 | COMPARE_NODE_FIELD(partitionClause); |
1421 | 0 | COMPARE_NODE_FIELD(orderClause); |
1422 | 0 | COMPARE_SCALAR_FIELD(frameOptions); |
1423 | 0 | COMPARE_NODE_FIELD(startOffset); |
1424 | 0 | COMPARE_NODE_FIELD(endOffset); |
1425 | 0 | COMPARE_SCALAR_FIELD(startInRangeFunc); |
1426 | 0 | COMPARE_SCALAR_FIELD(endInRangeFunc); |
1427 | 0 | COMPARE_SCALAR_FIELD(inRangeColl); |
1428 | 0 | COMPARE_SCALAR_FIELD(inRangeAsc); |
1429 | 0 | COMPARE_SCALAR_FIELD(inRangeNullsFirst); |
1430 | 0 | COMPARE_SCALAR_FIELD(winref); |
1431 | 0 | COMPARE_SCALAR_FIELD(copiedOrder); |
1432 | | |
1433 | 0 | return true; |
1434 | 0 | } |
1435 | | |
1436 | | static bool |
1437 | | _equalRowMarkClause(const RowMarkClause *a, const RowMarkClause *b) |
1438 | 0 | { |
1439 | 0 | COMPARE_SCALAR_FIELD(rti); |
1440 | 0 | COMPARE_SCALAR_FIELD(strength); |
1441 | 0 | COMPARE_SCALAR_FIELD(waitPolicy); |
1442 | 0 | COMPARE_SCALAR_FIELD(pushedDown); |
1443 | | |
1444 | 0 | return true; |
1445 | 0 | } |
1446 | | |
1447 | | static bool |
1448 | | _equalWithClause(const WithClause *a, const WithClause *b) |
1449 | 0 | { |
1450 | 0 | COMPARE_NODE_FIELD(ctes); |
1451 | 0 | COMPARE_SCALAR_FIELD(recursive); |
1452 | 0 | COMPARE_LOCATION_FIELD(location); |
1453 | |
|
1454 | 0 | return true; |
1455 | 0 | } |
1456 | | |
1457 | | static bool |
1458 | | _equalInferClause(const InferClause *a, const InferClause *b) |
1459 | 0 | { |
1460 | 0 | COMPARE_NODE_FIELD(indexElems); |
1461 | 0 | COMPARE_NODE_FIELD(whereClause); |
1462 | 0 | COMPARE_STRING_FIELD(conname); |
1463 | 0 | COMPARE_LOCATION_FIELD(location); |
1464 | |
|
1465 | 0 | return true; |
1466 | 0 | } |
1467 | | |
1468 | | static bool |
1469 | | _equalOnConflictClause(const OnConflictClause *a, const OnConflictClause *b) |
1470 | 0 | { |
1471 | 0 | COMPARE_SCALAR_FIELD(action); |
1472 | 0 | COMPARE_NODE_FIELD(infer); |
1473 | 0 | COMPARE_NODE_FIELD(targetList); |
1474 | 0 | COMPARE_NODE_FIELD(whereClause); |
1475 | 0 | COMPARE_LOCATION_FIELD(location); |
1476 | |
|
1477 | 0 | return true; |
1478 | 0 | } |
1479 | | |
1480 | | static bool |
1481 | | _equalCTESearchClause(const CTESearchClause *a, const CTESearchClause *b) |
1482 | 0 | { |
1483 | 0 | COMPARE_NODE_FIELD(search_col_list); |
1484 | 0 | COMPARE_SCALAR_FIELD(search_breadth_first); |
1485 | 0 | COMPARE_STRING_FIELD(search_seq_column); |
1486 | 0 | COMPARE_LOCATION_FIELD(location); |
1487 | |
|
1488 | 0 | return true; |
1489 | 0 | } |
1490 | | |
1491 | | static bool |
1492 | | _equalCTECycleClause(const CTECycleClause *a, const CTECycleClause *b) |
1493 | 0 | { |
1494 | 0 | COMPARE_NODE_FIELD(cycle_col_list); |
1495 | 0 | COMPARE_STRING_FIELD(cycle_mark_column); |
1496 | 0 | COMPARE_NODE_FIELD(cycle_mark_value); |
1497 | 0 | COMPARE_NODE_FIELD(cycle_mark_default); |
1498 | 0 | COMPARE_STRING_FIELD(cycle_path_column); |
1499 | 0 | COMPARE_LOCATION_FIELD(location); |
1500 | 0 | COMPARE_SCALAR_FIELD(cycle_mark_type); |
1501 | 0 | COMPARE_SCALAR_FIELD(cycle_mark_typmod); |
1502 | 0 | COMPARE_SCALAR_FIELD(cycle_mark_collation); |
1503 | 0 | COMPARE_SCALAR_FIELD(cycle_mark_neop); |
1504 | | |
1505 | 0 | return true; |
1506 | 0 | } |
1507 | | |
1508 | | static bool |
1509 | | _equalCommonTableExpr(const CommonTableExpr *a, const CommonTableExpr *b) |
1510 | 0 | { |
1511 | 0 | COMPARE_STRING_FIELD(ctename); |
1512 | 0 | COMPARE_NODE_FIELD(aliascolnames); |
1513 | 0 | COMPARE_SCALAR_FIELD(ctematerialized); |
1514 | 0 | COMPARE_NODE_FIELD(ctequery); |
1515 | 0 | COMPARE_NODE_FIELD(search_clause); |
1516 | 0 | COMPARE_NODE_FIELD(cycle_clause); |
1517 | 0 | COMPARE_LOCATION_FIELD(location); |
1518 | 0 | COMPARE_SCALAR_FIELD(cterecursive); |
1519 | 0 | COMPARE_SCALAR_FIELD(cterefcount); |
1520 | 0 | COMPARE_NODE_FIELD(ctecolnames); |
1521 | 0 | COMPARE_NODE_FIELD(ctecoltypes); |
1522 | 0 | COMPARE_NODE_FIELD(ctecoltypmods); |
1523 | 0 | COMPARE_NODE_FIELD(ctecolcollations); |
1524 | | |
1525 | 0 | return true; |
1526 | 0 | } |
1527 | | |
1528 | | static bool |
1529 | | _equalMergeWhenClause(const MergeWhenClause *a, const MergeWhenClause *b) |
1530 | 0 | { |
1531 | 0 | COMPARE_SCALAR_FIELD(matchKind); |
1532 | 0 | COMPARE_SCALAR_FIELD(commandType); |
1533 | 0 | COMPARE_SCALAR_FIELD(override); |
1534 | 0 | COMPARE_NODE_FIELD(condition); |
1535 | 0 | COMPARE_NODE_FIELD(targetList); |
1536 | 0 | COMPARE_NODE_FIELD(values); |
1537 | | |
1538 | 0 | return true; |
1539 | 0 | } |
1540 | | |
1541 | | static bool |
1542 | | _equalReturningOption(const ReturningOption *a, const ReturningOption *b) |
1543 | 0 | { |
1544 | 0 | COMPARE_SCALAR_FIELD(option); |
1545 | 0 | COMPARE_STRING_FIELD(value); |
1546 | 0 | COMPARE_LOCATION_FIELD(location); |
1547 | |
|
1548 | 0 | return true; |
1549 | 0 | } |
1550 | | |
1551 | | static bool |
1552 | | _equalReturningClause(const ReturningClause *a, const ReturningClause *b) |
1553 | 0 | { |
1554 | 0 | COMPARE_NODE_FIELD(options); |
1555 | 0 | COMPARE_NODE_FIELD(exprs); |
1556 | | |
1557 | 0 | return true; |
1558 | 0 | } |
1559 | | |
1560 | | static bool |
1561 | | _equalTriggerTransition(const TriggerTransition *a, const TriggerTransition *b) |
1562 | 0 | { |
1563 | 0 | COMPARE_STRING_FIELD(name); |
1564 | 0 | COMPARE_SCALAR_FIELD(isNew); |
1565 | 0 | COMPARE_SCALAR_FIELD(isTable); |
1566 | | |
1567 | 0 | return true; |
1568 | 0 | } |
1569 | | |
1570 | | static bool |
1571 | | _equalJsonOutput(const JsonOutput *a, const JsonOutput *b) |
1572 | 0 | { |
1573 | 0 | COMPARE_NODE_FIELD(typeName); |
1574 | 0 | COMPARE_NODE_FIELD(returning); |
1575 | | |
1576 | 0 | return true; |
1577 | 0 | } |
1578 | | |
1579 | | static bool |
1580 | | _equalJsonArgument(const JsonArgument *a, const JsonArgument *b) |
1581 | 0 | { |
1582 | 0 | COMPARE_NODE_FIELD(val); |
1583 | 0 | COMPARE_STRING_FIELD(name); |
1584 | | |
1585 | 0 | return true; |
1586 | 0 | } |
1587 | | |
1588 | | static bool |
1589 | | _equalJsonFuncExpr(const JsonFuncExpr *a, const JsonFuncExpr *b) |
1590 | 0 | { |
1591 | 0 | COMPARE_SCALAR_FIELD(op); |
1592 | 0 | COMPARE_STRING_FIELD(column_name); |
1593 | 0 | COMPARE_NODE_FIELD(context_item); |
1594 | 0 | COMPARE_NODE_FIELD(pathspec); |
1595 | 0 | COMPARE_NODE_FIELD(passing); |
1596 | 0 | COMPARE_NODE_FIELD(output); |
1597 | 0 | COMPARE_NODE_FIELD(on_empty); |
1598 | 0 | COMPARE_NODE_FIELD(on_error); |
1599 | 0 | COMPARE_SCALAR_FIELD(wrapper); |
1600 | 0 | COMPARE_SCALAR_FIELD(quotes); |
1601 | 0 | COMPARE_LOCATION_FIELD(location); |
1602 | |
|
1603 | 0 | return true; |
1604 | 0 | } |
1605 | | |
1606 | | static bool |
1607 | | _equalJsonTablePathSpec(const JsonTablePathSpec *a, const JsonTablePathSpec *b) |
1608 | 0 | { |
1609 | 0 | COMPARE_NODE_FIELD(string); |
1610 | 0 | COMPARE_STRING_FIELD(name); |
1611 | 0 | COMPARE_LOCATION_FIELD(name_location); |
1612 | 0 | COMPARE_LOCATION_FIELD(location); |
1613 | |
|
1614 | 0 | return true; |
1615 | 0 | } |
1616 | | |
1617 | | static bool |
1618 | | _equalJsonTable(const JsonTable *a, const JsonTable *b) |
1619 | 0 | { |
1620 | 0 | COMPARE_NODE_FIELD(context_item); |
1621 | 0 | COMPARE_NODE_FIELD(pathspec); |
1622 | 0 | COMPARE_NODE_FIELD(passing); |
1623 | 0 | COMPARE_NODE_FIELD(columns); |
1624 | 0 | COMPARE_NODE_FIELD(on_error); |
1625 | 0 | COMPARE_NODE_FIELD(alias); |
1626 | 0 | COMPARE_SCALAR_FIELD(lateral); |
1627 | 0 | COMPARE_LOCATION_FIELD(location); |
1628 | |
|
1629 | 0 | return true; |
1630 | 0 | } |
1631 | | |
1632 | | static bool |
1633 | | _equalJsonTableColumn(const JsonTableColumn *a, const JsonTableColumn *b) |
1634 | 0 | { |
1635 | 0 | COMPARE_SCALAR_FIELD(coltype); |
1636 | 0 | COMPARE_STRING_FIELD(name); |
1637 | 0 | COMPARE_NODE_FIELD(typeName); |
1638 | 0 | COMPARE_NODE_FIELD(pathspec); |
1639 | 0 | COMPARE_NODE_FIELD(format); |
1640 | 0 | COMPARE_SCALAR_FIELD(wrapper); |
1641 | 0 | COMPARE_SCALAR_FIELD(quotes); |
1642 | 0 | COMPARE_NODE_FIELD(columns); |
1643 | 0 | COMPARE_NODE_FIELD(on_empty); |
1644 | 0 | COMPARE_NODE_FIELD(on_error); |
1645 | 0 | COMPARE_LOCATION_FIELD(location); |
1646 | |
|
1647 | 0 | return true; |
1648 | 0 | } |
1649 | | |
1650 | | static bool |
1651 | | _equalJsonKeyValue(const JsonKeyValue *a, const JsonKeyValue *b) |
1652 | 0 | { |
1653 | 0 | COMPARE_NODE_FIELD(key); |
1654 | 0 | COMPARE_NODE_FIELD(value); |
1655 | | |
1656 | 0 | return true; |
1657 | 0 | } |
1658 | | |
1659 | | static bool |
1660 | | _equalJsonParseExpr(const JsonParseExpr *a, const JsonParseExpr *b) |
1661 | 0 | { |
1662 | 0 | COMPARE_NODE_FIELD(expr); |
1663 | 0 | COMPARE_NODE_FIELD(output); |
1664 | 0 | COMPARE_SCALAR_FIELD(unique_keys); |
1665 | 0 | COMPARE_LOCATION_FIELD(location); |
1666 | |
|
1667 | 0 | return true; |
1668 | 0 | } |
1669 | | |
1670 | | static bool |
1671 | | _equalJsonScalarExpr(const JsonScalarExpr *a, const JsonScalarExpr *b) |
1672 | 0 | { |
1673 | 0 | COMPARE_NODE_FIELD(expr); |
1674 | 0 | COMPARE_NODE_FIELD(output); |
1675 | 0 | COMPARE_LOCATION_FIELD(location); |
1676 | |
|
1677 | 0 | return true; |
1678 | 0 | } |
1679 | | |
1680 | | static bool |
1681 | | _equalJsonSerializeExpr(const JsonSerializeExpr *a, const JsonSerializeExpr *b) |
1682 | 0 | { |
1683 | 0 | COMPARE_NODE_FIELD(expr); |
1684 | 0 | COMPARE_NODE_FIELD(output); |
1685 | 0 | COMPARE_LOCATION_FIELD(location); |
1686 | |
|
1687 | 0 | return true; |
1688 | 0 | } |
1689 | | |
1690 | | static bool |
1691 | | _equalJsonObjectConstructor(const JsonObjectConstructor *a, const JsonObjectConstructor *b) |
1692 | 0 | { |
1693 | 0 | COMPARE_NODE_FIELD(exprs); |
1694 | 0 | COMPARE_NODE_FIELD(output); |
1695 | 0 | COMPARE_SCALAR_FIELD(absent_on_null); |
1696 | 0 | COMPARE_SCALAR_FIELD(unique); |
1697 | 0 | COMPARE_LOCATION_FIELD(location); |
1698 | |
|
1699 | 0 | return true; |
1700 | 0 | } |
1701 | | |
1702 | | static bool |
1703 | | _equalJsonArrayConstructor(const JsonArrayConstructor *a, const JsonArrayConstructor *b) |
1704 | 0 | { |
1705 | 0 | COMPARE_NODE_FIELD(exprs); |
1706 | 0 | COMPARE_NODE_FIELD(output); |
1707 | 0 | COMPARE_SCALAR_FIELD(absent_on_null); |
1708 | 0 | COMPARE_LOCATION_FIELD(location); |
1709 | |
|
1710 | 0 | return true; |
1711 | 0 | } |
1712 | | |
1713 | | static bool |
1714 | | _equalJsonArrayQueryConstructor(const JsonArrayQueryConstructor *a, const JsonArrayQueryConstructor *b) |
1715 | 0 | { |
1716 | 0 | COMPARE_NODE_FIELD(query); |
1717 | 0 | COMPARE_NODE_FIELD(output); |
1718 | 0 | COMPARE_NODE_FIELD(format); |
1719 | 0 | COMPARE_SCALAR_FIELD(absent_on_null); |
1720 | 0 | COMPARE_LOCATION_FIELD(location); |
1721 | |
|
1722 | 0 | return true; |
1723 | 0 | } |
1724 | | |
1725 | | static bool |
1726 | | _equalJsonAggConstructor(const JsonAggConstructor *a, const JsonAggConstructor *b) |
1727 | 0 | { |
1728 | 0 | COMPARE_NODE_FIELD(output); |
1729 | 0 | COMPARE_NODE_FIELD(agg_filter); |
1730 | 0 | COMPARE_NODE_FIELD(agg_order); |
1731 | 0 | COMPARE_NODE_FIELD(over); |
1732 | 0 | COMPARE_LOCATION_FIELD(location); |
1733 | |
|
1734 | 0 | return true; |
1735 | 0 | } |
1736 | | |
1737 | | static bool |
1738 | | _equalJsonObjectAgg(const JsonObjectAgg *a, const JsonObjectAgg *b) |
1739 | 0 | { |
1740 | 0 | COMPARE_NODE_FIELD(constructor); |
1741 | 0 | COMPARE_NODE_FIELD(arg); |
1742 | 0 | COMPARE_SCALAR_FIELD(absent_on_null); |
1743 | 0 | COMPARE_SCALAR_FIELD(unique); |
1744 | | |
1745 | 0 | return true; |
1746 | 0 | } |
1747 | | |
1748 | | static bool |
1749 | | _equalJsonArrayAgg(const JsonArrayAgg *a, const JsonArrayAgg *b) |
1750 | 0 | { |
1751 | 0 | COMPARE_NODE_FIELD(constructor); |
1752 | 0 | COMPARE_NODE_FIELD(arg); |
1753 | 0 | COMPARE_SCALAR_FIELD(absent_on_null); |
1754 | | |
1755 | 0 | return true; |
1756 | 0 | } |
1757 | | |
1758 | | static bool |
1759 | | _equalRawStmt(const RawStmt *a, const RawStmt *b) |
1760 | 0 | { |
1761 | 0 | COMPARE_NODE_FIELD(stmt); |
1762 | 0 | COMPARE_LOCATION_FIELD(stmt_location); |
1763 | 0 | COMPARE_LOCATION_FIELD(stmt_len); |
1764 | |
|
1765 | 0 | return true; |
1766 | 0 | } |
1767 | | |
1768 | | static bool |
1769 | | _equalInsertStmt(const InsertStmt *a, const InsertStmt *b) |
1770 | 0 | { |
1771 | 0 | COMPARE_NODE_FIELD(relation); |
1772 | 0 | COMPARE_NODE_FIELD(cols); |
1773 | 0 | COMPARE_NODE_FIELD(selectStmt); |
1774 | 0 | COMPARE_NODE_FIELD(onConflictClause); |
1775 | 0 | COMPARE_NODE_FIELD(returningClause); |
1776 | 0 | COMPARE_NODE_FIELD(withClause); |
1777 | 0 | COMPARE_SCALAR_FIELD(override); |
1778 | | |
1779 | 0 | return true; |
1780 | 0 | } |
1781 | | |
1782 | | static bool |
1783 | | _equalDeleteStmt(const DeleteStmt *a, const DeleteStmt *b) |
1784 | 0 | { |
1785 | 0 | COMPARE_NODE_FIELD(relation); |
1786 | 0 | COMPARE_NODE_FIELD(usingClause); |
1787 | 0 | COMPARE_NODE_FIELD(whereClause); |
1788 | 0 | COMPARE_NODE_FIELD(returningClause); |
1789 | 0 | COMPARE_NODE_FIELD(withClause); |
1790 | | |
1791 | 0 | return true; |
1792 | 0 | } |
1793 | | |
1794 | | static bool |
1795 | | _equalUpdateStmt(const UpdateStmt *a, const UpdateStmt *b) |
1796 | 0 | { |
1797 | 0 | COMPARE_NODE_FIELD(relation); |
1798 | 0 | COMPARE_NODE_FIELD(targetList); |
1799 | 0 | COMPARE_NODE_FIELD(whereClause); |
1800 | 0 | COMPARE_NODE_FIELD(fromClause); |
1801 | 0 | COMPARE_NODE_FIELD(returningClause); |
1802 | 0 | COMPARE_NODE_FIELD(withClause); |
1803 | | |
1804 | 0 | return true; |
1805 | 0 | } |
1806 | | |
1807 | | static bool |
1808 | | _equalMergeStmt(const MergeStmt *a, const MergeStmt *b) |
1809 | 0 | { |
1810 | 0 | COMPARE_NODE_FIELD(relation); |
1811 | 0 | COMPARE_NODE_FIELD(sourceRelation); |
1812 | 0 | COMPARE_NODE_FIELD(joinCondition); |
1813 | 0 | COMPARE_NODE_FIELD(mergeWhenClauses); |
1814 | 0 | COMPARE_NODE_FIELD(returningClause); |
1815 | 0 | COMPARE_NODE_FIELD(withClause); |
1816 | | |
1817 | 0 | return true; |
1818 | 0 | } |
1819 | | |
1820 | | static bool |
1821 | | _equalSelectStmt(const SelectStmt *a, const SelectStmt *b) |
1822 | 0 | { |
1823 | 0 | COMPARE_NODE_FIELD(distinctClause); |
1824 | 0 | COMPARE_NODE_FIELD(intoClause); |
1825 | 0 | COMPARE_NODE_FIELD(targetList); |
1826 | 0 | COMPARE_NODE_FIELD(fromClause); |
1827 | 0 | COMPARE_NODE_FIELD(whereClause); |
1828 | 0 | COMPARE_NODE_FIELD(groupClause); |
1829 | 0 | COMPARE_SCALAR_FIELD(groupDistinct); |
1830 | 0 | COMPARE_SCALAR_FIELD(groupByAll); |
1831 | 0 | COMPARE_NODE_FIELD(havingClause); |
1832 | 0 | COMPARE_NODE_FIELD(windowClause); |
1833 | 0 | COMPARE_NODE_FIELD(valuesLists); |
1834 | 0 | COMPARE_NODE_FIELD(sortClause); |
1835 | 0 | COMPARE_NODE_FIELD(limitOffset); |
1836 | 0 | COMPARE_NODE_FIELD(limitCount); |
1837 | 0 | COMPARE_SCALAR_FIELD(limitOption); |
1838 | 0 | COMPARE_NODE_FIELD(lockingClause); |
1839 | 0 | COMPARE_NODE_FIELD(withClause); |
1840 | 0 | COMPARE_SCALAR_FIELD(op); |
1841 | 0 | COMPARE_SCALAR_FIELD(all); |
1842 | 0 | COMPARE_NODE_FIELD(larg); |
1843 | 0 | COMPARE_NODE_FIELD(rarg); |
1844 | | |
1845 | 0 | return true; |
1846 | 0 | } |
1847 | | |
1848 | | static bool |
1849 | | _equalSetOperationStmt(const SetOperationStmt *a, const SetOperationStmt *b) |
1850 | 0 | { |
1851 | 0 | COMPARE_SCALAR_FIELD(op); |
1852 | 0 | COMPARE_SCALAR_FIELD(all); |
1853 | 0 | COMPARE_NODE_FIELD(larg); |
1854 | 0 | COMPARE_NODE_FIELD(rarg); |
1855 | 0 | COMPARE_NODE_FIELD(colTypes); |
1856 | 0 | COMPARE_NODE_FIELD(colTypmods); |
1857 | 0 | COMPARE_NODE_FIELD(colCollations); |
1858 | 0 | COMPARE_NODE_FIELD(groupClauses); |
1859 | | |
1860 | 0 | return true; |
1861 | 0 | } |
1862 | | |
1863 | | static bool |
1864 | | _equalReturnStmt(const ReturnStmt *a, const ReturnStmt *b) |
1865 | 0 | { |
1866 | 0 | COMPARE_NODE_FIELD(returnval); |
1867 | | |
1868 | 0 | return true; |
1869 | 0 | } |
1870 | | |
1871 | | static bool |
1872 | | _equalPLAssignStmt(const PLAssignStmt *a, const PLAssignStmt *b) |
1873 | 0 | { |
1874 | 0 | COMPARE_STRING_FIELD(name); |
1875 | 0 | COMPARE_NODE_FIELD(indirection); |
1876 | 0 | COMPARE_SCALAR_FIELD(nnames); |
1877 | 0 | COMPARE_NODE_FIELD(val); |
1878 | 0 | COMPARE_LOCATION_FIELD(location); |
1879 | |
|
1880 | 0 | return true; |
1881 | 0 | } |
1882 | | |
1883 | | static bool |
1884 | | _equalCreateSchemaStmt(const CreateSchemaStmt *a, const CreateSchemaStmt *b) |
1885 | 0 | { |
1886 | 0 | COMPARE_STRING_FIELD(schemaname); |
1887 | 0 | COMPARE_NODE_FIELD(authrole); |
1888 | 0 | COMPARE_NODE_FIELD(schemaElts); |
1889 | 0 | COMPARE_SCALAR_FIELD(if_not_exists); |
1890 | | |
1891 | 0 | return true; |
1892 | 0 | } |
1893 | | |
1894 | | static bool |
1895 | | _equalAlterTableStmt(const AlterTableStmt *a, const AlterTableStmt *b) |
1896 | 0 | { |
1897 | 0 | COMPARE_NODE_FIELD(relation); |
1898 | 0 | COMPARE_NODE_FIELD(cmds); |
1899 | 0 | COMPARE_SCALAR_FIELD(objtype); |
1900 | 0 | COMPARE_SCALAR_FIELD(missing_ok); |
1901 | | |
1902 | 0 | return true; |
1903 | 0 | } |
1904 | | |
1905 | | static bool |
1906 | | _equalAlterTableCmd(const AlterTableCmd *a, const AlterTableCmd *b) |
1907 | 0 | { |
1908 | 0 | COMPARE_SCALAR_FIELD(subtype); |
1909 | 0 | COMPARE_STRING_FIELD(name); |
1910 | 0 | COMPARE_SCALAR_FIELD(num); |
1911 | 0 | COMPARE_NODE_FIELD(newowner); |
1912 | 0 | COMPARE_NODE_FIELD(def); |
1913 | 0 | COMPARE_SCALAR_FIELD(behavior); |
1914 | 0 | COMPARE_SCALAR_FIELD(missing_ok); |
1915 | 0 | COMPARE_SCALAR_FIELD(recurse); |
1916 | | |
1917 | 0 | return true; |
1918 | 0 | } |
1919 | | |
1920 | | static bool |
1921 | | _equalATAlterConstraint(const ATAlterConstraint *a, const ATAlterConstraint *b) |
1922 | 0 | { |
1923 | 0 | COMPARE_STRING_FIELD(conname); |
1924 | 0 | COMPARE_SCALAR_FIELD(alterEnforceability); |
1925 | 0 | COMPARE_SCALAR_FIELD(is_enforced); |
1926 | 0 | COMPARE_SCALAR_FIELD(alterDeferrability); |
1927 | 0 | COMPARE_SCALAR_FIELD(deferrable); |
1928 | 0 | COMPARE_SCALAR_FIELD(initdeferred); |
1929 | 0 | COMPARE_SCALAR_FIELD(alterInheritability); |
1930 | 0 | COMPARE_SCALAR_FIELD(noinherit); |
1931 | | |
1932 | 0 | return true; |
1933 | 0 | } |
1934 | | |
1935 | | static bool |
1936 | | _equalReplicaIdentityStmt(const ReplicaIdentityStmt *a, const ReplicaIdentityStmt *b) |
1937 | 0 | { |
1938 | 0 | COMPARE_SCALAR_FIELD(identity_type); |
1939 | 0 | COMPARE_STRING_FIELD(name); |
1940 | | |
1941 | 0 | return true; |
1942 | 0 | } |
1943 | | |
1944 | | static bool |
1945 | | _equalAlterCollationStmt(const AlterCollationStmt *a, const AlterCollationStmt *b) |
1946 | 0 | { |
1947 | 0 | COMPARE_NODE_FIELD(collname); |
1948 | | |
1949 | 0 | return true; |
1950 | 0 | } |
1951 | | |
1952 | | static bool |
1953 | | _equalAlterDomainStmt(const AlterDomainStmt *a, const AlterDomainStmt *b) |
1954 | 0 | { |
1955 | 0 | COMPARE_SCALAR_FIELD(subtype); |
1956 | 0 | COMPARE_NODE_FIELD(typeName); |
1957 | 0 | COMPARE_STRING_FIELD(name); |
1958 | 0 | COMPARE_NODE_FIELD(def); |
1959 | 0 | COMPARE_SCALAR_FIELD(behavior); |
1960 | 0 | COMPARE_SCALAR_FIELD(missing_ok); |
1961 | | |
1962 | 0 | return true; |
1963 | 0 | } |
1964 | | |
1965 | | static bool |
1966 | | _equalGrantStmt(const GrantStmt *a, const GrantStmt *b) |
1967 | 0 | { |
1968 | 0 | COMPARE_SCALAR_FIELD(is_grant); |
1969 | 0 | COMPARE_SCALAR_FIELD(targtype); |
1970 | 0 | COMPARE_SCALAR_FIELD(objtype); |
1971 | 0 | COMPARE_NODE_FIELD(objects); |
1972 | 0 | COMPARE_NODE_FIELD(privileges); |
1973 | 0 | COMPARE_NODE_FIELD(grantees); |
1974 | 0 | COMPARE_SCALAR_FIELD(grant_option); |
1975 | 0 | COMPARE_NODE_FIELD(grantor); |
1976 | 0 | COMPARE_SCALAR_FIELD(behavior); |
1977 | | |
1978 | 0 | return true; |
1979 | 0 | } |
1980 | | |
1981 | | static bool |
1982 | | _equalObjectWithArgs(const ObjectWithArgs *a, const ObjectWithArgs *b) |
1983 | 0 | { |
1984 | 0 | COMPARE_NODE_FIELD(objname); |
1985 | 0 | COMPARE_NODE_FIELD(objargs); |
1986 | 0 | COMPARE_NODE_FIELD(objfuncargs); |
1987 | 0 | COMPARE_SCALAR_FIELD(args_unspecified); |
1988 | | |
1989 | 0 | return true; |
1990 | 0 | } |
1991 | | |
1992 | | static bool |
1993 | | _equalAccessPriv(const AccessPriv *a, const AccessPriv *b) |
1994 | 0 | { |
1995 | 0 | COMPARE_STRING_FIELD(priv_name); |
1996 | 0 | COMPARE_NODE_FIELD(cols); |
1997 | | |
1998 | 0 | return true; |
1999 | 0 | } |
2000 | | |
2001 | | static bool |
2002 | | _equalGrantRoleStmt(const GrantRoleStmt *a, const GrantRoleStmt *b) |
2003 | 0 | { |
2004 | 0 | COMPARE_NODE_FIELD(granted_roles); |
2005 | 0 | COMPARE_NODE_FIELD(grantee_roles); |
2006 | 0 | COMPARE_SCALAR_FIELD(is_grant); |
2007 | 0 | COMPARE_NODE_FIELD(opt); |
2008 | 0 | COMPARE_NODE_FIELD(grantor); |
2009 | 0 | COMPARE_SCALAR_FIELD(behavior); |
2010 | | |
2011 | 0 | return true; |
2012 | 0 | } |
2013 | | |
2014 | | static bool |
2015 | | _equalAlterDefaultPrivilegesStmt(const AlterDefaultPrivilegesStmt *a, const AlterDefaultPrivilegesStmt *b) |
2016 | 0 | { |
2017 | 0 | COMPARE_NODE_FIELD(options); |
2018 | 0 | COMPARE_NODE_FIELD(action); |
2019 | | |
2020 | 0 | return true; |
2021 | 0 | } |
2022 | | |
2023 | | static bool |
2024 | | _equalCopyStmt(const CopyStmt *a, const CopyStmt *b) |
2025 | 0 | { |
2026 | 0 | COMPARE_NODE_FIELD(relation); |
2027 | 0 | COMPARE_NODE_FIELD(query); |
2028 | 0 | COMPARE_NODE_FIELD(attlist); |
2029 | 0 | COMPARE_SCALAR_FIELD(is_from); |
2030 | 0 | COMPARE_SCALAR_FIELD(is_program); |
2031 | 0 | COMPARE_STRING_FIELD(filename); |
2032 | 0 | COMPARE_NODE_FIELD(options); |
2033 | 0 | COMPARE_NODE_FIELD(whereClause); |
2034 | | |
2035 | 0 | return true; |
2036 | 0 | } |
2037 | | |
2038 | | static bool |
2039 | | _equalVariableSetStmt(const VariableSetStmt *a, const VariableSetStmt *b) |
2040 | 0 | { |
2041 | 0 | COMPARE_SCALAR_FIELD(kind); |
2042 | 0 | COMPARE_STRING_FIELD(name); |
2043 | 0 | COMPARE_NODE_FIELD(args); |
2044 | 0 | COMPARE_SCALAR_FIELD(jumble_args); |
2045 | 0 | COMPARE_SCALAR_FIELD(is_local); |
2046 | 0 | COMPARE_LOCATION_FIELD(location); |
2047 | |
|
2048 | 0 | return true; |
2049 | 0 | } |
2050 | | |
2051 | | static bool |
2052 | | _equalVariableShowStmt(const VariableShowStmt *a, const VariableShowStmt *b) |
2053 | 0 | { |
2054 | 0 | COMPARE_STRING_FIELD(name); |
2055 | | |
2056 | 0 | return true; |
2057 | 0 | } |
2058 | | |
2059 | | static bool |
2060 | | _equalCreateStmt(const CreateStmt *a, const CreateStmt *b) |
2061 | 0 | { |
2062 | 0 | COMPARE_NODE_FIELD(relation); |
2063 | 0 | COMPARE_NODE_FIELD(tableElts); |
2064 | 0 | COMPARE_NODE_FIELD(inhRelations); |
2065 | 0 | COMPARE_NODE_FIELD(partbound); |
2066 | 0 | COMPARE_NODE_FIELD(partspec); |
2067 | 0 | COMPARE_NODE_FIELD(ofTypename); |
2068 | 0 | COMPARE_NODE_FIELD(constraints); |
2069 | 0 | COMPARE_NODE_FIELD(nnconstraints); |
2070 | 0 | COMPARE_NODE_FIELD(options); |
2071 | 0 | COMPARE_SCALAR_FIELD(oncommit); |
2072 | 0 | COMPARE_STRING_FIELD(tablespacename); |
2073 | 0 | COMPARE_STRING_FIELD(accessMethod); |
2074 | 0 | COMPARE_SCALAR_FIELD(if_not_exists); |
2075 | | |
2076 | 0 | return true; |
2077 | 0 | } |
2078 | | |
2079 | | static bool |
2080 | | _equalConstraint(const Constraint *a, const Constraint *b) |
2081 | 0 | { |
2082 | 0 | COMPARE_SCALAR_FIELD(contype); |
2083 | 0 | COMPARE_STRING_FIELD(conname); |
2084 | 0 | COMPARE_SCALAR_FIELD(deferrable); |
2085 | 0 | COMPARE_SCALAR_FIELD(initdeferred); |
2086 | 0 | COMPARE_SCALAR_FIELD(is_enforced); |
2087 | 0 | COMPARE_SCALAR_FIELD(skip_validation); |
2088 | 0 | COMPARE_SCALAR_FIELD(initially_valid); |
2089 | 0 | COMPARE_SCALAR_FIELD(is_no_inherit); |
2090 | 0 | COMPARE_NODE_FIELD(raw_expr); |
2091 | 0 | COMPARE_STRING_FIELD(cooked_expr); |
2092 | 0 | COMPARE_SCALAR_FIELD(generated_when); |
2093 | 0 | COMPARE_SCALAR_FIELD(generated_kind); |
2094 | 0 | COMPARE_SCALAR_FIELD(nulls_not_distinct); |
2095 | 0 | COMPARE_NODE_FIELD(keys); |
2096 | 0 | COMPARE_SCALAR_FIELD(without_overlaps); |
2097 | 0 | COMPARE_NODE_FIELD(including); |
2098 | 0 | COMPARE_NODE_FIELD(exclusions); |
2099 | 0 | COMPARE_NODE_FIELD(options); |
2100 | 0 | COMPARE_STRING_FIELD(indexname); |
2101 | 0 | COMPARE_STRING_FIELD(indexspace); |
2102 | 0 | COMPARE_SCALAR_FIELD(reset_default_tblspc); |
2103 | 0 | COMPARE_STRING_FIELD(access_method); |
2104 | 0 | COMPARE_NODE_FIELD(where_clause); |
2105 | 0 | COMPARE_NODE_FIELD(pktable); |
2106 | 0 | COMPARE_NODE_FIELD(fk_attrs); |
2107 | 0 | COMPARE_NODE_FIELD(pk_attrs); |
2108 | 0 | COMPARE_SCALAR_FIELD(fk_with_period); |
2109 | 0 | COMPARE_SCALAR_FIELD(pk_with_period); |
2110 | 0 | COMPARE_SCALAR_FIELD(fk_matchtype); |
2111 | 0 | COMPARE_SCALAR_FIELD(fk_upd_action); |
2112 | 0 | COMPARE_SCALAR_FIELD(fk_del_action); |
2113 | 0 | COMPARE_NODE_FIELD(fk_del_set_cols); |
2114 | 0 | COMPARE_NODE_FIELD(old_conpfeqop); |
2115 | 0 | COMPARE_SCALAR_FIELD(old_pktable_oid); |
2116 | 0 | COMPARE_LOCATION_FIELD(location); |
2117 | |
|
2118 | 0 | return true; |
2119 | 0 | } |
2120 | | |
2121 | | static bool |
2122 | | _equalCreateTableSpaceStmt(const CreateTableSpaceStmt *a, const CreateTableSpaceStmt *b) |
2123 | 0 | { |
2124 | 0 | COMPARE_STRING_FIELD(tablespacename); |
2125 | 0 | COMPARE_NODE_FIELD(owner); |
2126 | 0 | COMPARE_STRING_FIELD(location); |
2127 | 0 | COMPARE_NODE_FIELD(options); |
2128 | | |
2129 | 0 | return true; |
2130 | 0 | } |
2131 | | |
2132 | | static bool |
2133 | | _equalDropTableSpaceStmt(const DropTableSpaceStmt *a, const DropTableSpaceStmt *b) |
2134 | 0 | { |
2135 | 0 | COMPARE_STRING_FIELD(tablespacename); |
2136 | 0 | COMPARE_SCALAR_FIELD(missing_ok); |
2137 | | |
2138 | 0 | return true; |
2139 | 0 | } |
2140 | | |
2141 | | static bool |
2142 | | _equalAlterTableSpaceOptionsStmt(const AlterTableSpaceOptionsStmt *a, const AlterTableSpaceOptionsStmt *b) |
2143 | 0 | { |
2144 | 0 | COMPARE_STRING_FIELD(tablespacename); |
2145 | 0 | COMPARE_NODE_FIELD(options); |
2146 | 0 | COMPARE_SCALAR_FIELD(isReset); |
2147 | | |
2148 | 0 | return true; |
2149 | 0 | } |
2150 | | |
2151 | | static bool |
2152 | | _equalAlterTableMoveAllStmt(const AlterTableMoveAllStmt *a, const AlterTableMoveAllStmt *b) |
2153 | 0 | { |
2154 | 0 | COMPARE_STRING_FIELD(orig_tablespacename); |
2155 | 0 | COMPARE_SCALAR_FIELD(objtype); |
2156 | 0 | COMPARE_NODE_FIELD(roles); |
2157 | 0 | COMPARE_STRING_FIELD(new_tablespacename); |
2158 | 0 | COMPARE_SCALAR_FIELD(nowait); |
2159 | | |
2160 | 0 | return true; |
2161 | 0 | } |
2162 | | |
2163 | | static bool |
2164 | | _equalCreateExtensionStmt(const CreateExtensionStmt *a, const CreateExtensionStmt *b) |
2165 | 0 | { |
2166 | 0 | COMPARE_STRING_FIELD(extname); |
2167 | 0 | COMPARE_SCALAR_FIELD(if_not_exists); |
2168 | 0 | COMPARE_NODE_FIELD(options); |
2169 | | |
2170 | 0 | return true; |
2171 | 0 | } |
2172 | | |
2173 | | static bool |
2174 | | _equalAlterExtensionStmt(const AlterExtensionStmt *a, const AlterExtensionStmt *b) |
2175 | 0 | { |
2176 | 0 | COMPARE_STRING_FIELD(extname); |
2177 | 0 | COMPARE_NODE_FIELD(options); |
2178 | | |
2179 | 0 | return true; |
2180 | 0 | } |
2181 | | |
2182 | | static bool |
2183 | | _equalAlterExtensionContentsStmt(const AlterExtensionContentsStmt *a, const AlterExtensionContentsStmt *b) |
2184 | 0 | { |
2185 | 0 | COMPARE_STRING_FIELD(extname); |
2186 | 0 | COMPARE_SCALAR_FIELD(action); |
2187 | 0 | COMPARE_SCALAR_FIELD(objtype); |
2188 | 0 | COMPARE_NODE_FIELD(object); |
2189 | | |
2190 | 0 | return true; |
2191 | 0 | } |
2192 | | |
2193 | | static bool |
2194 | | _equalCreateFdwStmt(const CreateFdwStmt *a, const CreateFdwStmt *b) |
2195 | 0 | { |
2196 | 0 | COMPARE_STRING_FIELD(fdwname); |
2197 | 0 | COMPARE_NODE_FIELD(func_options); |
2198 | 0 | COMPARE_NODE_FIELD(options); |
2199 | | |
2200 | 0 | return true; |
2201 | 0 | } |
2202 | | |
2203 | | static bool |
2204 | | _equalAlterFdwStmt(const AlterFdwStmt *a, const AlterFdwStmt *b) |
2205 | 0 | { |
2206 | 0 | COMPARE_STRING_FIELD(fdwname); |
2207 | 0 | COMPARE_NODE_FIELD(func_options); |
2208 | 0 | COMPARE_NODE_FIELD(options); |
2209 | | |
2210 | 0 | return true; |
2211 | 0 | } |
2212 | | |
2213 | | static bool |
2214 | | _equalCreateForeignServerStmt(const CreateForeignServerStmt *a, const CreateForeignServerStmt *b) |
2215 | 0 | { |
2216 | 0 | COMPARE_STRING_FIELD(servername); |
2217 | 0 | COMPARE_STRING_FIELD(servertype); |
2218 | 0 | COMPARE_STRING_FIELD(version); |
2219 | 0 | COMPARE_STRING_FIELD(fdwname); |
2220 | 0 | COMPARE_SCALAR_FIELD(if_not_exists); |
2221 | 0 | COMPARE_NODE_FIELD(options); |
2222 | | |
2223 | 0 | return true; |
2224 | 0 | } |
2225 | | |
2226 | | static bool |
2227 | | _equalAlterForeignServerStmt(const AlterForeignServerStmt *a, const AlterForeignServerStmt *b) |
2228 | 0 | { |
2229 | 0 | COMPARE_STRING_FIELD(servername); |
2230 | 0 | COMPARE_STRING_FIELD(version); |
2231 | 0 | COMPARE_NODE_FIELD(options); |
2232 | 0 | COMPARE_SCALAR_FIELD(has_version); |
2233 | | |
2234 | 0 | return true; |
2235 | 0 | } |
2236 | | |
2237 | | static bool |
2238 | | _equalCreateForeignTableStmt(const CreateForeignTableStmt *a, const CreateForeignTableStmt *b) |
2239 | 0 | { |
2240 | 0 | COMPARE_NODE_FIELD(base.relation); |
2241 | 0 | COMPARE_NODE_FIELD(base.tableElts); |
2242 | 0 | COMPARE_NODE_FIELD(base.inhRelations); |
2243 | 0 | COMPARE_NODE_FIELD(base.partbound); |
2244 | 0 | COMPARE_NODE_FIELD(base.partspec); |
2245 | 0 | COMPARE_NODE_FIELD(base.ofTypename); |
2246 | 0 | COMPARE_NODE_FIELD(base.constraints); |
2247 | 0 | COMPARE_NODE_FIELD(base.nnconstraints); |
2248 | 0 | COMPARE_NODE_FIELD(base.options); |
2249 | 0 | COMPARE_SCALAR_FIELD(base.oncommit); |
2250 | 0 | COMPARE_STRING_FIELD(base.tablespacename); |
2251 | 0 | COMPARE_STRING_FIELD(base.accessMethod); |
2252 | 0 | COMPARE_SCALAR_FIELD(base.if_not_exists); |
2253 | 0 | COMPARE_STRING_FIELD(servername); |
2254 | 0 | COMPARE_NODE_FIELD(options); |
2255 | | |
2256 | 0 | return true; |
2257 | 0 | } |
2258 | | |
2259 | | static bool |
2260 | | _equalCreateUserMappingStmt(const CreateUserMappingStmt *a, const CreateUserMappingStmt *b) |
2261 | 0 | { |
2262 | 0 | COMPARE_NODE_FIELD(user); |
2263 | 0 | COMPARE_STRING_FIELD(servername); |
2264 | 0 | COMPARE_SCALAR_FIELD(if_not_exists); |
2265 | 0 | COMPARE_NODE_FIELD(options); |
2266 | | |
2267 | 0 | return true; |
2268 | 0 | } |
2269 | | |
2270 | | static bool |
2271 | | _equalAlterUserMappingStmt(const AlterUserMappingStmt *a, const AlterUserMappingStmt *b) |
2272 | 0 | { |
2273 | 0 | COMPARE_NODE_FIELD(user); |
2274 | 0 | COMPARE_STRING_FIELD(servername); |
2275 | 0 | COMPARE_NODE_FIELD(options); |
2276 | | |
2277 | 0 | return true; |
2278 | 0 | } |
2279 | | |
2280 | | static bool |
2281 | | _equalDropUserMappingStmt(const DropUserMappingStmt *a, const DropUserMappingStmt *b) |
2282 | 0 | { |
2283 | 0 | COMPARE_NODE_FIELD(user); |
2284 | 0 | COMPARE_STRING_FIELD(servername); |
2285 | 0 | COMPARE_SCALAR_FIELD(missing_ok); |
2286 | | |
2287 | 0 | return true; |
2288 | 0 | } |
2289 | | |
2290 | | static bool |
2291 | | _equalImportForeignSchemaStmt(const ImportForeignSchemaStmt *a, const ImportForeignSchemaStmt *b) |
2292 | 0 | { |
2293 | 0 | COMPARE_STRING_FIELD(server_name); |
2294 | 0 | COMPARE_STRING_FIELD(remote_schema); |
2295 | 0 | COMPARE_STRING_FIELD(local_schema); |
2296 | 0 | COMPARE_SCALAR_FIELD(list_type); |
2297 | 0 | COMPARE_NODE_FIELD(table_list); |
2298 | 0 | COMPARE_NODE_FIELD(options); |
2299 | | |
2300 | 0 | return true; |
2301 | 0 | } |
2302 | | |
2303 | | static bool |
2304 | | _equalCreatePolicyStmt(const CreatePolicyStmt *a, const CreatePolicyStmt *b) |
2305 | 0 | { |
2306 | 0 | COMPARE_STRING_FIELD(policy_name); |
2307 | 0 | COMPARE_NODE_FIELD(table); |
2308 | 0 | COMPARE_STRING_FIELD(cmd_name); |
2309 | 0 | COMPARE_SCALAR_FIELD(permissive); |
2310 | 0 | COMPARE_NODE_FIELD(roles); |
2311 | 0 | COMPARE_NODE_FIELD(qual); |
2312 | 0 | COMPARE_NODE_FIELD(with_check); |
2313 | | |
2314 | 0 | return true; |
2315 | 0 | } |
2316 | | |
2317 | | static bool |
2318 | | _equalAlterPolicyStmt(const AlterPolicyStmt *a, const AlterPolicyStmt *b) |
2319 | 0 | { |
2320 | 0 | COMPARE_STRING_FIELD(policy_name); |
2321 | 0 | COMPARE_NODE_FIELD(table); |
2322 | 0 | COMPARE_NODE_FIELD(roles); |
2323 | 0 | COMPARE_NODE_FIELD(qual); |
2324 | 0 | COMPARE_NODE_FIELD(with_check); |
2325 | | |
2326 | 0 | return true; |
2327 | 0 | } |
2328 | | |
2329 | | static bool |
2330 | | _equalCreateAmStmt(const CreateAmStmt *a, const CreateAmStmt *b) |
2331 | 0 | { |
2332 | 0 | COMPARE_STRING_FIELD(amname); |
2333 | 0 | COMPARE_NODE_FIELD(handler_name); |
2334 | 0 | COMPARE_SCALAR_FIELD(amtype); |
2335 | | |
2336 | 0 | return true; |
2337 | 0 | } |
2338 | | |
2339 | | static bool |
2340 | | _equalCreateTrigStmt(const CreateTrigStmt *a, const CreateTrigStmt *b) |
2341 | 0 | { |
2342 | 0 | COMPARE_SCALAR_FIELD(replace); |
2343 | 0 | COMPARE_SCALAR_FIELD(isconstraint); |
2344 | 0 | COMPARE_STRING_FIELD(trigname); |
2345 | 0 | COMPARE_NODE_FIELD(relation); |
2346 | 0 | COMPARE_NODE_FIELD(funcname); |
2347 | 0 | COMPARE_NODE_FIELD(args); |
2348 | 0 | COMPARE_SCALAR_FIELD(row); |
2349 | 0 | COMPARE_SCALAR_FIELD(timing); |
2350 | 0 | COMPARE_SCALAR_FIELD(events); |
2351 | 0 | COMPARE_NODE_FIELD(columns); |
2352 | 0 | COMPARE_NODE_FIELD(whenClause); |
2353 | 0 | COMPARE_NODE_FIELD(transitionRels); |
2354 | 0 | COMPARE_SCALAR_FIELD(deferrable); |
2355 | 0 | COMPARE_SCALAR_FIELD(initdeferred); |
2356 | 0 | COMPARE_NODE_FIELD(constrrel); |
2357 | | |
2358 | 0 | return true; |
2359 | 0 | } |
2360 | | |
2361 | | static bool |
2362 | | _equalCreateEventTrigStmt(const CreateEventTrigStmt *a, const CreateEventTrigStmt *b) |
2363 | 0 | { |
2364 | 0 | COMPARE_STRING_FIELD(trigname); |
2365 | 0 | COMPARE_STRING_FIELD(eventname); |
2366 | 0 | COMPARE_NODE_FIELD(whenclause); |
2367 | 0 | COMPARE_NODE_FIELD(funcname); |
2368 | | |
2369 | 0 | return true; |
2370 | 0 | } |
2371 | | |
2372 | | static bool |
2373 | | _equalAlterEventTrigStmt(const AlterEventTrigStmt *a, const AlterEventTrigStmt *b) |
2374 | 0 | { |
2375 | 0 | COMPARE_STRING_FIELD(trigname); |
2376 | 0 | COMPARE_SCALAR_FIELD(tgenabled); |
2377 | | |
2378 | 0 | return true; |
2379 | 0 | } |
2380 | | |
2381 | | static bool |
2382 | | _equalCreatePLangStmt(const CreatePLangStmt *a, const CreatePLangStmt *b) |
2383 | 0 | { |
2384 | 0 | COMPARE_SCALAR_FIELD(replace); |
2385 | 0 | COMPARE_STRING_FIELD(plname); |
2386 | 0 | COMPARE_NODE_FIELD(plhandler); |
2387 | 0 | COMPARE_NODE_FIELD(plinline); |
2388 | 0 | COMPARE_NODE_FIELD(plvalidator); |
2389 | 0 | COMPARE_SCALAR_FIELD(pltrusted); |
2390 | | |
2391 | 0 | return true; |
2392 | 0 | } |
2393 | | |
2394 | | static bool |
2395 | | _equalCreateRoleStmt(const CreateRoleStmt *a, const CreateRoleStmt *b) |
2396 | 0 | { |
2397 | 0 | COMPARE_SCALAR_FIELD(stmt_type); |
2398 | 0 | COMPARE_STRING_FIELD(role); |
2399 | 0 | COMPARE_NODE_FIELD(options); |
2400 | | |
2401 | 0 | return true; |
2402 | 0 | } |
2403 | | |
2404 | | static bool |
2405 | | _equalAlterRoleStmt(const AlterRoleStmt *a, const AlterRoleStmt *b) |
2406 | 0 | { |
2407 | 0 | COMPARE_NODE_FIELD(role); |
2408 | 0 | COMPARE_NODE_FIELD(options); |
2409 | 0 | COMPARE_SCALAR_FIELD(action); |
2410 | | |
2411 | 0 | return true; |
2412 | 0 | } |
2413 | | |
2414 | | static bool |
2415 | | _equalAlterRoleSetStmt(const AlterRoleSetStmt *a, const AlterRoleSetStmt *b) |
2416 | 0 | { |
2417 | 0 | COMPARE_NODE_FIELD(role); |
2418 | 0 | COMPARE_STRING_FIELD(database); |
2419 | 0 | COMPARE_NODE_FIELD(setstmt); |
2420 | | |
2421 | 0 | return true; |
2422 | 0 | } |
2423 | | |
2424 | | static bool |
2425 | | _equalDropRoleStmt(const DropRoleStmt *a, const DropRoleStmt *b) |
2426 | 0 | { |
2427 | 0 | COMPARE_NODE_FIELD(roles); |
2428 | 0 | COMPARE_SCALAR_FIELD(missing_ok); |
2429 | | |
2430 | 0 | return true; |
2431 | 0 | } |
2432 | | |
2433 | | static bool |
2434 | | _equalCreateSeqStmt(const CreateSeqStmt *a, const CreateSeqStmt *b) |
2435 | 0 | { |
2436 | 0 | COMPARE_NODE_FIELD(sequence); |
2437 | 0 | COMPARE_NODE_FIELD(options); |
2438 | 0 | COMPARE_SCALAR_FIELD(ownerId); |
2439 | 0 | COMPARE_SCALAR_FIELD(for_identity); |
2440 | 0 | COMPARE_SCALAR_FIELD(if_not_exists); |
2441 | | |
2442 | 0 | return true; |
2443 | 0 | } |
2444 | | |
2445 | | static bool |
2446 | | _equalAlterSeqStmt(const AlterSeqStmt *a, const AlterSeqStmt *b) |
2447 | 0 | { |
2448 | 0 | COMPARE_NODE_FIELD(sequence); |
2449 | 0 | COMPARE_NODE_FIELD(options); |
2450 | 0 | COMPARE_SCALAR_FIELD(for_identity); |
2451 | 0 | COMPARE_SCALAR_FIELD(missing_ok); |
2452 | | |
2453 | 0 | return true; |
2454 | 0 | } |
2455 | | |
2456 | | static bool |
2457 | | _equalDefineStmt(const DefineStmt *a, const DefineStmt *b) |
2458 | 0 | { |
2459 | 0 | COMPARE_SCALAR_FIELD(kind); |
2460 | 0 | COMPARE_SCALAR_FIELD(oldstyle); |
2461 | 0 | COMPARE_NODE_FIELD(defnames); |
2462 | 0 | COMPARE_NODE_FIELD(args); |
2463 | 0 | COMPARE_NODE_FIELD(definition); |
2464 | 0 | COMPARE_SCALAR_FIELD(if_not_exists); |
2465 | 0 | COMPARE_SCALAR_FIELD(replace); |
2466 | | |
2467 | 0 | return true; |
2468 | 0 | } |
2469 | | |
2470 | | static bool |
2471 | | _equalCreateDomainStmt(const CreateDomainStmt *a, const CreateDomainStmt *b) |
2472 | 0 | { |
2473 | 0 | COMPARE_NODE_FIELD(domainname); |
2474 | 0 | COMPARE_NODE_FIELD(typeName); |
2475 | 0 | COMPARE_NODE_FIELD(collClause); |
2476 | 0 | COMPARE_NODE_FIELD(constraints); |
2477 | | |
2478 | 0 | return true; |
2479 | 0 | } |
2480 | | |
2481 | | static bool |
2482 | | _equalCreateOpClassStmt(const CreateOpClassStmt *a, const CreateOpClassStmt *b) |
2483 | 0 | { |
2484 | 0 | COMPARE_NODE_FIELD(opclassname); |
2485 | 0 | COMPARE_NODE_FIELD(opfamilyname); |
2486 | 0 | COMPARE_STRING_FIELD(amname); |
2487 | 0 | COMPARE_NODE_FIELD(datatype); |
2488 | 0 | COMPARE_NODE_FIELD(items); |
2489 | 0 | COMPARE_SCALAR_FIELD(isDefault); |
2490 | | |
2491 | 0 | return true; |
2492 | 0 | } |
2493 | | |
2494 | | static bool |
2495 | | _equalCreateOpClassItem(const CreateOpClassItem *a, const CreateOpClassItem *b) |
2496 | 0 | { |
2497 | 0 | COMPARE_SCALAR_FIELD(itemtype); |
2498 | 0 | COMPARE_NODE_FIELD(name); |
2499 | 0 | COMPARE_SCALAR_FIELD(number); |
2500 | 0 | COMPARE_NODE_FIELD(order_family); |
2501 | 0 | COMPARE_NODE_FIELD(class_args); |
2502 | 0 | COMPARE_NODE_FIELD(storedtype); |
2503 | | |
2504 | 0 | return true; |
2505 | 0 | } |
2506 | | |
2507 | | static bool |
2508 | | _equalCreateOpFamilyStmt(const CreateOpFamilyStmt *a, const CreateOpFamilyStmt *b) |
2509 | 0 | { |
2510 | 0 | COMPARE_NODE_FIELD(opfamilyname); |
2511 | 0 | COMPARE_STRING_FIELD(amname); |
2512 | | |
2513 | 0 | return true; |
2514 | 0 | } |
2515 | | |
2516 | | static bool |
2517 | | _equalAlterOpFamilyStmt(const AlterOpFamilyStmt *a, const AlterOpFamilyStmt *b) |
2518 | 0 | { |
2519 | 0 | COMPARE_NODE_FIELD(opfamilyname); |
2520 | 0 | COMPARE_STRING_FIELD(amname); |
2521 | 0 | COMPARE_SCALAR_FIELD(isDrop); |
2522 | 0 | COMPARE_NODE_FIELD(items); |
2523 | | |
2524 | 0 | return true; |
2525 | 0 | } |
2526 | | |
2527 | | static bool |
2528 | | _equalDropStmt(const DropStmt *a, const DropStmt *b) |
2529 | 0 | { |
2530 | 0 | COMPARE_NODE_FIELD(objects); |
2531 | 0 | COMPARE_SCALAR_FIELD(removeType); |
2532 | 0 | COMPARE_SCALAR_FIELD(behavior); |
2533 | 0 | COMPARE_SCALAR_FIELD(missing_ok); |
2534 | 0 | COMPARE_SCALAR_FIELD(concurrent); |
2535 | | |
2536 | 0 | return true; |
2537 | 0 | } |
2538 | | |
2539 | | static bool |
2540 | | _equalTruncateStmt(const TruncateStmt *a, const TruncateStmt *b) |
2541 | 0 | { |
2542 | 0 | COMPARE_NODE_FIELD(relations); |
2543 | 0 | COMPARE_SCALAR_FIELD(restart_seqs); |
2544 | 0 | COMPARE_SCALAR_FIELD(behavior); |
2545 | | |
2546 | 0 | return true; |
2547 | 0 | } |
2548 | | |
2549 | | static bool |
2550 | | _equalCommentStmt(const CommentStmt *a, const CommentStmt *b) |
2551 | 0 | { |
2552 | 0 | COMPARE_SCALAR_FIELD(objtype); |
2553 | 0 | COMPARE_NODE_FIELD(object); |
2554 | 0 | COMPARE_STRING_FIELD(comment); |
2555 | | |
2556 | 0 | return true; |
2557 | 0 | } |
2558 | | |
2559 | | static bool |
2560 | | _equalSecLabelStmt(const SecLabelStmt *a, const SecLabelStmt *b) |
2561 | 0 | { |
2562 | 0 | COMPARE_SCALAR_FIELD(objtype); |
2563 | 0 | COMPARE_NODE_FIELD(object); |
2564 | 0 | COMPARE_STRING_FIELD(provider); |
2565 | 0 | COMPARE_STRING_FIELD(label); |
2566 | | |
2567 | 0 | return true; |
2568 | 0 | } |
2569 | | |
2570 | | static bool |
2571 | | _equalDeclareCursorStmt(const DeclareCursorStmt *a, const DeclareCursorStmt *b) |
2572 | 0 | { |
2573 | 0 | COMPARE_STRING_FIELD(portalname); |
2574 | 0 | COMPARE_SCALAR_FIELD(options); |
2575 | 0 | COMPARE_NODE_FIELD(query); |
2576 | | |
2577 | 0 | return true; |
2578 | 0 | } |
2579 | | |
2580 | | static bool |
2581 | | _equalClosePortalStmt(const ClosePortalStmt *a, const ClosePortalStmt *b) |
2582 | 0 | { |
2583 | 0 | COMPARE_STRING_FIELD(portalname); |
2584 | | |
2585 | 0 | return true; |
2586 | 0 | } |
2587 | | |
2588 | | static bool |
2589 | | _equalFetchStmt(const FetchStmt *a, const FetchStmt *b) |
2590 | 0 | { |
2591 | 0 | COMPARE_SCALAR_FIELD(direction); |
2592 | 0 | COMPARE_SCALAR_FIELD(howMany); |
2593 | 0 | COMPARE_STRING_FIELD(portalname); |
2594 | 0 | COMPARE_SCALAR_FIELD(ismove); |
2595 | 0 | COMPARE_SCALAR_FIELD(direction_keyword); |
2596 | 0 | COMPARE_LOCATION_FIELD(location); |
2597 | |
|
2598 | 0 | return true; |
2599 | 0 | } |
2600 | | |
2601 | | static bool |
2602 | | _equalIndexStmt(const IndexStmt *a, const IndexStmt *b) |
2603 | 0 | { |
2604 | 0 | COMPARE_STRING_FIELD(idxname); |
2605 | 0 | COMPARE_NODE_FIELD(relation); |
2606 | 0 | COMPARE_STRING_FIELD(accessMethod); |
2607 | 0 | COMPARE_STRING_FIELD(tableSpace); |
2608 | 0 | COMPARE_NODE_FIELD(indexParams); |
2609 | 0 | COMPARE_NODE_FIELD(indexIncludingParams); |
2610 | 0 | COMPARE_NODE_FIELD(options); |
2611 | 0 | COMPARE_NODE_FIELD(whereClause); |
2612 | 0 | COMPARE_NODE_FIELD(excludeOpNames); |
2613 | 0 | COMPARE_STRING_FIELD(idxcomment); |
2614 | 0 | COMPARE_SCALAR_FIELD(indexOid); |
2615 | 0 | COMPARE_SCALAR_FIELD(oldNumber); |
2616 | 0 | COMPARE_SCALAR_FIELD(oldCreateSubid); |
2617 | 0 | COMPARE_SCALAR_FIELD(oldFirstRelfilelocatorSubid); |
2618 | 0 | COMPARE_SCALAR_FIELD(unique); |
2619 | 0 | COMPARE_SCALAR_FIELD(nulls_not_distinct); |
2620 | 0 | COMPARE_SCALAR_FIELD(primary); |
2621 | 0 | COMPARE_SCALAR_FIELD(isconstraint); |
2622 | 0 | COMPARE_SCALAR_FIELD(iswithoutoverlaps); |
2623 | 0 | COMPARE_SCALAR_FIELD(deferrable); |
2624 | 0 | COMPARE_SCALAR_FIELD(initdeferred); |
2625 | 0 | COMPARE_SCALAR_FIELD(transformed); |
2626 | 0 | COMPARE_SCALAR_FIELD(concurrent); |
2627 | 0 | COMPARE_SCALAR_FIELD(if_not_exists); |
2628 | 0 | COMPARE_SCALAR_FIELD(reset_default_tblspc); |
2629 | | |
2630 | 0 | return true; |
2631 | 0 | } |
2632 | | |
2633 | | static bool |
2634 | | _equalCreateStatsStmt(const CreateStatsStmt *a, const CreateStatsStmt *b) |
2635 | 0 | { |
2636 | 0 | COMPARE_NODE_FIELD(defnames); |
2637 | 0 | COMPARE_NODE_FIELD(stat_types); |
2638 | 0 | COMPARE_NODE_FIELD(exprs); |
2639 | 0 | COMPARE_NODE_FIELD(relations); |
2640 | 0 | COMPARE_STRING_FIELD(stxcomment); |
2641 | 0 | COMPARE_SCALAR_FIELD(transformed); |
2642 | 0 | COMPARE_SCALAR_FIELD(if_not_exists); |
2643 | | |
2644 | 0 | return true; |
2645 | 0 | } |
2646 | | |
2647 | | static bool |
2648 | | _equalStatsElem(const StatsElem *a, const StatsElem *b) |
2649 | 0 | { |
2650 | 0 | COMPARE_STRING_FIELD(name); |
2651 | 0 | COMPARE_NODE_FIELD(expr); |
2652 | | |
2653 | 0 | return true; |
2654 | 0 | } |
2655 | | |
2656 | | static bool |
2657 | | _equalAlterStatsStmt(const AlterStatsStmt *a, const AlterStatsStmt *b) |
2658 | 0 | { |
2659 | 0 | COMPARE_NODE_FIELD(defnames); |
2660 | 0 | COMPARE_NODE_FIELD(stxstattarget); |
2661 | 0 | COMPARE_SCALAR_FIELD(missing_ok); |
2662 | | |
2663 | 0 | return true; |
2664 | 0 | } |
2665 | | |
2666 | | static bool |
2667 | | _equalCreateFunctionStmt(const CreateFunctionStmt *a, const CreateFunctionStmt *b) |
2668 | 0 | { |
2669 | 0 | COMPARE_SCALAR_FIELD(is_procedure); |
2670 | 0 | COMPARE_SCALAR_FIELD(replace); |
2671 | 0 | COMPARE_NODE_FIELD(funcname); |
2672 | 0 | COMPARE_NODE_FIELD(parameters); |
2673 | 0 | COMPARE_NODE_FIELD(returnType); |
2674 | 0 | COMPARE_NODE_FIELD(options); |
2675 | 0 | COMPARE_NODE_FIELD(sql_body); |
2676 | | |
2677 | 0 | return true; |
2678 | 0 | } |
2679 | | |
2680 | | static bool |
2681 | | _equalFunctionParameter(const FunctionParameter *a, const FunctionParameter *b) |
2682 | 0 | { |
2683 | 0 | COMPARE_STRING_FIELD(name); |
2684 | 0 | COMPARE_NODE_FIELD(argType); |
2685 | 0 | COMPARE_SCALAR_FIELD(mode); |
2686 | 0 | COMPARE_NODE_FIELD(defexpr); |
2687 | 0 | COMPARE_LOCATION_FIELD(location); |
2688 | |
|
2689 | 0 | return true; |
2690 | 0 | } |
2691 | | |
2692 | | static bool |
2693 | | _equalAlterFunctionStmt(const AlterFunctionStmt *a, const AlterFunctionStmt *b) |
2694 | 0 | { |
2695 | 0 | COMPARE_SCALAR_FIELD(objtype); |
2696 | 0 | COMPARE_NODE_FIELD(func); |
2697 | 0 | COMPARE_NODE_FIELD(actions); |
2698 | | |
2699 | 0 | return true; |
2700 | 0 | } |
2701 | | |
2702 | | static bool |
2703 | | _equalDoStmt(const DoStmt *a, const DoStmt *b) |
2704 | 0 | { |
2705 | 0 | COMPARE_NODE_FIELD(args); |
2706 | | |
2707 | 0 | return true; |
2708 | 0 | } |
2709 | | |
2710 | | static bool |
2711 | | _equalCallStmt(const CallStmt *a, const CallStmt *b) |
2712 | 0 | { |
2713 | 0 | COMPARE_NODE_FIELD(funccall); |
2714 | 0 | COMPARE_NODE_FIELD(funcexpr); |
2715 | 0 | COMPARE_NODE_FIELD(outargs); |
2716 | | |
2717 | 0 | return true; |
2718 | 0 | } |
2719 | | |
2720 | | static bool |
2721 | | _equalRenameStmt(const RenameStmt *a, const RenameStmt *b) |
2722 | 0 | { |
2723 | 0 | COMPARE_SCALAR_FIELD(renameType); |
2724 | 0 | COMPARE_SCALAR_FIELD(relationType); |
2725 | 0 | COMPARE_NODE_FIELD(relation); |
2726 | 0 | COMPARE_NODE_FIELD(object); |
2727 | 0 | COMPARE_STRING_FIELD(subname); |
2728 | 0 | COMPARE_STRING_FIELD(newname); |
2729 | 0 | COMPARE_SCALAR_FIELD(behavior); |
2730 | 0 | COMPARE_SCALAR_FIELD(missing_ok); |
2731 | | |
2732 | 0 | return true; |
2733 | 0 | } |
2734 | | |
2735 | | static bool |
2736 | | _equalAlterObjectDependsStmt(const AlterObjectDependsStmt *a, const AlterObjectDependsStmt *b) |
2737 | 0 | { |
2738 | 0 | COMPARE_SCALAR_FIELD(objectType); |
2739 | 0 | COMPARE_NODE_FIELD(relation); |
2740 | 0 | COMPARE_NODE_FIELD(object); |
2741 | 0 | COMPARE_NODE_FIELD(extname); |
2742 | 0 | COMPARE_SCALAR_FIELD(remove); |
2743 | | |
2744 | 0 | return true; |
2745 | 0 | } |
2746 | | |
2747 | | static bool |
2748 | | _equalAlterObjectSchemaStmt(const AlterObjectSchemaStmt *a, const AlterObjectSchemaStmt *b) |
2749 | 0 | { |
2750 | 0 | COMPARE_SCALAR_FIELD(objectType); |
2751 | 0 | COMPARE_NODE_FIELD(relation); |
2752 | 0 | COMPARE_NODE_FIELD(object); |
2753 | 0 | COMPARE_STRING_FIELD(newschema); |
2754 | 0 | COMPARE_SCALAR_FIELD(missing_ok); |
2755 | | |
2756 | 0 | return true; |
2757 | 0 | } |
2758 | | |
2759 | | static bool |
2760 | | _equalAlterOwnerStmt(const AlterOwnerStmt *a, const AlterOwnerStmt *b) |
2761 | 0 | { |
2762 | 0 | COMPARE_SCALAR_FIELD(objectType); |
2763 | 0 | COMPARE_NODE_FIELD(relation); |
2764 | 0 | COMPARE_NODE_FIELD(object); |
2765 | 0 | COMPARE_NODE_FIELD(newowner); |
2766 | | |
2767 | 0 | return true; |
2768 | 0 | } |
2769 | | |
2770 | | static bool |
2771 | | _equalAlterOperatorStmt(const AlterOperatorStmt *a, const AlterOperatorStmt *b) |
2772 | 0 | { |
2773 | 0 | COMPARE_NODE_FIELD(opername); |
2774 | 0 | COMPARE_NODE_FIELD(options); |
2775 | | |
2776 | 0 | return true; |
2777 | 0 | } |
2778 | | |
2779 | | static bool |
2780 | | _equalAlterTypeStmt(const AlterTypeStmt *a, const AlterTypeStmt *b) |
2781 | 0 | { |
2782 | 0 | COMPARE_NODE_FIELD(typeName); |
2783 | 0 | COMPARE_NODE_FIELD(options); |
2784 | | |
2785 | 0 | return true; |
2786 | 0 | } |
2787 | | |
2788 | | static bool |
2789 | | _equalRuleStmt(const RuleStmt *a, const RuleStmt *b) |
2790 | 0 | { |
2791 | 0 | COMPARE_NODE_FIELD(relation); |
2792 | 0 | COMPARE_STRING_FIELD(rulename); |
2793 | 0 | COMPARE_NODE_FIELD(whereClause); |
2794 | 0 | COMPARE_SCALAR_FIELD(event); |
2795 | 0 | COMPARE_SCALAR_FIELD(instead); |
2796 | 0 | COMPARE_NODE_FIELD(actions); |
2797 | 0 | COMPARE_SCALAR_FIELD(replace); |
2798 | | |
2799 | 0 | return true; |
2800 | 0 | } |
2801 | | |
2802 | | static bool |
2803 | | _equalNotifyStmt(const NotifyStmt *a, const NotifyStmt *b) |
2804 | 0 | { |
2805 | 0 | COMPARE_STRING_FIELD(conditionname); |
2806 | 0 | COMPARE_STRING_FIELD(payload); |
2807 | | |
2808 | 0 | return true; |
2809 | 0 | } |
2810 | | |
2811 | | static bool |
2812 | | _equalListenStmt(const ListenStmt *a, const ListenStmt *b) |
2813 | 0 | { |
2814 | 0 | COMPARE_STRING_FIELD(conditionname); |
2815 | | |
2816 | 0 | return true; |
2817 | 0 | } |
2818 | | |
2819 | | static bool |
2820 | | _equalUnlistenStmt(const UnlistenStmt *a, const UnlistenStmt *b) |
2821 | 0 | { |
2822 | 0 | COMPARE_STRING_FIELD(conditionname); |
2823 | | |
2824 | 0 | return true; |
2825 | 0 | } |
2826 | | |
2827 | | static bool |
2828 | | _equalTransactionStmt(const TransactionStmt *a, const TransactionStmt *b) |
2829 | 0 | { |
2830 | 0 | COMPARE_SCALAR_FIELD(kind); |
2831 | 0 | COMPARE_NODE_FIELD(options); |
2832 | 0 | COMPARE_STRING_FIELD(savepoint_name); |
2833 | 0 | COMPARE_STRING_FIELD(gid); |
2834 | 0 | COMPARE_SCALAR_FIELD(chain); |
2835 | 0 | COMPARE_LOCATION_FIELD(location); |
2836 | |
|
2837 | 0 | return true; |
2838 | 0 | } |
2839 | | |
2840 | | static bool |
2841 | | _equalCompositeTypeStmt(const CompositeTypeStmt *a, const CompositeTypeStmt *b) |
2842 | 0 | { |
2843 | 0 | COMPARE_NODE_FIELD(typevar); |
2844 | 0 | COMPARE_NODE_FIELD(coldeflist); |
2845 | | |
2846 | 0 | return true; |
2847 | 0 | } |
2848 | | |
2849 | | static bool |
2850 | | _equalCreateEnumStmt(const CreateEnumStmt *a, const CreateEnumStmt *b) |
2851 | 0 | { |
2852 | 0 | COMPARE_NODE_FIELD(typeName); |
2853 | 0 | COMPARE_NODE_FIELD(vals); |
2854 | | |
2855 | 0 | return true; |
2856 | 0 | } |
2857 | | |
2858 | | static bool |
2859 | | _equalCreateRangeStmt(const CreateRangeStmt *a, const CreateRangeStmt *b) |
2860 | 0 | { |
2861 | 0 | COMPARE_NODE_FIELD(typeName); |
2862 | 0 | COMPARE_NODE_FIELD(params); |
2863 | | |
2864 | 0 | return true; |
2865 | 0 | } |
2866 | | |
2867 | | static bool |
2868 | | _equalAlterEnumStmt(const AlterEnumStmt *a, const AlterEnumStmt *b) |
2869 | 0 | { |
2870 | 0 | COMPARE_NODE_FIELD(typeName); |
2871 | 0 | COMPARE_STRING_FIELD(oldVal); |
2872 | 0 | COMPARE_STRING_FIELD(newVal); |
2873 | 0 | COMPARE_STRING_FIELD(newValNeighbor); |
2874 | 0 | COMPARE_SCALAR_FIELD(newValIsAfter); |
2875 | 0 | COMPARE_SCALAR_FIELD(skipIfNewValExists); |
2876 | | |
2877 | 0 | return true; |
2878 | 0 | } |
2879 | | |
2880 | | static bool |
2881 | | _equalViewStmt(const ViewStmt *a, const ViewStmt *b) |
2882 | 0 | { |
2883 | 0 | COMPARE_NODE_FIELD(view); |
2884 | 0 | COMPARE_NODE_FIELD(aliases); |
2885 | 0 | COMPARE_NODE_FIELD(query); |
2886 | 0 | COMPARE_SCALAR_FIELD(replace); |
2887 | 0 | COMPARE_NODE_FIELD(options); |
2888 | 0 | COMPARE_SCALAR_FIELD(withCheckOption); |
2889 | | |
2890 | 0 | return true; |
2891 | 0 | } |
2892 | | |
2893 | | static bool |
2894 | | _equalLoadStmt(const LoadStmt *a, const LoadStmt *b) |
2895 | 0 | { |
2896 | 0 | COMPARE_STRING_FIELD(filename); |
2897 | | |
2898 | 0 | return true; |
2899 | 0 | } |
2900 | | |
2901 | | static bool |
2902 | | _equalCreatedbStmt(const CreatedbStmt *a, const CreatedbStmt *b) |
2903 | 0 | { |
2904 | 0 | COMPARE_STRING_FIELD(dbname); |
2905 | 0 | COMPARE_NODE_FIELD(options); |
2906 | | |
2907 | 0 | return true; |
2908 | 0 | } |
2909 | | |
2910 | | static bool |
2911 | | _equalAlterDatabaseStmt(const AlterDatabaseStmt *a, const AlterDatabaseStmt *b) |
2912 | 0 | { |
2913 | 0 | COMPARE_STRING_FIELD(dbname); |
2914 | 0 | COMPARE_NODE_FIELD(options); |
2915 | | |
2916 | 0 | return true; |
2917 | 0 | } |
2918 | | |
2919 | | static bool |
2920 | | _equalAlterDatabaseRefreshCollStmt(const AlterDatabaseRefreshCollStmt *a, const AlterDatabaseRefreshCollStmt *b) |
2921 | 0 | { |
2922 | 0 | COMPARE_STRING_FIELD(dbname); |
2923 | | |
2924 | 0 | return true; |
2925 | 0 | } |
2926 | | |
2927 | | static bool |
2928 | | _equalAlterDatabaseSetStmt(const AlterDatabaseSetStmt *a, const AlterDatabaseSetStmt *b) |
2929 | 0 | { |
2930 | 0 | COMPARE_STRING_FIELD(dbname); |
2931 | 0 | COMPARE_NODE_FIELD(setstmt); |
2932 | | |
2933 | 0 | return true; |
2934 | 0 | } |
2935 | | |
2936 | | static bool |
2937 | | _equalDropdbStmt(const DropdbStmt *a, const DropdbStmt *b) |
2938 | 0 | { |
2939 | 0 | COMPARE_STRING_FIELD(dbname); |
2940 | 0 | COMPARE_SCALAR_FIELD(missing_ok); |
2941 | 0 | COMPARE_NODE_FIELD(options); |
2942 | | |
2943 | 0 | return true; |
2944 | 0 | } |
2945 | | |
2946 | | static bool |
2947 | | _equalAlterSystemStmt(const AlterSystemStmt *a, const AlterSystemStmt *b) |
2948 | 0 | { |
2949 | 0 | COMPARE_NODE_FIELD(setstmt); |
2950 | | |
2951 | 0 | return true; |
2952 | 0 | } |
2953 | | |
2954 | | static bool |
2955 | | _equalClusterStmt(const ClusterStmt *a, const ClusterStmt *b) |
2956 | 0 | { |
2957 | 0 | COMPARE_NODE_FIELD(relation); |
2958 | 0 | COMPARE_STRING_FIELD(indexname); |
2959 | 0 | COMPARE_NODE_FIELD(params); |
2960 | | |
2961 | 0 | return true; |
2962 | 0 | } |
2963 | | |
2964 | | static bool |
2965 | | _equalVacuumStmt(const VacuumStmt *a, const VacuumStmt *b) |
2966 | 0 | { |
2967 | 0 | COMPARE_NODE_FIELD(options); |
2968 | 0 | COMPARE_NODE_FIELD(rels); |
2969 | 0 | COMPARE_SCALAR_FIELD(is_vacuumcmd); |
2970 | | |
2971 | 0 | return true; |
2972 | 0 | } |
2973 | | |
2974 | | static bool |
2975 | | _equalVacuumRelation(const VacuumRelation *a, const VacuumRelation *b) |
2976 | 0 | { |
2977 | 0 | COMPARE_NODE_FIELD(relation); |
2978 | 0 | COMPARE_SCALAR_FIELD(oid); |
2979 | 0 | COMPARE_NODE_FIELD(va_cols); |
2980 | | |
2981 | 0 | return true; |
2982 | 0 | } |
2983 | | |
2984 | | static bool |
2985 | | _equalExplainStmt(const ExplainStmt *a, const ExplainStmt *b) |
2986 | 0 | { |
2987 | 0 | COMPARE_NODE_FIELD(query); |
2988 | 0 | COMPARE_NODE_FIELD(options); |
2989 | | |
2990 | 0 | return true; |
2991 | 0 | } |
2992 | | |
2993 | | static bool |
2994 | | _equalCreateTableAsStmt(const CreateTableAsStmt *a, const CreateTableAsStmt *b) |
2995 | 0 | { |
2996 | 0 | COMPARE_NODE_FIELD(query); |
2997 | 0 | COMPARE_NODE_FIELD(into); |
2998 | 0 | COMPARE_SCALAR_FIELD(objtype); |
2999 | 0 | COMPARE_SCALAR_FIELD(is_select_into); |
3000 | 0 | COMPARE_SCALAR_FIELD(if_not_exists); |
3001 | | |
3002 | 0 | return true; |
3003 | 0 | } |
3004 | | |
3005 | | static bool |
3006 | | _equalRefreshMatViewStmt(const RefreshMatViewStmt *a, const RefreshMatViewStmt *b) |
3007 | 0 | { |
3008 | 0 | COMPARE_SCALAR_FIELD(concurrent); |
3009 | 0 | COMPARE_SCALAR_FIELD(skipData); |
3010 | 0 | COMPARE_NODE_FIELD(relation); |
3011 | | |
3012 | 0 | return true; |
3013 | 0 | } |
3014 | | |
3015 | | static bool |
3016 | | _equalCheckPointStmt(const CheckPointStmt *a, const CheckPointStmt *b) |
3017 | 0 | { |
3018 | 0 | COMPARE_NODE_FIELD(options); |
3019 | | |
3020 | 0 | return true; |
3021 | 0 | } |
3022 | | |
3023 | | static bool |
3024 | | _equalDiscardStmt(const DiscardStmt *a, const DiscardStmt *b) |
3025 | 0 | { |
3026 | 0 | COMPARE_SCALAR_FIELD(target); |
3027 | | |
3028 | 0 | return true; |
3029 | 0 | } |
3030 | | |
3031 | | static bool |
3032 | | _equalLockStmt(const LockStmt *a, const LockStmt *b) |
3033 | 0 | { |
3034 | 0 | COMPARE_NODE_FIELD(relations); |
3035 | 0 | COMPARE_SCALAR_FIELD(mode); |
3036 | 0 | COMPARE_SCALAR_FIELD(nowait); |
3037 | | |
3038 | 0 | return true; |
3039 | 0 | } |
3040 | | |
3041 | | static bool |
3042 | | _equalConstraintsSetStmt(const ConstraintsSetStmt *a, const ConstraintsSetStmt *b) |
3043 | 0 | { |
3044 | 0 | COMPARE_NODE_FIELD(constraints); |
3045 | 0 | COMPARE_SCALAR_FIELD(deferred); |
3046 | | |
3047 | 0 | return true; |
3048 | 0 | } |
3049 | | |
3050 | | static bool |
3051 | | _equalReindexStmt(const ReindexStmt *a, const ReindexStmt *b) |
3052 | 0 | { |
3053 | 0 | COMPARE_SCALAR_FIELD(kind); |
3054 | 0 | COMPARE_NODE_FIELD(relation); |
3055 | 0 | COMPARE_STRING_FIELD(name); |
3056 | 0 | COMPARE_NODE_FIELD(params); |
3057 | | |
3058 | 0 | return true; |
3059 | 0 | } |
3060 | | |
3061 | | static bool |
3062 | | _equalCreateConversionStmt(const CreateConversionStmt *a, const CreateConversionStmt *b) |
3063 | 0 | { |
3064 | 0 | COMPARE_NODE_FIELD(conversion_name); |
3065 | 0 | COMPARE_STRING_FIELD(for_encoding_name); |
3066 | 0 | COMPARE_STRING_FIELD(to_encoding_name); |
3067 | 0 | COMPARE_NODE_FIELD(func_name); |
3068 | 0 | COMPARE_SCALAR_FIELD(def); |
3069 | | |
3070 | 0 | return true; |
3071 | 0 | } |
3072 | | |
3073 | | static bool |
3074 | | _equalCreateCastStmt(const CreateCastStmt *a, const CreateCastStmt *b) |
3075 | 0 | { |
3076 | 0 | COMPARE_NODE_FIELD(sourcetype); |
3077 | 0 | COMPARE_NODE_FIELD(targettype); |
3078 | 0 | COMPARE_NODE_FIELD(func); |
3079 | 0 | COMPARE_SCALAR_FIELD(context); |
3080 | 0 | COMPARE_SCALAR_FIELD(inout); |
3081 | | |
3082 | 0 | return true; |
3083 | 0 | } |
3084 | | |
3085 | | static bool |
3086 | | _equalCreateTransformStmt(const CreateTransformStmt *a, const CreateTransformStmt *b) |
3087 | 0 | { |
3088 | 0 | COMPARE_SCALAR_FIELD(replace); |
3089 | 0 | COMPARE_NODE_FIELD(type_name); |
3090 | 0 | COMPARE_STRING_FIELD(lang); |
3091 | 0 | COMPARE_NODE_FIELD(fromsql); |
3092 | 0 | COMPARE_NODE_FIELD(tosql); |
3093 | | |
3094 | 0 | return true; |
3095 | 0 | } |
3096 | | |
3097 | | static bool |
3098 | | _equalPrepareStmt(const PrepareStmt *a, const PrepareStmt *b) |
3099 | 0 | { |
3100 | 0 | COMPARE_STRING_FIELD(name); |
3101 | 0 | COMPARE_NODE_FIELD(argtypes); |
3102 | 0 | COMPARE_NODE_FIELD(query); |
3103 | | |
3104 | 0 | return true; |
3105 | 0 | } |
3106 | | |
3107 | | static bool |
3108 | | _equalExecuteStmt(const ExecuteStmt *a, const ExecuteStmt *b) |
3109 | 0 | { |
3110 | 0 | COMPARE_STRING_FIELD(name); |
3111 | 0 | COMPARE_NODE_FIELD(params); |
3112 | | |
3113 | 0 | return true; |
3114 | 0 | } |
3115 | | |
3116 | | static bool |
3117 | | _equalDeallocateStmt(const DeallocateStmt *a, const DeallocateStmt *b) |
3118 | 0 | { |
3119 | 0 | COMPARE_STRING_FIELD(name); |
3120 | 0 | COMPARE_SCALAR_FIELD(isall); |
3121 | 0 | COMPARE_LOCATION_FIELD(location); |
3122 | |
|
3123 | 0 | return true; |
3124 | 0 | } |
3125 | | |
3126 | | static bool |
3127 | | _equalDropOwnedStmt(const DropOwnedStmt *a, const DropOwnedStmt *b) |
3128 | 0 | { |
3129 | 0 | COMPARE_NODE_FIELD(roles); |
3130 | 0 | COMPARE_SCALAR_FIELD(behavior); |
3131 | | |
3132 | 0 | return true; |
3133 | 0 | } |
3134 | | |
3135 | | static bool |
3136 | | _equalReassignOwnedStmt(const ReassignOwnedStmt *a, const ReassignOwnedStmt *b) |
3137 | 0 | { |
3138 | 0 | COMPARE_NODE_FIELD(roles); |
3139 | 0 | COMPARE_NODE_FIELD(newrole); |
3140 | | |
3141 | 0 | return true; |
3142 | 0 | } |
3143 | | |
3144 | | static bool |
3145 | | _equalAlterTSDictionaryStmt(const AlterTSDictionaryStmt *a, const AlterTSDictionaryStmt *b) |
3146 | 0 | { |
3147 | 0 | COMPARE_NODE_FIELD(dictname); |
3148 | 0 | COMPARE_NODE_FIELD(options); |
3149 | | |
3150 | 0 | return true; |
3151 | 0 | } |
3152 | | |
3153 | | static bool |
3154 | | _equalAlterTSConfigurationStmt(const AlterTSConfigurationStmt *a, const AlterTSConfigurationStmt *b) |
3155 | 0 | { |
3156 | 0 | COMPARE_SCALAR_FIELD(kind); |
3157 | 0 | COMPARE_NODE_FIELD(cfgname); |
3158 | 0 | COMPARE_NODE_FIELD(tokentype); |
3159 | 0 | COMPARE_NODE_FIELD(dicts); |
3160 | 0 | COMPARE_SCALAR_FIELD(override); |
3161 | 0 | COMPARE_SCALAR_FIELD(replace); |
3162 | 0 | COMPARE_SCALAR_FIELD(missing_ok); |
3163 | | |
3164 | 0 | return true; |
3165 | 0 | } |
3166 | | |
3167 | | static bool |
3168 | | _equalPublicationTable(const PublicationTable *a, const PublicationTable *b) |
3169 | 0 | { |
3170 | 0 | COMPARE_NODE_FIELD(relation); |
3171 | 0 | COMPARE_NODE_FIELD(whereClause); |
3172 | 0 | COMPARE_NODE_FIELD(columns); |
3173 | | |
3174 | 0 | return true; |
3175 | 0 | } |
3176 | | |
3177 | | static bool |
3178 | | _equalPublicationObjSpec(const PublicationObjSpec *a, const PublicationObjSpec *b) |
3179 | 0 | { |
3180 | 0 | COMPARE_SCALAR_FIELD(pubobjtype); |
3181 | 0 | COMPARE_STRING_FIELD(name); |
3182 | 0 | COMPARE_NODE_FIELD(pubtable); |
3183 | 0 | COMPARE_LOCATION_FIELD(location); |
3184 | |
|
3185 | 0 | return true; |
3186 | 0 | } |
3187 | | |
3188 | | static bool |
3189 | | _equalPublicationAllObjSpec(const PublicationAllObjSpec *a, const PublicationAllObjSpec *b) |
3190 | 0 | { |
3191 | 0 | COMPARE_SCALAR_FIELD(pubobjtype); |
3192 | 0 | COMPARE_LOCATION_FIELD(location); |
3193 | |
|
3194 | 0 | return true; |
3195 | 0 | } |
3196 | | |
3197 | | static bool |
3198 | | _equalCreatePublicationStmt(const CreatePublicationStmt *a, const CreatePublicationStmt *b) |
3199 | 0 | { |
3200 | 0 | COMPARE_STRING_FIELD(pubname); |
3201 | 0 | COMPARE_NODE_FIELD(options); |
3202 | 0 | COMPARE_NODE_FIELD(pubobjects); |
3203 | 0 | COMPARE_SCALAR_FIELD(for_all_tables); |
3204 | 0 | COMPARE_SCALAR_FIELD(for_all_sequences); |
3205 | | |
3206 | 0 | return true; |
3207 | 0 | } |
3208 | | |
3209 | | static bool |
3210 | | _equalAlterPublicationStmt(const AlterPublicationStmt *a, const AlterPublicationStmt *b) |
3211 | 0 | { |
3212 | 0 | COMPARE_STRING_FIELD(pubname); |
3213 | 0 | COMPARE_NODE_FIELD(options); |
3214 | 0 | COMPARE_NODE_FIELD(pubobjects); |
3215 | 0 | COMPARE_SCALAR_FIELD(action); |
3216 | | |
3217 | 0 | return true; |
3218 | 0 | } |
3219 | | |
3220 | | static bool |
3221 | | _equalCreateSubscriptionStmt(const CreateSubscriptionStmt *a, const CreateSubscriptionStmt *b) |
3222 | 0 | { |
3223 | 0 | COMPARE_STRING_FIELD(subname); |
3224 | 0 | COMPARE_STRING_FIELD(conninfo); |
3225 | 0 | COMPARE_NODE_FIELD(publication); |
3226 | 0 | COMPARE_NODE_FIELD(options); |
3227 | | |
3228 | 0 | return true; |
3229 | 0 | } |
3230 | | |
3231 | | static bool |
3232 | | _equalAlterSubscriptionStmt(const AlterSubscriptionStmt *a, const AlterSubscriptionStmt *b) |
3233 | 0 | { |
3234 | 0 | COMPARE_SCALAR_FIELD(kind); |
3235 | 0 | COMPARE_STRING_FIELD(subname); |
3236 | 0 | COMPARE_STRING_FIELD(conninfo); |
3237 | 0 | COMPARE_NODE_FIELD(publication); |
3238 | 0 | COMPARE_NODE_FIELD(options); |
3239 | | |
3240 | 0 | return true; |
3241 | 0 | } |
3242 | | |
3243 | | static bool |
3244 | | _equalDropSubscriptionStmt(const DropSubscriptionStmt *a, const DropSubscriptionStmt *b) |
3245 | 0 | { |
3246 | 0 | COMPARE_STRING_FIELD(subname); |
3247 | 0 | COMPARE_SCALAR_FIELD(missing_ok); |
3248 | 0 | COMPARE_SCALAR_FIELD(behavior); |
3249 | | |
3250 | 0 | return true; |
3251 | 0 | } |
3252 | | |
3253 | | static bool |
3254 | | _equalPathKey(const PathKey *a, const PathKey *b) |
3255 | 0 | { |
3256 | 0 | COMPARE_SCALAR_FIELD(pk_eclass); |
3257 | 0 | COMPARE_SCALAR_FIELD(pk_opfamily); |
3258 | 0 | COMPARE_SCALAR_FIELD(pk_cmptype); |
3259 | 0 | COMPARE_SCALAR_FIELD(pk_nulls_first); |
3260 | | |
3261 | 0 | return true; |
3262 | 0 | } |
3263 | | |
3264 | | static bool |
3265 | | _equalGroupByOrdering(const GroupByOrdering *a, const GroupByOrdering *b) |
3266 | 0 | { |
3267 | 0 | COMPARE_NODE_FIELD(pathkeys); |
3268 | 0 | COMPARE_NODE_FIELD(clauses); |
3269 | | |
3270 | 0 | return true; |
3271 | 0 | } |
3272 | | |
3273 | | static bool |
3274 | | _equalRestrictInfo(const RestrictInfo *a, const RestrictInfo *b) |
3275 | 0 | { |
3276 | 0 | COMPARE_NODE_FIELD(clause); |
3277 | 0 | COMPARE_SCALAR_FIELD(is_pushed_down); |
3278 | 0 | COMPARE_SCALAR_FIELD(has_clone); |
3279 | 0 | COMPARE_SCALAR_FIELD(is_clone); |
3280 | 0 | COMPARE_SCALAR_FIELD(security_level); |
3281 | 0 | COMPARE_BITMAPSET_FIELD(required_relids); |
3282 | 0 | COMPARE_BITMAPSET_FIELD(incompatible_relids); |
3283 | 0 | COMPARE_BITMAPSET_FIELD(outer_relids); |
3284 | 0 | COMPARE_SCALAR_FIELD(rinfo_serial); |
3285 | | |
3286 | 0 | return true; |
3287 | 0 | } |
3288 | | |
3289 | | static bool |
3290 | | _equalPlaceHolderVar(const PlaceHolderVar *a, const PlaceHolderVar *b) |
3291 | 0 | { |
3292 | 0 | COMPARE_BITMAPSET_FIELD(phnullingrels); |
3293 | 0 | COMPARE_SCALAR_FIELD(phid); |
3294 | 0 | COMPARE_SCALAR_FIELD(phlevelsup); |
3295 | | |
3296 | 0 | return true; |
3297 | 0 | } |
3298 | | |
3299 | | static bool |
3300 | | _equalSpecialJoinInfo(const SpecialJoinInfo *a, const SpecialJoinInfo *b) |
3301 | 0 | { |
3302 | 0 | COMPARE_BITMAPSET_FIELD(min_lefthand); |
3303 | 0 | COMPARE_BITMAPSET_FIELD(min_righthand); |
3304 | 0 | COMPARE_BITMAPSET_FIELD(syn_lefthand); |
3305 | 0 | COMPARE_BITMAPSET_FIELD(syn_righthand); |
3306 | 0 | COMPARE_SCALAR_FIELD(jointype); |
3307 | 0 | COMPARE_SCALAR_FIELD(ojrelid); |
3308 | 0 | COMPARE_BITMAPSET_FIELD(commute_above_l); |
3309 | 0 | COMPARE_BITMAPSET_FIELD(commute_above_r); |
3310 | 0 | COMPARE_BITMAPSET_FIELD(commute_below_l); |
3311 | 0 | COMPARE_BITMAPSET_FIELD(commute_below_r); |
3312 | 0 | COMPARE_SCALAR_FIELD(lhs_strict); |
3313 | 0 | COMPARE_SCALAR_FIELD(semi_can_btree); |
3314 | 0 | COMPARE_SCALAR_FIELD(semi_can_hash); |
3315 | 0 | COMPARE_NODE_FIELD(semi_operators); |
3316 | 0 | COMPARE_NODE_FIELD(semi_rhs_exprs); |
3317 | | |
3318 | 0 | return true; |
3319 | 0 | } |
3320 | | |
3321 | | static bool |
3322 | | _equalAppendRelInfo(const AppendRelInfo *a, const AppendRelInfo *b) |
3323 | 0 | { |
3324 | 0 | COMPARE_SCALAR_FIELD(parent_relid); |
3325 | 0 | COMPARE_SCALAR_FIELD(child_relid); |
3326 | 0 | COMPARE_SCALAR_FIELD(parent_reltype); |
3327 | 0 | COMPARE_SCALAR_FIELD(child_reltype); |
3328 | 0 | COMPARE_NODE_FIELD(translated_vars); |
3329 | 0 | COMPARE_SCALAR_FIELD(num_child_cols); |
3330 | 0 | COMPARE_POINTER_FIELD(parent_colnos, a->num_child_cols * sizeof(AttrNumber)); |
3331 | 0 | COMPARE_SCALAR_FIELD(parent_reloid); |
3332 | | |
3333 | 0 | return true; |
3334 | 0 | } |
3335 | | |
3336 | | static bool |
3337 | | _equalPlaceHolderInfo(const PlaceHolderInfo *a, const PlaceHolderInfo *b) |
3338 | 0 | { |
3339 | 0 | COMPARE_SCALAR_FIELD(phid); |
3340 | 0 | COMPARE_NODE_FIELD(ph_var); |
3341 | 0 | COMPARE_BITMAPSET_FIELD(ph_eval_at); |
3342 | 0 | COMPARE_BITMAPSET_FIELD(ph_lateral); |
3343 | 0 | COMPARE_BITMAPSET_FIELD(ph_needed); |
3344 | 0 | COMPARE_SCALAR_FIELD(ph_width); |
3345 | | |
3346 | 0 | return true; |
3347 | 0 | } |
3348 | | |
3349 | | static bool |
3350 | | _equalAggClauseInfo(const AggClauseInfo *a, const AggClauseInfo *b) |
3351 | 0 | { |
3352 | 0 | COMPARE_NODE_FIELD(aggref); |
3353 | 0 | COMPARE_BITMAPSET_FIELD(agg_eval_at); |
3354 | | |
3355 | 0 | return true; |
3356 | 0 | } |
3357 | | |
3358 | | static bool |
3359 | | _equalGroupingExprInfo(const GroupingExprInfo *a, const GroupingExprInfo *b) |
3360 | 0 | { |
3361 | 0 | COMPARE_NODE_FIELD(expr); |
3362 | 0 | COMPARE_SCALAR_FIELD(sortgroupref); |
3363 | 0 | COMPARE_SCALAR_FIELD(ec); |
3364 | | |
3365 | 0 | return true; |
3366 | 0 | } |
3367 | | |
3368 | | static bool |
3369 | | _equalInteger(const Integer *a, const Integer *b) |
3370 | 0 | { |
3371 | 0 | COMPARE_SCALAR_FIELD(ival); |
3372 | | |
3373 | 0 | return true; |
3374 | 0 | } |
3375 | | |
3376 | | static bool |
3377 | | _equalFloat(const Float *a, const Float *b) |
3378 | 0 | { |
3379 | 0 | COMPARE_STRING_FIELD(fval); |
3380 | | |
3381 | 0 | return true; |
3382 | 0 | } |
3383 | | |
3384 | | static bool |
3385 | | _equalBoolean(const Boolean *a, const Boolean *b) |
3386 | 0 | { |
3387 | 0 | COMPARE_SCALAR_FIELD(boolval); |
3388 | | |
3389 | 0 | return true; |
3390 | 0 | } |
3391 | | |
3392 | | static bool |
3393 | | _equalString(const String *a, const String *b) |
3394 | 0 | { |
3395 | 0 | COMPARE_STRING_FIELD(sval); |
3396 | | |
3397 | 0 | return true; |
3398 | 0 | } |
3399 | | |
3400 | | static bool |
3401 | | _equalBitString(const BitString *a, const BitString *b) |
3402 | 0 | { |
3403 | 0 | COMPARE_STRING_FIELD(bsval); |
3404 | | |
3405 | 0 | return true; |
3406 | 0 | } |