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