PostgreSQL Source Code  git master
equalfuncs.c
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * equalfuncs.c
4  * Equality functions to compare node trees.
5  *
6  * NOTE: we currently support comparing all node types found in parse
7  * trees. We do not support comparing executor state trees; there
8  * is no need for that, and no point in maintaining all the code that
9  * would be needed. We also do not support comparing Path trees, mainly
10  * because the circular linkages between RelOptInfo and Path nodes can't
11  * be handled easily in a simple depth-first traversal.
12  *
13  * Currently, in fact, equal() doesn't know how to compare Plan trees
14  * either. This might need to be fixed someday.
15  *
16  * NOTE: it is intentional that parse location fields (in nodes that have
17  * one) are not compared. This is because we want, for example, a variable
18  * "x" to be considered equal() to another reference to "x" in the query.
19  *
20  *
21  * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
22  * Portions Copyright (c) 1994, Regents of the University of California
23  *
24  * IDENTIFICATION
25  * src/backend/nodes/equalfuncs.c
26  *
27  *-------------------------------------------------------------------------
28  */
29 
30 #include "postgres.h"
31 
32 #include "miscadmin.h"
33 #include "nodes/extensible.h"
34 #include "nodes/pathnodes.h"
35 #include "utils/datum.h"
36 
37 
38 /*
39  * Macros to simplify comparison of different kinds of fields. Use these
40  * wherever possible to reduce the chance for silly typos. Note that these
41  * hard-wire the convention that the local variables in an Equal routine are
42  * named 'a' and 'b'.
43  */
44 
45 /* Compare a simple scalar field (int, float, bool, enum, etc) */
46 #define COMPARE_SCALAR_FIELD(fldname) \
47  do { \
48  if (a->fldname != b->fldname) \
49  return false; \
50  } while (0)
51 
52 /* Compare a field that is a pointer to some kind of Node or Node tree */
53 #define COMPARE_NODE_FIELD(fldname) \
54  do { \
55  if (!equal(a->fldname, b->fldname)) \
56  return false; \
57  } while (0)
58 
59 /* Compare a field that is a pointer to a Bitmapset */
60 #define COMPARE_BITMAPSET_FIELD(fldname) \
61  do { \
62  if (!bms_equal(a->fldname, b->fldname)) \
63  return false; \
64  } while (0)
65 
66 /* Compare a field that is a pointer to a C string, or perhaps NULL */
67 #define COMPARE_STRING_FIELD(fldname) \
68  do { \
69  if (!equalstr(a->fldname, b->fldname)) \
70  return false; \
71  } while (0)
72 
73 /* Macro for comparing string fields that might be NULL */
74 #define equalstr(a, b) \
75  (((a) != NULL && (b) != NULL) ? (strcmp(a, b) == 0) : (a) == (b))
76 
77 /* Compare a field that is a pointer to a simple palloc'd object of size sz */
78 #define COMPARE_POINTER_FIELD(fldname, sz) \
79  do { \
80  if (memcmp(a->fldname, b->fldname, (sz)) != 0) \
81  return false; \
82  } while (0)
83 
84 /* Compare a parse location field (this is a no-op, per note above) */
85 #define COMPARE_LOCATION_FIELD(fldname) \
86  ((void) 0)
87 
88 /* Compare a CoercionForm field (also a no-op, per comment in primnodes.h) */
89 #define COMPARE_COERCIONFORM_FIELD(fldname) \
90  ((void) 0)
91 
92 
93 /*
94  * Stuff from primnodes.h
95  */
96 
97 static bool
98 _equalAlias(const Alias *a, const Alias *b)
99 {
100  COMPARE_STRING_FIELD(aliasname);
101  COMPARE_NODE_FIELD(colnames);
102 
103  return true;
104 }
105 
106 static bool
107 _equalRangeVar(const RangeVar *a, const RangeVar *b)
108 {
109  COMPARE_STRING_FIELD(catalogname);
110  COMPARE_STRING_FIELD(schemaname);
113  COMPARE_SCALAR_FIELD(relpersistence);
114  COMPARE_NODE_FIELD(alias);
115  COMPARE_LOCATION_FIELD(location);
116 
117  return true;
118 }
119 
120 static bool
122 {
123  COMPARE_NODE_FIELD(ns_uris);
124  COMPARE_NODE_FIELD(ns_names);
125  COMPARE_NODE_FIELD(docexpr);
126  COMPARE_NODE_FIELD(rowexpr);
127  COMPARE_NODE_FIELD(colnames);
128  COMPARE_NODE_FIELD(coltypes);
129  COMPARE_NODE_FIELD(coltypmods);
130  COMPARE_NODE_FIELD(colcollations);
131  COMPARE_NODE_FIELD(colexprs);
132  COMPARE_NODE_FIELD(coldefexprs);
133  COMPARE_BITMAPSET_FIELD(notnulls);
134  COMPARE_SCALAR_FIELD(ordinalitycol);
135  COMPARE_LOCATION_FIELD(location);
136 
137  return true;
138 }
139 
140 static bool
142 {
143  COMPARE_NODE_FIELD(rel);
144  COMPARE_NODE_FIELD(colNames);
145  COMPARE_STRING_FIELD(accessMethod);
147  COMPARE_SCALAR_FIELD(onCommit);
148  COMPARE_STRING_FIELD(tableSpaceName);
149  COMPARE_NODE_FIELD(viewQuery);
150  COMPARE_SCALAR_FIELD(skipData);
151 
152  return true;
153 }
154 
155 /*
156  * We don't need an _equalExpr because Expr is an abstract supertype which
157  * should never actually get instantiated. Also, since it has no common
158  * fields except NodeTag, there's no need for a helper routine to factor
159  * out comparing the common fields...
160  */
161 
162 static bool
163 _equalVar(const Var *a, const Var *b)
164 {
165  COMPARE_SCALAR_FIELD(varno);
166  COMPARE_SCALAR_FIELD(varattno);
167  COMPARE_SCALAR_FIELD(vartype);
168  COMPARE_SCALAR_FIELD(vartypmod);
169  COMPARE_SCALAR_FIELD(varcollid);
170  COMPARE_SCALAR_FIELD(varlevelsup);
171 
172  /*
173  * varnosyn/varattnosyn are intentionally ignored here, because Vars with
174  * different syntactic identifiers are semantically the same as long as
175  * their varno/varattno match.
176  */
177  COMPARE_LOCATION_FIELD(location);
178 
179  return true;
180 }
181 
182 static bool
183 _equalConst(const Const *a, const Const *b)
184 {
185  COMPARE_SCALAR_FIELD(consttype);
186  COMPARE_SCALAR_FIELD(consttypmod);
187  COMPARE_SCALAR_FIELD(constcollid);
188  COMPARE_SCALAR_FIELD(constlen);
189  COMPARE_SCALAR_FIELD(constisnull);
190  COMPARE_SCALAR_FIELD(constbyval);
191  COMPARE_LOCATION_FIELD(location);
192 
193  /*
194  * We treat all NULL constants of the same type as equal. Someday this
195  * might need to change? But datumIsEqual doesn't work on nulls, so...
196  */
197  if (a->constisnull)
198  return true;
199  return datumIsEqual(a->constvalue, b->constvalue,
200  a->constbyval, a->constlen);
201 }
202 
203 static bool
204 _equalParam(const Param *a, const Param *b)
205 {
206  COMPARE_SCALAR_FIELD(paramkind);
207  COMPARE_SCALAR_FIELD(paramid);
208  COMPARE_SCALAR_FIELD(paramtype);
209  COMPARE_SCALAR_FIELD(paramtypmod);
210  COMPARE_SCALAR_FIELD(paramcollid);
211  COMPARE_LOCATION_FIELD(location);
212 
213  return true;
214 }
215 
216 static bool
217 _equalAggref(const Aggref *a, const Aggref *b)
218 {
219  COMPARE_SCALAR_FIELD(aggfnoid);
220  COMPARE_SCALAR_FIELD(aggtype);
221  COMPARE_SCALAR_FIELD(aggcollid);
222  COMPARE_SCALAR_FIELD(inputcollid);
223  /* ignore aggtranstype since it might not be set yet */
224  COMPARE_NODE_FIELD(aggargtypes);
225  COMPARE_NODE_FIELD(aggdirectargs);
227  COMPARE_NODE_FIELD(aggorder);
228  COMPARE_NODE_FIELD(aggdistinct);
229  COMPARE_NODE_FIELD(aggfilter);
230  COMPARE_SCALAR_FIELD(aggstar);
231  COMPARE_SCALAR_FIELD(aggvariadic);
232  COMPARE_SCALAR_FIELD(aggkind);
233  COMPARE_SCALAR_FIELD(agglevelsup);
234  COMPARE_SCALAR_FIELD(aggsplit);
235  COMPARE_SCALAR_FIELD(aggno);
236  COMPARE_SCALAR_FIELD(aggtransno);
237  COMPARE_LOCATION_FIELD(location);
238 
239  return true;
240 }
241 
242 static bool
244 {
246 
247  /*
248  * We must not compare the refs or cols field
249  */
250 
251  COMPARE_SCALAR_FIELD(agglevelsup);
252  COMPARE_LOCATION_FIELD(location);
253 
254  return true;
255 }
256 
257 static bool
259 {
260  COMPARE_SCALAR_FIELD(winfnoid);
261  COMPARE_SCALAR_FIELD(wintype);
262  COMPARE_SCALAR_FIELD(wincollid);
263  COMPARE_SCALAR_FIELD(inputcollid);
265  COMPARE_NODE_FIELD(aggfilter);
266  COMPARE_SCALAR_FIELD(winref);
267  COMPARE_SCALAR_FIELD(winstar);
268  COMPARE_SCALAR_FIELD(winagg);
269  COMPARE_LOCATION_FIELD(location);
270 
271  return true;
272 }
273 
274 static bool
276 {
277  COMPARE_SCALAR_FIELD(refcontainertype);
278  COMPARE_SCALAR_FIELD(refelemtype);
279  COMPARE_SCALAR_FIELD(refrestype);
280  COMPARE_SCALAR_FIELD(reftypmod);
281  COMPARE_SCALAR_FIELD(refcollid);
282  COMPARE_NODE_FIELD(refupperindexpr);
283  COMPARE_NODE_FIELD(reflowerindexpr);
284  COMPARE_NODE_FIELD(refexpr);
285  COMPARE_NODE_FIELD(refassgnexpr);
286 
287  return true;
288 }
289 
290 static bool
291 _equalFuncExpr(const FuncExpr *a, const FuncExpr *b)
292 {
293  COMPARE_SCALAR_FIELD(funcid);
294  COMPARE_SCALAR_FIELD(funcresulttype);
295  COMPARE_SCALAR_FIELD(funcretset);
296  COMPARE_SCALAR_FIELD(funcvariadic);
297  COMPARE_COERCIONFORM_FIELD(funcformat);
298  COMPARE_SCALAR_FIELD(funccollid);
299  COMPARE_SCALAR_FIELD(inputcollid);
301  COMPARE_LOCATION_FIELD(location);
302 
303  return true;
304 }
305 
306 static bool
308 {
311  COMPARE_SCALAR_FIELD(argnumber);
312  COMPARE_LOCATION_FIELD(location);
313 
314  return true;
315 }
316 
317 static bool
318 _equalOpExpr(const OpExpr *a, const OpExpr *b)
319 {
320  COMPARE_SCALAR_FIELD(opno);
321 
322  /*
323  * Special-case opfuncid: it is allowable for it to differ if one node
324  * contains zero and the other doesn't. This just means that the one node
325  * isn't as far along in the parse/plan pipeline and hasn't had the
326  * opfuncid cache filled yet.
327  */
328  if (a->opfuncid != b->opfuncid &&
329  a->opfuncid != 0 &&
330  b->opfuncid != 0)
331  return false;
332 
333  COMPARE_SCALAR_FIELD(opresulttype);
334  COMPARE_SCALAR_FIELD(opretset);
335  COMPARE_SCALAR_FIELD(opcollid);
336  COMPARE_SCALAR_FIELD(inputcollid);
338  COMPARE_LOCATION_FIELD(location);
339 
340  return true;
341 }
342 
343 static bool
345 {
346  COMPARE_SCALAR_FIELD(opno);
347 
348  /*
349  * Special-case opfuncid: it is allowable for it to differ if one node
350  * contains zero and the other doesn't. This just means that the one node
351  * isn't as far along in the parse/plan pipeline and hasn't had the
352  * opfuncid cache filled yet.
353  */
354  if (a->opfuncid != b->opfuncid &&
355  a->opfuncid != 0 &&
356  b->opfuncid != 0)
357  return false;
358 
359  COMPARE_SCALAR_FIELD(opresulttype);
360  COMPARE_SCALAR_FIELD(opretset);
361  COMPARE_SCALAR_FIELD(opcollid);
362  COMPARE_SCALAR_FIELD(inputcollid);
364  COMPARE_LOCATION_FIELD(location);
365 
366  return true;
367 }
368 
369 static bool
371 {
372  COMPARE_SCALAR_FIELD(opno);
373 
374  /*
375  * Special-case opfuncid: it is allowable for it to differ if one node
376  * contains zero and the other doesn't. This just means that the one node
377  * isn't as far along in the parse/plan pipeline and hasn't had the
378  * opfuncid cache filled yet.
379  */
380  if (a->opfuncid != b->opfuncid &&
381  a->opfuncid != 0 &&
382  b->opfuncid != 0)
383  return false;
384 
385  COMPARE_SCALAR_FIELD(opresulttype);
386  COMPARE_SCALAR_FIELD(opretset);
387  COMPARE_SCALAR_FIELD(opcollid);
388  COMPARE_SCALAR_FIELD(inputcollid);
390  COMPARE_LOCATION_FIELD(location);
391 
392  return true;
393 }
394 
395 static bool
397 {
398  COMPARE_SCALAR_FIELD(opno);
399 
400  /*
401  * Special-case opfuncid: it is allowable for it to differ if one node
402  * contains zero and the other doesn't. This just means that the one node
403  * isn't as far along in the parse/plan pipeline and hasn't had the
404  * opfuncid cache filled yet.
405  */
406  if (a->opfuncid != b->opfuncid &&
407  a->opfuncid != 0 &&
408  b->opfuncid != 0)
409  return false;
410 
411  COMPARE_SCALAR_FIELD(useOr);
412  COMPARE_SCALAR_FIELD(inputcollid);
414  COMPARE_LOCATION_FIELD(location);
415 
416  return true;
417 }
418 
419 static bool
420 _equalBoolExpr(const BoolExpr *a, const BoolExpr *b)
421 {
424  COMPARE_LOCATION_FIELD(location);
425 
426  return true;
427 }
428 
429 static bool
430 _equalSubLink(const SubLink *a, const SubLink *b)
431 {
432  COMPARE_SCALAR_FIELD(subLinkType);
433  COMPARE_SCALAR_FIELD(subLinkId);
434  COMPARE_NODE_FIELD(testexpr);
435  COMPARE_NODE_FIELD(operName);
436  COMPARE_NODE_FIELD(subselect);
437  COMPARE_LOCATION_FIELD(location);
438 
439  return true;
440 }
441 
442 static bool
443 _equalSubPlan(const SubPlan *a, const SubPlan *b)
444 {
445  COMPARE_SCALAR_FIELD(subLinkType);
446  COMPARE_NODE_FIELD(testexpr);
447  COMPARE_NODE_FIELD(paramIds);
448  COMPARE_SCALAR_FIELD(plan_id);
449  COMPARE_STRING_FIELD(plan_name);
450  COMPARE_SCALAR_FIELD(firstColType);
451  COMPARE_SCALAR_FIELD(firstColTypmod);
452  COMPARE_SCALAR_FIELD(firstColCollation);
453  COMPARE_SCALAR_FIELD(useHashTable);
454  COMPARE_SCALAR_FIELD(unknownEqFalse);
455  COMPARE_SCALAR_FIELD(parallel_safe);
456  COMPARE_NODE_FIELD(setParam);
457  COMPARE_NODE_FIELD(parParam);
459  COMPARE_SCALAR_FIELD(startup_cost);
460  COMPARE_SCALAR_FIELD(per_call_cost);
461 
462  return true;
463 }
464 
465 static bool
467 {
468  COMPARE_NODE_FIELD(subplans);
469 
470  return true;
471 }
472 
473 static bool
475 {
477  COMPARE_SCALAR_FIELD(fieldnum);
478  COMPARE_SCALAR_FIELD(resulttype);
479  COMPARE_SCALAR_FIELD(resulttypmod);
480  COMPARE_SCALAR_FIELD(resultcollid);
481 
482  return true;
483 }
484 
485 static bool
487 {
489  COMPARE_NODE_FIELD(newvals);
490  COMPARE_NODE_FIELD(fieldnums);
491  COMPARE_SCALAR_FIELD(resulttype);
492 
493  return true;
494 }
495 
496 static bool
498 {
500  COMPARE_SCALAR_FIELD(resulttype);
501  COMPARE_SCALAR_FIELD(resulttypmod);
502  COMPARE_SCALAR_FIELD(resultcollid);
503  COMPARE_COERCIONFORM_FIELD(relabelformat);
504  COMPARE_LOCATION_FIELD(location);
505 
506  return true;
507 }
508 
509 static bool
511 {
513  COMPARE_SCALAR_FIELD(resulttype);
514  COMPARE_SCALAR_FIELD(resultcollid);
515  COMPARE_COERCIONFORM_FIELD(coerceformat);
516  COMPARE_LOCATION_FIELD(location);
517 
518  return true;
519 }
520 
521 static bool
523 {
525  COMPARE_NODE_FIELD(elemexpr);
526  COMPARE_SCALAR_FIELD(resulttype);
527  COMPARE_SCALAR_FIELD(resulttypmod);
528  COMPARE_SCALAR_FIELD(resultcollid);
529  COMPARE_COERCIONFORM_FIELD(coerceformat);
530  COMPARE_LOCATION_FIELD(location);
531 
532  return true;
533 }
534 
535 static bool
537 {
539  COMPARE_SCALAR_FIELD(resulttype);
540  COMPARE_COERCIONFORM_FIELD(convertformat);
541  COMPARE_LOCATION_FIELD(location);
542 
543  return true;
544 }
545 
546 static bool
548 {
550  COMPARE_SCALAR_FIELD(collOid);
551  COMPARE_LOCATION_FIELD(location);
552 
553  return true;
554 }
555 
556 static bool
557 _equalCaseExpr(const CaseExpr *a, const CaseExpr *b)
558 {
559  COMPARE_SCALAR_FIELD(casetype);
560  COMPARE_SCALAR_FIELD(casecollid);
563  COMPARE_NODE_FIELD(defresult);
564  COMPARE_LOCATION_FIELD(location);
565 
566  return true;
567 }
568 
569 static bool
570 _equalCaseWhen(const CaseWhen *a, const CaseWhen *b)
571 {
572  COMPARE_NODE_FIELD(expr);
573  COMPARE_NODE_FIELD(result);
574  COMPARE_LOCATION_FIELD(location);
575 
576  return true;
577 }
578 
579 static bool
581 {
582  COMPARE_SCALAR_FIELD(typeId);
583  COMPARE_SCALAR_FIELD(typeMod);
584  COMPARE_SCALAR_FIELD(collation);
585 
586  return true;
587 }
588 
589 static bool
591 {
592  COMPARE_SCALAR_FIELD(array_typeid);
593  COMPARE_SCALAR_FIELD(array_collid);
594  COMPARE_SCALAR_FIELD(element_typeid);
595  COMPARE_NODE_FIELD(elements);
596  COMPARE_SCALAR_FIELD(multidims);
597  COMPARE_LOCATION_FIELD(location);
598 
599  return true;
600 }
601 
602 static bool
603 _equalRowExpr(const RowExpr *a, const RowExpr *b)
604 {
606  COMPARE_SCALAR_FIELD(row_typeid);
607  COMPARE_COERCIONFORM_FIELD(row_format);
608  COMPARE_NODE_FIELD(colnames);
609  COMPARE_LOCATION_FIELD(location);
610 
611  return true;
612 }
613 
614 static bool
616 {
617  COMPARE_SCALAR_FIELD(rctype);
618  COMPARE_NODE_FIELD(opnos);
619  COMPARE_NODE_FIELD(opfamilies);
620  COMPARE_NODE_FIELD(inputcollids);
621  COMPARE_NODE_FIELD(largs);
622  COMPARE_NODE_FIELD(rargs);
623 
624  return true;
625 }
626 
627 static bool
629 {
630  COMPARE_SCALAR_FIELD(coalescetype);
631  COMPARE_SCALAR_FIELD(coalescecollid);
633  COMPARE_LOCATION_FIELD(location);
634 
635  return true;
636 }
637 
638 static bool
640 {
641  COMPARE_SCALAR_FIELD(minmaxtype);
642  COMPARE_SCALAR_FIELD(minmaxcollid);
643  COMPARE_SCALAR_FIELD(inputcollid);
646  COMPARE_LOCATION_FIELD(location);
647 
648  return true;
649 }
650 
651 static bool
653 {
656  COMPARE_SCALAR_FIELD(typmod);
657  COMPARE_LOCATION_FIELD(location);
658 
659  return true;
660 }
661 
662 static bool
663 _equalXmlExpr(const XmlExpr *a, const XmlExpr *b)
664 {
667  COMPARE_NODE_FIELD(named_args);
668  COMPARE_NODE_FIELD(arg_names);
672  COMPARE_SCALAR_FIELD(typmod);
673  COMPARE_LOCATION_FIELD(location);
674 
675  return true;
676 }
677 
678 static bool
679 _equalNullTest(const NullTest *a, const NullTest *b)
680 {
682  COMPARE_SCALAR_FIELD(nulltesttype);
683  COMPARE_SCALAR_FIELD(argisrow);
684  COMPARE_LOCATION_FIELD(location);
685 
686  return true;
687 }
688 
689 static bool
691 {
693  COMPARE_SCALAR_FIELD(booltesttype);
694  COMPARE_LOCATION_FIELD(location);
695 
696  return true;
697 }
698 
699 static bool
701 {
703  COMPARE_SCALAR_FIELD(resulttype);
704  COMPARE_SCALAR_FIELD(resulttypmod);
705  COMPARE_SCALAR_FIELD(resultcollid);
706  COMPARE_COERCIONFORM_FIELD(coercionformat);
707  COMPARE_LOCATION_FIELD(location);
708 
709  return true;
710 }
711 
712 static bool
714 {
715  COMPARE_SCALAR_FIELD(typeId);
716  COMPARE_SCALAR_FIELD(typeMod);
717  COMPARE_SCALAR_FIELD(collation);
718  COMPARE_LOCATION_FIELD(location);
719 
720  return true;
721 }
722 
723 static bool
725 {
726  COMPARE_SCALAR_FIELD(typeId);
727  COMPARE_SCALAR_FIELD(typeMod);
728  COMPARE_SCALAR_FIELD(collation);
729  COMPARE_LOCATION_FIELD(location);
730 
731  return true;
732 }
733 
734 static bool
736 {
737  COMPARE_SCALAR_FIELD(cvarno);
738  COMPARE_STRING_FIELD(cursor_name);
739  COMPARE_SCALAR_FIELD(cursor_param);
740 
741  return true;
742 }
743 
744 static bool
746 {
747  COMPARE_SCALAR_FIELD(seqid);
748  COMPARE_SCALAR_FIELD(typeId);
749 
750  return true;
751 }
752 
753 static bool
755 {
756  COMPARE_NODE_FIELD(expr);
757  COMPARE_SCALAR_FIELD(infercollid);
758  COMPARE_SCALAR_FIELD(inferopclass);
759 
760  return true;
761 }
762 
763 static bool
765 {
766  COMPARE_NODE_FIELD(expr);
767  COMPARE_SCALAR_FIELD(resno);
768  COMPARE_STRING_FIELD(resname);
769  COMPARE_SCALAR_FIELD(ressortgroupref);
770  COMPARE_SCALAR_FIELD(resorigtbl);
771  COMPARE_SCALAR_FIELD(resorigcol);
772  COMPARE_SCALAR_FIELD(resjunk);
773 
774  return true;
775 }
776 
777 static bool
779 {
780  COMPARE_SCALAR_FIELD(rtindex);
781 
782  return true;
783 }
784 
785 static bool
786 _equalJoinExpr(const JoinExpr *a, const JoinExpr *b)
787 {
788  COMPARE_SCALAR_FIELD(jointype);
789  COMPARE_SCALAR_FIELD(isNatural);
790  COMPARE_NODE_FIELD(larg);
791  COMPARE_NODE_FIELD(rarg);
792  COMPARE_NODE_FIELD(usingClause);
793  COMPARE_NODE_FIELD(quals);
794  COMPARE_NODE_FIELD(alias);
795  COMPARE_SCALAR_FIELD(rtindex);
796 
797  return true;
798 }
799 
800 static bool
801 _equalFromExpr(const FromExpr *a, const FromExpr *b)
802 {
803  COMPARE_NODE_FIELD(fromlist);
804  COMPARE_NODE_FIELD(quals);
805 
806  return true;
807 }
808 
809 static bool
811 {
813  COMPARE_NODE_FIELD(arbiterElems);
814  COMPARE_NODE_FIELD(arbiterWhere);
815  COMPARE_SCALAR_FIELD(constraint);
816  COMPARE_NODE_FIELD(onConflictSet);
817  COMPARE_NODE_FIELD(onConflictWhere);
818  COMPARE_SCALAR_FIELD(exclRelIndex);
819  COMPARE_NODE_FIELD(exclRelTlist);
820 
821  return true;
822 }
823 
824 /*
825  * Stuff from pathnodes.h
826  */
827 
828 static bool
829 _equalPathKey(const PathKey *a, const PathKey *b)
830 {
831  /* We assume pointer equality is sufficient to compare the eclasses */
832  COMPARE_SCALAR_FIELD(pk_eclass);
833  COMPARE_SCALAR_FIELD(pk_opfamily);
834  COMPARE_SCALAR_FIELD(pk_strategy);
835  COMPARE_SCALAR_FIELD(pk_nulls_first);
836 
837  return true;
838 }
839 
840 static bool
842 {
843  COMPARE_NODE_FIELD(clause);
844  COMPARE_SCALAR_FIELD(is_pushed_down);
845  COMPARE_SCALAR_FIELD(outerjoin_delayed);
846  COMPARE_SCALAR_FIELD(security_level);
847  COMPARE_BITMAPSET_FIELD(required_relids);
848  COMPARE_BITMAPSET_FIELD(outer_relids);
849  COMPARE_BITMAPSET_FIELD(nullable_relids);
850 
851  /*
852  * We ignore all the remaining fields, since they may not be set yet, and
853  * should be derivable from the clause anyway.
854  */
855 
856  return true;
857 }
858 
859 static bool
861 {
862  /*
863  * We intentionally do not compare phexpr. Two PlaceHolderVars with the
864  * same ID and levelsup should be considered equal even if the contained
865  * expressions have managed to mutate to different states. This will
866  * happen during final plan construction when there are nested PHVs, since
867  * the inner PHV will get replaced by a Param in some copies of the outer
868  * PHV. Another way in which it can happen is that initplan sublinks
869  * could get replaced by differently-numbered Params when sublink folding
870  * is done. (The end result of such a situation would be some
871  * unreferenced initplans, which is annoying but not really a problem.) On
872  * the same reasoning, there is no need to examine phrels.
873  *
874  * COMPARE_NODE_FIELD(phexpr);
875  *
876  * COMPARE_BITMAPSET_FIELD(phrels);
877  */
878  COMPARE_SCALAR_FIELD(phid);
879  COMPARE_SCALAR_FIELD(phlevelsup);
880 
881  return true;
882 }
883 
884 static bool
886 {
887  COMPARE_BITMAPSET_FIELD(min_lefthand);
888  COMPARE_BITMAPSET_FIELD(min_righthand);
889  COMPARE_BITMAPSET_FIELD(syn_lefthand);
890  COMPARE_BITMAPSET_FIELD(syn_righthand);
891  COMPARE_SCALAR_FIELD(jointype);
892  COMPARE_SCALAR_FIELD(lhs_strict);
893  COMPARE_SCALAR_FIELD(delay_upper_joins);
894  COMPARE_SCALAR_FIELD(semi_can_btree);
895  COMPARE_SCALAR_FIELD(semi_can_hash);
896  COMPARE_NODE_FIELD(semi_operators);
897  COMPARE_NODE_FIELD(semi_rhs_exprs);
898 
899  return true;
900 }
901 
902 static bool
904 {
905  COMPARE_SCALAR_FIELD(parent_relid);
906  COMPARE_SCALAR_FIELD(child_relid);
907  COMPARE_SCALAR_FIELD(parent_reltype);
908  COMPARE_SCALAR_FIELD(child_reltype);
909  COMPARE_NODE_FIELD(translated_vars);
910  COMPARE_SCALAR_FIELD(num_child_cols);
911  COMPARE_POINTER_FIELD(parent_colnos, a->num_child_cols * sizeof(AttrNumber));
912  COMPARE_SCALAR_FIELD(parent_reloid);
913 
914  return true;
915 }
916 
917 static bool
919 {
920  COMPARE_SCALAR_FIELD(phid);
921  COMPARE_NODE_FIELD(ph_var); /* should be redundant */
922  COMPARE_BITMAPSET_FIELD(ph_eval_at);
923  COMPARE_BITMAPSET_FIELD(ph_lateral);
924  COMPARE_BITMAPSET_FIELD(ph_needed);
925  COMPARE_SCALAR_FIELD(ph_width);
926 
927  return true;
928 }
929 
930 /*
931  * Stuff from extensible.h
932  */
933 static bool
935 {
936  const ExtensibleNodeMethods *methods;
937 
938  COMPARE_STRING_FIELD(extnodename);
939 
940  /* At this point, we know extnodename is the same for both nodes. */
941  methods = GetExtensibleNodeMethods(a->extnodename, false);
942 
943  /* compare the private fields */
944  if (!methods->nodeEqual(a, b))
945  return false;
946 
947  return true;
948 }
949 
950 /*
951  * Stuff from parsenodes.h
952  */
953 
954 static bool
955 _equalQuery(const Query *a, const Query *b)
956 {
957  COMPARE_SCALAR_FIELD(commandType);
958  COMPARE_SCALAR_FIELD(querySource);
959  /* we intentionally ignore queryId, since it might not be set */
960  COMPARE_SCALAR_FIELD(canSetTag);
961  COMPARE_NODE_FIELD(utilityStmt);
962  COMPARE_SCALAR_FIELD(resultRelation);
963  COMPARE_SCALAR_FIELD(hasAggs);
964  COMPARE_SCALAR_FIELD(hasWindowFuncs);
965  COMPARE_SCALAR_FIELD(hasTargetSRFs);
966  COMPARE_SCALAR_FIELD(hasSubLinks);
967  COMPARE_SCALAR_FIELD(hasDistinctOn);
968  COMPARE_SCALAR_FIELD(hasRecursive);
969  COMPARE_SCALAR_FIELD(hasModifyingCTE);
970  COMPARE_SCALAR_FIELD(hasForUpdate);
971  COMPARE_SCALAR_FIELD(hasRowSecurity);
972  COMPARE_NODE_FIELD(cteList);
973  COMPARE_NODE_FIELD(rtable);
974  COMPARE_NODE_FIELD(jointree);
975  COMPARE_NODE_FIELD(targetList);
976  COMPARE_SCALAR_FIELD(override);
977  COMPARE_NODE_FIELD(onConflict);
978  COMPARE_NODE_FIELD(returningList);
979  COMPARE_NODE_FIELD(groupClause);
980  COMPARE_NODE_FIELD(groupingSets);
981  COMPARE_NODE_FIELD(havingQual);
982  COMPARE_NODE_FIELD(windowClause);
983  COMPARE_NODE_FIELD(distinctClause);
984  COMPARE_NODE_FIELD(sortClause);
985  COMPARE_NODE_FIELD(limitOffset);
986  COMPARE_NODE_FIELD(limitCount);
987  COMPARE_SCALAR_FIELD(limitOption);
988  COMPARE_NODE_FIELD(rowMarks);
989  COMPARE_NODE_FIELD(setOperations);
990  COMPARE_NODE_FIELD(constraintDeps);
991  COMPARE_NODE_FIELD(withCheckOptions);
992  COMPARE_LOCATION_FIELD(stmt_location);
993  COMPARE_SCALAR_FIELD(stmt_len);
994 
995  return true;
996 }
997 
998 static bool
999 _equalRawStmt(const RawStmt *a, const RawStmt *b)
1000 {
1001  COMPARE_NODE_FIELD(stmt);
1002  COMPARE_LOCATION_FIELD(stmt_location);
1003  COMPARE_SCALAR_FIELD(stmt_len);
1004 
1005  return true;
1006 }
1007 
1008 static bool
1010 {
1011  COMPARE_NODE_FIELD(relation);
1012  COMPARE_NODE_FIELD(cols);
1013  COMPARE_NODE_FIELD(selectStmt);
1014  COMPARE_NODE_FIELD(onConflictClause);
1015  COMPARE_NODE_FIELD(returningList);
1016  COMPARE_NODE_FIELD(withClause);
1017  COMPARE_SCALAR_FIELD(override);
1018 
1019  return true;
1020 }
1021 
1022 static bool
1024 {
1025  COMPARE_NODE_FIELD(relation);
1026  COMPARE_NODE_FIELD(usingClause);
1027  COMPARE_NODE_FIELD(whereClause);
1028  COMPARE_NODE_FIELD(returningList);
1029  COMPARE_NODE_FIELD(withClause);
1030 
1031  return true;
1032 }
1033 
1034 static bool
1036 {
1037  COMPARE_NODE_FIELD(relation);
1038  COMPARE_NODE_FIELD(targetList);
1039  COMPARE_NODE_FIELD(whereClause);
1040  COMPARE_NODE_FIELD(fromClause);
1041  COMPARE_NODE_FIELD(returningList);
1042  COMPARE_NODE_FIELD(withClause);
1043 
1044  return true;
1045 }
1046 
1047 static bool
1049 {
1050  COMPARE_NODE_FIELD(distinctClause);
1051  COMPARE_NODE_FIELD(intoClause);
1052  COMPARE_NODE_FIELD(targetList);
1053  COMPARE_NODE_FIELD(fromClause);
1054  COMPARE_NODE_FIELD(whereClause);
1055  COMPARE_NODE_FIELD(groupClause);
1056  COMPARE_NODE_FIELD(havingClause);
1057  COMPARE_NODE_FIELD(windowClause);
1058  COMPARE_NODE_FIELD(valuesLists);
1059  COMPARE_NODE_FIELD(sortClause);
1060  COMPARE_NODE_FIELD(limitOffset);
1061  COMPARE_NODE_FIELD(limitCount);
1062  COMPARE_SCALAR_FIELD(limitOption);
1063  COMPARE_NODE_FIELD(lockingClause);
1064  COMPARE_NODE_FIELD(withClause);
1066  COMPARE_SCALAR_FIELD(all);
1067  COMPARE_NODE_FIELD(larg);
1068  COMPARE_NODE_FIELD(rarg);
1069 
1070  return true;
1071 }
1072 
1073 static bool
1075 {
1077  COMPARE_SCALAR_FIELD(all);
1078  COMPARE_NODE_FIELD(larg);
1079  COMPARE_NODE_FIELD(rarg);
1080  COMPARE_NODE_FIELD(colTypes);
1081  COMPARE_NODE_FIELD(colTypmods);
1082  COMPARE_NODE_FIELD(colCollations);
1083  COMPARE_NODE_FIELD(groupClauses);
1084 
1085  return true;
1086 }
1087 
1088 static bool
1090 {
1092  COMPARE_NODE_FIELD(indirection);
1093  COMPARE_SCALAR_FIELD(nnames);
1095  COMPARE_LOCATION_FIELD(location);
1096 
1097  return true;
1098 }
1099 
1100 static bool
1102 {
1103  COMPARE_NODE_FIELD(relation);
1104  COMPARE_NODE_FIELD(cmds);
1105  COMPARE_SCALAR_FIELD(objtype);
1106  COMPARE_SCALAR_FIELD(missing_ok);
1107 
1108  return true;
1109 }
1110 
1111 static bool
1113 {
1114  COMPARE_SCALAR_FIELD(subtype);
1116  COMPARE_SCALAR_FIELD(num);
1117  COMPARE_NODE_FIELD(newowner);
1118  COMPARE_NODE_FIELD(def);
1119  COMPARE_SCALAR_FIELD(behavior);
1120  COMPARE_SCALAR_FIELD(missing_ok);
1121 
1122  return true;
1123 }
1124 
1125 static bool
1127 {
1128  COMPARE_SCALAR_FIELD(subtype);
1129  COMPARE_NODE_FIELD(typeName);
1131  COMPARE_NODE_FIELD(def);
1132  COMPARE_SCALAR_FIELD(behavior);
1133  COMPARE_SCALAR_FIELD(missing_ok);
1134 
1135  return true;
1136 }
1137 
1138 static bool
1140 {
1141  COMPARE_SCALAR_FIELD(is_grant);
1142  COMPARE_SCALAR_FIELD(targtype);
1143  COMPARE_SCALAR_FIELD(objtype);
1144  COMPARE_NODE_FIELD(objects);
1145  COMPARE_NODE_FIELD(privileges);
1146  COMPARE_NODE_FIELD(grantees);
1147  COMPARE_SCALAR_FIELD(grant_option);
1148  COMPARE_NODE_FIELD(grantor);
1149  COMPARE_SCALAR_FIELD(behavior);
1150 
1151  return true;
1152 }
1153 
1154 static bool
1156 {
1157  COMPARE_NODE_FIELD(objname);
1158  COMPARE_NODE_FIELD(objargs);
1159  COMPARE_SCALAR_FIELD(args_unspecified);
1160 
1161  return true;
1162 }
1163 
1164 static bool
1166 {
1167  COMPARE_STRING_FIELD(priv_name);
1168  COMPARE_NODE_FIELD(cols);
1169 
1170  return true;
1171 }
1172 
1173 static bool
1175 {
1176  COMPARE_NODE_FIELD(granted_roles);
1177  COMPARE_NODE_FIELD(grantee_roles);
1178  COMPARE_SCALAR_FIELD(is_grant);
1179  COMPARE_SCALAR_FIELD(admin_opt);
1180  COMPARE_NODE_FIELD(grantor);
1181  COMPARE_SCALAR_FIELD(behavior);
1182 
1183  return true;
1184 }
1185 
1186 static bool
1188 {
1191 
1192  return true;
1193 }
1194 
1195 static bool
1197 {
1198  COMPARE_STRING_FIELD(portalname);
1200  COMPARE_NODE_FIELD(query);
1201 
1202  return true;
1203 }
1204 
1205 static bool
1207 {
1208  COMPARE_STRING_FIELD(portalname);
1209 
1210  return true;
1211 }
1212 
1213 static bool
1214 _equalCallStmt(const CallStmt *a, const CallStmt *b)
1215 {
1216  COMPARE_NODE_FIELD(funccall);
1217  COMPARE_NODE_FIELD(funcexpr);
1218 
1219  return true;
1220 }
1221 
1222 static bool
1224 {
1225  COMPARE_NODE_FIELD(relation);
1226  COMPARE_STRING_FIELD(indexname);
1227  COMPARE_NODE_FIELD(params);
1228 
1229  return true;
1230 }
1231 
1232 static bool
1233 _equalCopyStmt(const CopyStmt *a, const CopyStmt *b)
1234 {
1235  COMPARE_NODE_FIELD(relation);
1236  COMPARE_NODE_FIELD(query);
1237  COMPARE_NODE_FIELD(attlist);
1238  COMPARE_SCALAR_FIELD(is_from);
1239  COMPARE_SCALAR_FIELD(is_program);
1242  COMPARE_NODE_FIELD(whereClause);
1243 
1244  return true;
1245 }
1246 
1247 static bool
1249 {
1250  COMPARE_NODE_FIELD(relation);
1251  COMPARE_NODE_FIELD(tableElts);
1252  COMPARE_NODE_FIELD(inhRelations);
1253  COMPARE_NODE_FIELD(partbound);
1254  COMPARE_NODE_FIELD(partspec);
1255  COMPARE_NODE_FIELD(ofTypename);
1256  COMPARE_NODE_FIELD(constraints);
1258  COMPARE_SCALAR_FIELD(oncommit);
1259  COMPARE_STRING_FIELD(tablespacename);
1260  COMPARE_STRING_FIELD(accessMethod);
1261  COMPARE_SCALAR_FIELD(if_not_exists);
1262 
1263  return true;
1264 }
1265 
1266 static bool
1268 {
1269  COMPARE_NODE_FIELD(relation);
1271  COMPARE_SCALAR_FIELD(relationOid);
1272 
1273  return true;
1274 }
1275 
1276 static bool
1278 {
1279  COMPARE_SCALAR_FIELD(kind);
1280  COMPARE_SCALAR_FIELD(oldstyle);
1281  COMPARE_NODE_FIELD(defnames);
1283  COMPARE_NODE_FIELD(definition);
1284  COMPARE_SCALAR_FIELD(if_not_exists);
1285  COMPARE_SCALAR_FIELD(replace);
1286 
1287  return true;
1288 }
1289 
1290 static bool
1291 _equalDropStmt(const DropStmt *a, const DropStmt *b)
1292 {
1293  COMPARE_NODE_FIELD(objects);
1294  COMPARE_SCALAR_FIELD(removeType);
1295  COMPARE_SCALAR_FIELD(behavior);
1296  COMPARE_SCALAR_FIELD(missing_ok);
1297  COMPARE_SCALAR_FIELD(concurrent);
1298 
1299  return true;
1300 }
1301 
1302 static bool
1304 {
1305  COMPARE_NODE_FIELD(relations);
1306  COMPARE_SCALAR_FIELD(restart_seqs);
1307  COMPARE_SCALAR_FIELD(behavior);
1308 
1309  return true;
1310 }
1311 
1312 static bool
1314 {
1315  COMPARE_SCALAR_FIELD(objtype);
1316  COMPARE_NODE_FIELD(object);
1317  COMPARE_STRING_FIELD(comment);
1318 
1319  return true;
1320 }
1321 
1322 static bool
1324 {
1325  COMPARE_SCALAR_FIELD(objtype);
1326  COMPARE_NODE_FIELD(object);
1329 
1330  return true;
1331 }
1332 
1333 static bool
1335 {
1336  COMPARE_SCALAR_FIELD(direction);
1337  COMPARE_SCALAR_FIELD(howMany);
1338  COMPARE_STRING_FIELD(portalname);
1339  COMPARE_SCALAR_FIELD(ismove);
1340 
1341  return true;
1342 }
1343 
1344 static bool
1346 {
1347  COMPARE_STRING_FIELD(idxname);
1348  COMPARE_NODE_FIELD(relation);
1349  COMPARE_STRING_FIELD(accessMethod);
1350  COMPARE_STRING_FIELD(tableSpace);
1351  COMPARE_NODE_FIELD(indexParams);
1352  COMPARE_NODE_FIELD(indexIncludingParams);
1354  COMPARE_NODE_FIELD(whereClause);
1355  COMPARE_NODE_FIELD(excludeOpNames);
1356  COMPARE_STRING_FIELD(idxcomment);
1357  COMPARE_SCALAR_FIELD(indexOid);
1358  COMPARE_SCALAR_FIELD(oldNode);
1359  COMPARE_SCALAR_FIELD(oldCreateSubid);
1360  COMPARE_SCALAR_FIELD(oldFirstRelfilenodeSubid);
1361  COMPARE_SCALAR_FIELD(unique);
1362  COMPARE_SCALAR_FIELD(primary);
1363  COMPARE_SCALAR_FIELD(isconstraint);
1364  COMPARE_SCALAR_FIELD(deferrable);
1365  COMPARE_SCALAR_FIELD(initdeferred);
1366  COMPARE_SCALAR_FIELD(transformed);
1367  COMPARE_SCALAR_FIELD(concurrent);
1368  COMPARE_SCALAR_FIELD(if_not_exists);
1369  COMPARE_SCALAR_FIELD(reset_default_tblspc);
1370 
1371  return true;
1372 }
1373 
1374 static bool
1376 {
1377  COMPARE_NODE_FIELD(defnames);
1378  COMPARE_NODE_FIELD(stat_types);
1379  COMPARE_NODE_FIELD(exprs);
1380  COMPARE_NODE_FIELD(relations);
1381  COMPARE_STRING_FIELD(stxcomment);
1382  COMPARE_SCALAR_FIELD(if_not_exists);
1383 
1384  return true;
1385 }
1386 
1387 static bool
1389 {
1390  COMPARE_NODE_FIELD(defnames);
1391  COMPARE_SCALAR_FIELD(stxstattarget);
1392  COMPARE_SCALAR_FIELD(missing_ok);
1393 
1394  return true;
1395 }
1396 
1397 static bool
1399 {
1400  COMPARE_SCALAR_FIELD(is_procedure);
1401  COMPARE_SCALAR_FIELD(replace);
1402  COMPARE_NODE_FIELD(funcname);
1403  COMPARE_NODE_FIELD(parameters);
1404  COMPARE_NODE_FIELD(returnType);
1406 
1407  return true;
1408 }
1409 
1410 static bool
1412 {
1414  COMPARE_NODE_FIELD(argType);
1416  COMPARE_NODE_FIELD(defexpr);
1417 
1418  return true;
1419 }
1420 
1421 static bool
1423 {
1424  COMPARE_SCALAR_FIELD(objtype);
1425  COMPARE_NODE_FIELD(func);
1426  COMPARE_NODE_FIELD(actions);
1427 
1428  return true;
1429 }
1430 
1431 static bool
1432 _equalDoStmt(const DoStmt *a, const DoStmt *b)
1433 {
1435 
1436  return true;
1437 }
1438 
1439 static bool
1441 {
1442  COMPARE_SCALAR_FIELD(renameType);
1443  COMPARE_SCALAR_FIELD(relationType);
1444  COMPARE_NODE_FIELD(relation);
1445  COMPARE_NODE_FIELD(object);
1447  COMPARE_STRING_FIELD(newname);
1448  COMPARE_SCALAR_FIELD(behavior);
1449  COMPARE_SCALAR_FIELD(missing_ok);
1450 
1451  return true;
1452 }
1453 
1454 static bool
1456 {
1457  COMPARE_SCALAR_FIELD(objectType);
1458  COMPARE_NODE_FIELD(relation);
1459  COMPARE_NODE_FIELD(object);
1460  COMPARE_NODE_FIELD(extname);
1461  COMPARE_SCALAR_FIELD(remove);
1462 
1463  return true;
1464 }
1465 
1466 static bool
1468 {
1469  COMPARE_SCALAR_FIELD(objectType);
1470  COMPARE_NODE_FIELD(relation);
1471  COMPARE_NODE_FIELD(object);
1472  COMPARE_STRING_FIELD(newschema);
1473  COMPARE_SCALAR_FIELD(missing_ok);
1474 
1475  return true;
1476 }
1477 
1478 static bool
1480 {
1481  COMPARE_SCALAR_FIELD(objectType);
1482  COMPARE_NODE_FIELD(relation);
1483  COMPARE_NODE_FIELD(object);
1484  COMPARE_NODE_FIELD(newowner);
1485 
1486  return true;
1487 }
1488 
1489 static bool
1491 {
1492  COMPARE_NODE_FIELD(opername);
1494 
1495  return true;
1496 }
1497 
1498 static bool
1500 {
1501  COMPARE_NODE_FIELD(typeName);
1503 
1504  return true;
1505 }
1506 
1507 static bool
1508 _equalRuleStmt(const RuleStmt *a, const RuleStmt *b)
1509 {
1510  COMPARE_NODE_FIELD(relation);
1511  COMPARE_STRING_FIELD(rulename);
1512  COMPARE_NODE_FIELD(whereClause);
1513  COMPARE_SCALAR_FIELD(event);
1514  COMPARE_SCALAR_FIELD(instead);
1515  COMPARE_NODE_FIELD(actions);
1516  COMPARE_SCALAR_FIELD(replace);
1517 
1518  return true;
1519 }
1520 
1521 static bool
1523 {
1524  COMPARE_STRING_FIELD(conditionname);
1525  COMPARE_STRING_FIELD(payload);
1526 
1527  return true;
1528 }
1529 
1530 static bool
1532 {
1533  COMPARE_STRING_FIELD(conditionname);
1534 
1535  return true;
1536 }
1537 
1538 static bool
1540 {
1541  COMPARE_STRING_FIELD(conditionname);
1542 
1543  return true;
1544 }
1545 
1546 static bool
1548 {
1549  COMPARE_SCALAR_FIELD(kind);
1551  COMPARE_STRING_FIELD(savepoint_name);
1552  COMPARE_STRING_FIELD(gid);
1553  COMPARE_SCALAR_FIELD(chain);
1554 
1555  return true;
1556 }
1557 
1558 static bool
1560 {
1561  COMPARE_NODE_FIELD(typevar);
1562  COMPARE_NODE_FIELD(coldeflist);
1563 
1564  return true;
1565 }
1566 
1567 static bool
1569 {
1570  COMPARE_NODE_FIELD(typeName);
1571  COMPARE_NODE_FIELD(vals);
1572 
1573  return true;
1574 }
1575 
1576 static bool
1578 {
1579  COMPARE_NODE_FIELD(typeName);
1580  COMPARE_NODE_FIELD(params);
1581 
1582  return true;
1583 }
1584 
1585 static bool
1587 {
1588  COMPARE_NODE_FIELD(typeName);
1589  COMPARE_STRING_FIELD(oldVal);
1590  COMPARE_STRING_FIELD(newVal);
1591  COMPARE_STRING_FIELD(newValNeighbor);
1592  COMPARE_SCALAR_FIELD(newValIsAfter);
1593  COMPARE_SCALAR_FIELD(skipIfNewValExists);
1594 
1595  return true;
1596 }
1597 
1598 static bool
1599 _equalViewStmt(const ViewStmt *a, const ViewStmt *b)
1600 {
1601  COMPARE_NODE_FIELD(view);
1602  COMPARE_NODE_FIELD(aliases);
1603  COMPARE_NODE_FIELD(query);
1604  COMPARE_SCALAR_FIELD(replace);
1606  COMPARE_SCALAR_FIELD(withCheckOption);
1607 
1608  return true;
1609 }
1610 
1611 static bool
1612 _equalLoadStmt(const LoadStmt *a, const LoadStmt *b)
1613 {
1615 
1616  return true;
1617 }
1618 
1619 static bool
1621 {
1622  COMPARE_NODE_FIELD(domainname);
1623  COMPARE_NODE_FIELD(typeName);
1624  COMPARE_NODE_FIELD(collClause);
1625  COMPARE_NODE_FIELD(constraints);
1626 
1627  return true;
1628 }
1629 
1630 static bool
1632 {
1633  COMPARE_NODE_FIELD(opclassname);
1634  COMPARE_NODE_FIELD(opfamilyname);
1635  COMPARE_STRING_FIELD(amname);
1636  COMPARE_NODE_FIELD(datatype);
1637  COMPARE_NODE_FIELD(items);
1638  COMPARE_SCALAR_FIELD(isDefault);
1639 
1640  return true;
1641 }
1642 
1643 static bool
1645 {
1646  COMPARE_SCALAR_FIELD(itemtype);
1648  COMPARE_SCALAR_FIELD(number);
1649  COMPARE_NODE_FIELD(order_family);
1650  COMPARE_NODE_FIELD(class_args);
1651  COMPARE_NODE_FIELD(storedtype);
1652 
1653  return true;
1654 }
1655 
1656 static bool
1658 {
1659  COMPARE_NODE_FIELD(opfamilyname);
1660  COMPARE_STRING_FIELD(amname);
1661 
1662  return true;
1663 }
1664 
1665 static bool
1667 {
1668  COMPARE_NODE_FIELD(opfamilyname);
1669  COMPARE_STRING_FIELD(amname);
1670  COMPARE_SCALAR_FIELD(isDrop);
1671  COMPARE_NODE_FIELD(items);
1672 
1673  return true;
1674 }
1675 
1676 static bool
1678 {
1681 
1682  return true;
1683 }
1684 
1685 static bool
1687 {
1690 
1691  return true;
1692 }
1693 
1694 static bool
1696 {
1698  COMPARE_NODE_FIELD(setstmt);
1699 
1700  return true;
1701 }
1702 
1703 static bool
1705 {
1707  COMPARE_SCALAR_FIELD(missing_ok);
1709 
1710  return true;
1711 }
1712 
1713 static bool
1715 {
1717  COMPARE_NODE_FIELD(rels);
1718  COMPARE_SCALAR_FIELD(is_vacuumcmd);
1719 
1720  return true;
1721 }
1722 
1723 static bool
1725 {
1726  COMPARE_NODE_FIELD(relation);
1727  COMPARE_SCALAR_FIELD(oid);
1728  COMPARE_NODE_FIELD(va_cols);
1729 
1730  return true;
1731 }
1732 
1733 static bool
1735 {
1736  COMPARE_NODE_FIELD(query);
1738 
1739  return true;
1740 }
1741 
1742 static bool
1744 {
1745  COMPARE_NODE_FIELD(query);
1746  COMPARE_NODE_FIELD(into);
1747  COMPARE_SCALAR_FIELD(objtype);
1748  COMPARE_SCALAR_FIELD(is_select_into);
1749  COMPARE_SCALAR_FIELD(if_not_exists);
1750 
1751  return true;
1752 }
1753 
1754 static bool
1756 {
1757  COMPARE_SCALAR_FIELD(concurrent);
1758  COMPARE_SCALAR_FIELD(skipData);
1759  COMPARE_NODE_FIELD(relation);
1760 
1761  return true;
1762 }
1763 
1764 static bool
1766 {
1767  COMPARE_SCALAR_FIELD(identity_type);
1769 
1770  return true;
1771 }
1772 
1773 static bool
1775 {
1776  COMPARE_NODE_FIELD(setstmt);
1777 
1778  return true;
1779 }
1780 
1781 
1782 static bool
1784 {
1785  COMPARE_NODE_FIELD(sequence);
1787  COMPARE_SCALAR_FIELD(ownerId);
1788  COMPARE_SCALAR_FIELD(for_identity);
1789  COMPARE_SCALAR_FIELD(if_not_exists);
1790 
1791  return true;
1792 }
1793 
1794 static bool
1796 {
1797  COMPARE_NODE_FIELD(sequence);
1799  COMPARE_SCALAR_FIELD(for_identity);
1800  COMPARE_SCALAR_FIELD(missing_ok);
1801 
1802  return true;
1803 }
1804 
1805 static bool
1807 {
1808  COMPARE_SCALAR_FIELD(kind);
1811  COMPARE_SCALAR_FIELD(is_local);
1812 
1813  return true;
1814 }
1815 
1816 static bool
1818 {
1820 
1821  return true;
1822 }
1823 
1824 static bool
1826 {
1827  COMPARE_SCALAR_FIELD(target);
1828 
1829  return true;
1830 }
1831 
1832 static bool
1834 {
1835  COMPARE_STRING_FIELD(tablespacename);
1836  COMPARE_NODE_FIELD(owner);
1837  COMPARE_STRING_FIELD(location);
1839 
1840  return true;
1841 }
1842 
1843 static bool
1845 {
1846  COMPARE_STRING_FIELD(tablespacename);
1847  COMPARE_SCALAR_FIELD(missing_ok);
1848 
1849  return true;
1850 }
1851 
1852 static bool
1854  const AlterTableSpaceOptionsStmt *b)
1855 {
1856  COMPARE_STRING_FIELD(tablespacename);
1858  COMPARE_SCALAR_FIELD(isReset);
1859 
1860  return true;
1861 }
1862 
1863 static bool
1865  const AlterTableMoveAllStmt *b)
1866 {
1867  COMPARE_STRING_FIELD(orig_tablespacename);
1868  COMPARE_SCALAR_FIELD(objtype);
1869  COMPARE_NODE_FIELD(roles);
1870  COMPARE_STRING_FIELD(new_tablespacename);
1871  COMPARE_SCALAR_FIELD(nowait);
1872 
1873  return true;
1874 }
1875 
1876 static bool
1878 {
1879  COMPARE_STRING_FIELD(extname);
1880  COMPARE_SCALAR_FIELD(if_not_exists);
1882 
1883  return true;
1884 }
1885 
1886 static bool
1888 {
1889  COMPARE_STRING_FIELD(extname);
1891 
1892  return true;
1893 }
1894 
1895 static bool
1897 {
1898  COMPARE_STRING_FIELD(extname);
1900  COMPARE_SCALAR_FIELD(objtype);
1901  COMPARE_NODE_FIELD(object);
1902 
1903  return true;
1904 }
1905 
1906 static bool
1908 {
1909  COMPARE_STRING_FIELD(fdwname);
1910  COMPARE_NODE_FIELD(func_options);
1912 
1913  return true;
1914 }
1915 
1916 static bool
1918 {
1919  COMPARE_STRING_FIELD(fdwname);
1920  COMPARE_NODE_FIELD(func_options);
1922 
1923  return true;
1924 }
1925 
1926 static bool
1928 {
1929  COMPARE_STRING_FIELD(servername);
1930  COMPARE_STRING_FIELD(servertype);
1931  COMPARE_STRING_FIELD(version);
1932  COMPARE_STRING_FIELD(fdwname);
1933  COMPARE_SCALAR_FIELD(if_not_exists);
1935 
1936  return true;
1937 }
1938 
1939 static bool
1941 {
1942  COMPARE_STRING_FIELD(servername);
1943  COMPARE_STRING_FIELD(version);
1945  COMPARE_SCALAR_FIELD(has_version);
1946 
1947  return true;
1948 }
1949 
1950 static bool
1952 {
1954  COMPARE_STRING_FIELD(servername);
1955  COMPARE_SCALAR_FIELD(if_not_exists);
1957 
1958  return true;
1959 }
1960 
1961 static bool
1963 {
1965  COMPARE_STRING_FIELD(servername);
1967 
1968  return true;
1969 }
1970 
1971 static bool
1973 {
1975  COMPARE_STRING_FIELD(servername);
1976  COMPARE_SCALAR_FIELD(missing_ok);
1977 
1978  return true;
1979 }
1980 
1981 static bool
1983 {
1984  if (!_equalCreateStmt(&a->base, &b->base))
1985  return false;
1986 
1987  COMPARE_STRING_FIELD(servername);
1989 
1990  return true;
1991 }
1992 
1993 static bool
1995 {
1996  COMPARE_STRING_FIELD(server_name);
1997  COMPARE_STRING_FIELD(remote_schema);
1998  COMPARE_STRING_FIELD(local_schema);
1999  COMPARE_SCALAR_FIELD(list_type);
2000  COMPARE_NODE_FIELD(table_list);
2002 
2003  return true;
2004 }
2005 
2006 static bool
2008 {
2009  COMPARE_SCALAR_FIELD(replace);
2010  COMPARE_NODE_FIELD(type_name);
2011  COMPARE_STRING_FIELD(lang);
2012  COMPARE_NODE_FIELD(fromsql);
2013  COMPARE_NODE_FIELD(tosql);
2014 
2015  return true;
2016 }
2017 
2018 static bool
2020 {
2021  COMPARE_STRING_FIELD(amname);
2022  COMPARE_NODE_FIELD(handler_name);
2023  COMPARE_SCALAR_FIELD(amtype);
2024 
2025  return true;
2026 }
2027 
2028 static bool
2030 {
2031  COMPARE_SCALAR_FIELD(replace);
2032  COMPARE_SCALAR_FIELD(isconstraint);
2033  COMPARE_STRING_FIELD(trigname);
2034  COMPARE_NODE_FIELD(relation);
2035  COMPARE_NODE_FIELD(funcname);
2037  COMPARE_SCALAR_FIELD(row);
2038  COMPARE_SCALAR_FIELD(timing);
2039  COMPARE_SCALAR_FIELD(events);
2040  COMPARE_NODE_FIELD(columns);
2041  COMPARE_NODE_FIELD(whenClause);
2042  COMPARE_NODE_FIELD(transitionRels);
2043  COMPARE_SCALAR_FIELD(deferrable);
2044  COMPARE_SCALAR_FIELD(initdeferred);
2045  COMPARE_NODE_FIELD(constrrel);
2046 
2047  return true;
2048 }
2049 
2050 static bool
2052 {
2053  COMPARE_STRING_FIELD(trigname);
2054  COMPARE_STRING_FIELD(eventname);
2055  COMPARE_NODE_FIELD(whenclause);
2056  COMPARE_NODE_FIELD(funcname);
2057 
2058  return true;
2059 }
2060 
2061 static bool
2063 {
2064  COMPARE_STRING_FIELD(trigname);
2065  COMPARE_SCALAR_FIELD(tgenabled);
2066 
2067  return true;
2068 }
2069 
2070 static bool
2072 {
2073  COMPARE_SCALAR_FIELD(replace);
2074  COMPARE_STRING_FIELD(plname);
2075  COMPARE_NODE_FIELD(plhandler);
2076  COMPARE_NODE_FIELD(plinline);
2077  COMPARE_NODE_FIELD(plvalidator);
2078  COMPARE_SCALAR_FIELD(pltrusted);
2079 
2080  return true;
2081 }
2082 
2083 static bool
2085 {
2086  COMPARE_SCALAR_FIELD(stmt_type);
2087  COMPARE_STRING_FIELD(role);
2089 
2090  return true;
2091 }
2092 
2093 static bool
2095 {
2096  COMPARE_NODE_FIELD(role);
2099 
2100  return true;
2101 }
2102 
2103 static bool
2105 {
2106  COMPARE_NODE_FIELD(role);
2107  COMPARE_STRING_FIELD(database);
2108  COMPARE_NODE_FIELD(setstmt);
2109 
2110  return true;
2111 }
2112 
2113 static bool
2115 {
2116  COMPARE_NODE_FIELD(roles);
2117  COMPARE_SCALAR_FIELD(missing_ok);
2118 
2119  return true;
2120 }
2121 
2122 static bool
2123 _equalLockStmt(const LockStmt *a, const LockStmt *b)
2124 {
2125  COMPARE_NODE_FIELD(relations);
2127  COMPARE_SCALAR_FIELD(nowait);
2128 
2129  return true;
2130 }
2131 
2132 static bool
2134 {
2135  COMPARE_NODE_FIELD(constraints);
2136  COMPARE_SCALAR_FIELD(deferred);
2137 
2138  return true;
2139 }
2140 
2141 static bool
2143 {
2144  COMPARE_SCALAR_FIELD(kind);
2145  COMPARE_NODE_FIELD(relation);
2147  COMPARE_NODE_FIELD(params);
2148 
2149  return true;
2150 }
2151 
2152 static bool
2154 {
2155  COMPARE_STRING_FIELD(schemaname);
2156  COMPARE_NODE_FIELD(authrole);
2157  COMPARE_NODE_FIELD(schemaElts);
2158  COMPARE_SCALAR_FIELD(if_not_exists);
2159 
2160  return true;
2161 }
2162 
2163 static bool
2165 {
2166  COMPARE_NODE_FIELD(conversion_name);
2167  COMPARE_STRING_FIELD(for_encoding_name);
2168  COMPARE_STRING_FIELD(to_encoding_name);
2169  COMPARE_NODE_FIELD(func_name);
2170  COMPARE_SCALAR_FIELD(def);
2171 
2172  return true;
2173 }
2174 
2175 static bool
2177 {
2178  COMPARE_NODE_FIELD(sourcetype);
2179  COMPARE_NODE_FIELD(targettype);
2180  COMPARE_NODE_FIELD(func);
2181  COMPARE_SCALAR_FIELD(context);
2182  COMPARE_SCALAR_FIELD(inout);
2183 
2184  return true;
2185 }
2186 
2187 static bool
2189 {
2191  COMPARE_NODE_FIELD(argtypes);
2192  COMPARE_NODE_FIELD(query);
2193 
2194  return true;
2195 }
2196 
2197 static bool
2199 {
2201  COMPARE_NODE_FIELD(params);
2202 
2203  return true;
2204 }
2205 
2206 static bool
2208 {
2210 
2211  return true;
2212 }
2213 
2214 static bool
2216 {
2217  COMPARE_NODE_FIELD(roles);
2218  COMPARE_SCALAR_FIELD(behavior);
2219 
2220  return true;
2221 }
2222 
2223 static bool
2225 {
2226  COMPARE_NODE_FIELD(roles);
2227  COMPARE_NODE_FIELD(newrole);
2228 
2229  return true;
2230 }
2231 
2232 static bool
2234 {
2235  COMPARE_NODE_FIELD(dictname);
2237 
2238  return true;
2239 }
2240 
2241 static bool
2243  const AlterTSConfigurationStmt *b)
2244 {
2245  COMPARE_SCALAR_FIELD(kind);
2246  COMPARE_NODE_FIELD(cfgname);
2247  COMPARE_NODE_FIELD(tokentype);
2248  COMPARE_NODE_FIELD(dicts);
2249  COMPARE_SCALAR_FIELD(override);
2250  COMPARE_SCALAR_FIELD(replace);
2251  COMPARE_SCALAR_FIELD(missing_ok);
2252 
2253  return true;
2254 }
2255 
2256 static bool
2258  const CreatePublicationStmt *b)
2259 {
2260  COMPARE_STRING_FIELD(pubname);
2262  COMPARE_NODE_FIELD(tables);
2263  COMPARE_SCALAR_FIELD(for_all_tables);
2264 
2265  return true;
2266 }
2267 
2268 static bool
2270  const AlterPublicationStmt *b)
2271 {
2272  COMPARE_STRING_FIELD(pubname);
2274  COMPARE_NODE_FIELD(tables);
2275  COMPARE_SCALAR_FIELD(for_all_tables);
2276  COMPARE_SCALAR_FIELD(tableAction);
2277 
2278  return true;
2279 }
2280 
2281 static bool
2283  const CreateSubscriptionStmt *b)
2284 {
2286  COMPARE_STRING_FIELD(conninfo);
2287  COMPARE_NODE_FIELD(publication);
2289 
2290  return true;
2291 }
2292 
2293 static bool
2295  const AlterSubscriptionStmt *b)
2296 {
2297  COMPARE_SCALAR_FIELD(kind);
2299  COMPARE_STRING_FIELD(conninfo);
2300  COMPARE_NODE_FIELD(publication);
2302 
2303  return true;
2304 }
2305 
2306 static bool
2308  const DropSubscriptionStmt *b)
2309 {
2311  COMPARE_SCALAR_FIELD(missing_ok);
2312  COMPARE_SCALAR_FIELD(behavior);
2313 
2314  return true;
2315 }
2316 
2317 static bool
2319 {
2320  COMPARE_STRING_FIELD(policy_name);
2321  COMPARE_NODE_FIELD(table);
2322  COMPARE_STRING_FIELD(cmd_name);
2323  COMPARE_SCALAR_FIELD(permissive);
2324  COMPARE_NODE_FIELD(roles);
2325  COMPARE_NODE_FIELD(qual);
2326  COMPARE_NODE_FIELD(with_check);
2327 
2328  return true;
2329 }
2330 
2331 static bool
2333 {
2334  COMPARE_STRING_FIELD(policy_name);
2335  COMPARE_NODE_FIELD(table);
2336  COMPARE_NODE_FIELD(roles);
2337  COMPARE_NODE_FIELD(qual);
2338  COMPARE_NODE_FIELD(with_check);
2339 
2340  return true;
2341 }
2342 
2343 static bool
2344 _equalAExpr(const A_Expr *a, const A_Expr *b)
2345 {
2346  COMPARE_SCALAR_FIELD(kind);
2348  COMPARE_NODE_FIELD(lexpr);
2349  COMPARE_NODE_FIELD(rexpr);
2350  COMPARE_LOCATION_FIELD(location);
2351 
2352  return true;
2353 }
2354 
2355 static bool
2357 {
2358  COMPARE_NODE_FIELD(fields);
2359  COMPARE_LOCATION_FIELD(location);
2360 
2361  return true;
2362 }
2363 
2364 static bool
2365 _equalParamRef(const ParamRef *a, const ParamRef *b)
2366 {
2367  COMPARE_SCALAR_FIELD(number);
2368  COMPARE_LOCATION_FIELD(location);
2369 
2370  return true;
2371 }
2372 
2373 static bool
2374 _equalAConst(const A_Const *a, const A_Const *b)
2375 {
2376  if (!equal(&a->val, &b->val)) /* hack for in-line Value field */
2377  return false;
2378  COMPARE_LOCATION_FIELD(location);
2379 
2380  return true;
2381 }
2382 
2383 static bool
2384 _equalFuncCall(const FuncCall *a, const FuncCall *b)
2385 {
2386  COMPARE_NODE_FIELD(funcname);
2388  COMPARE_NODE_FIELD(agg_order);
2389  COMPARE_NODE_FIELD(agg_filter);
2390  COMPARE_NODE_FIELD(over);
2391  COMPARE_SCALAR_FIELD(agg_within_group);
2392  COMPARE_SCALAR_FIELD(agg_star);
2393  COMPARE_SCALAR_FIELD(agg_distinct);
2394  COMPARE_SCALAR_FIELD(func_variadic);
2395  COMPARE_SCALAR_FIELD(funcformat);
2396  COMPARE_LOCATION_FIELD(location);
2397 
2398  return true;
2399 }
2400 
2401 static bool
2402 _equalAStar(const A_Star *a, const A_Star *b)
2403 {
2404  return true;
2405 }
2406 
2407 static bool
2409 {
2410  COMPARE_SCALAR_FIELD(is_slice);
2411  COMPARE_NODE_FIELD(lidx);
2412  COMPARE_NODE_FIELD(uidx);
2413 
2414  return true;
2415 }
2416 
2417 static bool
2419 {
2421  COMPARE_NODE_FIELD(indirection);
2422 
2423  return true;
2424 }
2425 
2426 static bool
2428 {
2429  COMPARE_NODE_FIELD(elements);
2430  COMPARE_LOCATION_FIELD(location);
2431 
2432  return true;
2433 }
2434 
2435 static bool
2437 {
2439  COMPARE_NODE_FIELD(indirection);
2441  COMPARE_LOCATION_FIELD(location);
2442 
2443  return true;
2444 }
2445 
2446 static bool
2448 {
2450  COMPARE_SCALAR_FIELD(colno);
2451  COMPARE_SCALAR_FIELD(ncolumns);
2452 
2453  return true;
2454 }
2455 
2456 static bool
2457 _equalTypeName(const TypeName *a, const TypeName *b)
2458 {
2459  COMPARE_NODE_FIELD(names);
2460  COMPARE_SCALAR_FIELD(typeOid);
2461  COMPARE_SCALAR_FIELD(setof);
2462  COMPARE_SCALAR_FIELD(pct_type);
2463  COMPARE_NODE_FIELD(typmods);
2464  COMPARE_SCALAR_FIELD(typemod);
2465  COMPARE_NODE_FIELD(arrayBounds);
2466  COMPARE_LOCATION_FIELD(location);
2467 
2468  return true;
2469 }
2470 
2471 static bool
2472 _equalTypeCast(const TypeCast *a, const TypeCast *b)
2473 {
2475  COMPARE_NODE_FIELD(typeName);
2476  COMPARE_LOCATION_FIELD(location);
2477 
2478  return true;
2479 }
2480 
2481 static bool
2483 {
2485  COMPARE_NODE_FIELD(collname);
2486  COMPARE_LOCATION_FIELD(location);
2487 
2488  return true;
2489 }
2490 
2491 static bool
2492 _equalSortBy(const SortBy *a, const SortBy *b)
2493 {
2494  COMPARE_NODE_FIELD(node);
2495  COMPARE_SCALAR_FIELD(sortby_dir);
2496  COMPARE_SCALAR_FIELD(sortby_nulls);
2497  COMPARE_NODE_FIELD(useOp);
2498  COMPARE_LOCATION_FIELD(location);
2499 
2500  return true;
2501 }
2502 
2503 static bool
2505 {
2507  COMPARE_STRING_FIELD(refname);
2508  COMPARE_NODE_FIELD(partitionClause);
2509  COMPARE_NODE_FIELD(orderClause);
2510  COMPARE_SCALAR_FIELD(frameOptions);
2511  COMPARE_NODE_FIELD(startOffset);
2512  COMPARE_NODE_FIELD(endOffset);
2513  COMPARE_LOCATION_FIELD(location);
2514 
2515  return true;
2516 }
2517 
2518 static bool
2520 {
2521  COMPARE_SCALAR_FIELD(lateral);
2522  COMPARE_NODE_FIELD(subquery);
2523  COMPARE_NODE_FIELD(alias);
2524 
2525  return true;
2526 }
2527 
2528 static bool
2530 {
2531  COMPARE_SCALAR_FIELD(lateral);
2532  COMPARE_SCALAR_FIELD(ordinality);
2533  COMPARE_SCALAR_FIELD(is_rowsfrom);
2535  COMPARE_NODE_FIELD(alias);
2536  COMPARE_NODE_FIELD(coldeflist);
2537 
2538  return true;
2539 }
2540 
2541 static bool
2543 {
2544  COMPARE_NODE_FIELD(relation);
2545  COMPARE_NODE_FIELD(method);
2547  COMPARE_NODE_FIELD(repeatable);
2548  COMPARE_LOCATION_FIELD(location);
2549 
2550  return true;
2551 }
2552 
2553 static bool
2555 {
2556  COMPARE_SCALAR_FIELD(lateral);
2557  COMPARE_NODE_FIELD(docexpr);
2558  COMPARE_NODE_FIELD(rowexpr);
2559  COMPARE_NODE_FIELD(namespaces);
2560  COMPARE_NODE_FIELD(columns);
2561  COMPARE_NODE_FIELD(alias);
2562  COMPARE_LOCATION_FIELD(location);
2563 
2564  return true;
2565 }
2566 
2567 static bool
2569 {
2570  COMPARE_STRING_FIELD(colname);
2571  COMPARE_NODE_FIELD(typeName);
2572  COMPARE_SCALAR_FIELD(for_ordinality);
2573  COMPARE_SCALAR_FIELD(is_not_null);
2574  COMPARE_NODE_FIELD(colexpr);
2575  COMPARE_NODE_FIELD(coldefexpr);
2576  COMPARE_LOCATION_FIELD(location);
2577 
2578  return true;
2579 }
2580 
2581 
2582 static bool
2584 {
2586  COMPARE_NODE_FIELD(expr);
2587  COMPARE_STRING_FIELD(indexcolname);
2588  COMPARE_NODE_FIELD(collation);
2589  COMPARE_NODE_FIELD(opclass);
2590  COMPARE_NODE_FIELD(opclassopts);
2591  COMPARE_SCALAR_FIELD(ordering);
2592  COMPARE_SCALAR_FIELD(nulls_ordering);
2593 
2594  return true;
2595 }
2596 
2597 static bool
2599 {
2600  COMPARE_STRING_FIELD(colname);
2601  COMPARE_NODE_FIELD(typeName);
2602  COMPARE_SCALAR_FIELD(inhcount);
2603  COMPARE_SCALAR_FIELD(is_local);
2604  COMPARE_SCALAR_FIELD(is_not_null);
2605  COMPARE_SCALAR_FIELD(is_from_type);
2606  COMPARE_SCALAR_FIELD(storage);
2607  COMPARE_NODE_FIELD(raw_default);
2608  COMPARE_NODE_FIELD(cooked_default);
2609  COMPARE_SCALAR_FIELD(identity);
2610  COMPARE_NODE_FIELD(identitySequence);
2611  COMPARE_SCALAR_FIELD(generated);
2612  COMPARE_NODE_FIELD(collClause);
2613  COMPARE_SCALAR_FIELD(collOid);
2614  COMPARE_NODE_FIELD(constraints);
2615  COMPARE_NODE_FIELD(fdwoptions);
2616  COMPARE_LOCATION_FIELD(location);
2617 
2618  return true;
2619 }
2620 
2621 static bool
2623 {
2624  COMPARE_SCALAR_FIELD(contype);
2625  COMPARE_STRING_FIELD(conname);
2626  COMPARE_SCALAR_FIELD(deferrable);
2627  COMPARE_SCALAR_FIELD(initdeferred);
2628  COMPARE_LOCATION_FIELD(location);
2629  COMPARE_SCALAR_FIELD(is_no_inherit);
2630  COMPARE_NODE_FIELD(raw_expr);
2631  COMPARE_STRING_FIELD(cooked_expr);
2632  COMPARE_SCALAR_FIELD(generated_when);
2633  COMPARE_NODE_FIELD(keys);
2634  COMPARE_NODE_FIELD(including);
2635  COMPARE_NODE_FIELD(exclusions);
2637  COMPARE_STRING_FIELD(indexname);
2638  COMPARE_STRING_FIELD(indexspace);
2639  COMPARE_SCALAR_FIELD(reset_default_tblspc);
2640  COMPARE_STRING_FIELD(access_method);
2641  COMPARE_NODE_FIELD(where_clause);
2642  COMPARE_NODE_FIELD(pktable);
2643  COMPARE_NODE_FIELD(fk_attrs);
2644  COMPARE_NODE_FIELD(pk_attrs);
2645  COMPARE_SCALAR_FIELD(fk_matchtype);
2646  COMPARE_SCALAR_FIELD(fk_upd_action);
2647  COMPARE_SCALAR_FIELD(fk_del_action);
2648  COMPARE_NODE_FIELD(old_conpfeqop);
2649  COMPARE_SCALAR_FIELD(old_pktable_oid);
2650  COMPARE_SCALAR_FIELD(skip_validation);
2651  COMPARE_SCALAR_FIELD(initially_valid);
2652 
2653  return true;
2654 }
2655 
2656 static bool
2657 _equalDefElem(const DefElem *a, const DefElem *b)
2658 {
2659  COMPARE_STRING_FIELD(defnamespace);
2660  COMPARE_STRING_FIELD(defname);
2662  COMPARE_SCALAR_FIELD(defaction);
2663  COMPARE_LOCATION_FIELD(location);
2664 
2665  return true;
2666 }
2667 
2668 static bool
2670 {
2671  COMPARE_NODE_FIELD(lockedRels);
2672  COMPARE_SCALAR_FIELD(strength);
2673  COMPARE_SCALAR_FIELD(waitPolicy);
2674 
2675  return true;
2676 }
2677 
2678 static bool
2680 {
2681  COMPARE_SCALAR_FIELD(rtekind);
2682  COMPARE_SCALAR_FIELD(relid);
2683  COMPARE_SCALAR_FIELD(relkind);
2684  COMPARE_SCALAR_FIELD(rellockmode);
2685  COMPARE_NODE_FIELD(tablesample);
2686  COMPARE_NODE_FIELD(subquery);
2687  COMPARE_SCALAR_FIELD(security_barrier);
2688  COMPARE_SCALAR_FIELD(jointype);
2689  COMPARE_SCALAR_FIELD(joinmergedcols);
2690  COMPARE_NODE_FIELD(joinaliasvars);
2691  COMPARE_NODE_FIELD(joinleftcols);
2692  COMPARE_NODE_FIELD(joinrightcols);
2694  COMPARE_SCALAR_FIELD(funcordinality);
2695  COMPARE_NODE_FIELD(tablefunc);
2696  COMPARE_NODE_FIELD(values_lists);
2697  COMPARE_STRING_FIELD(ctename);
2698  COMPARE_SCALAR_FIELD(ctelevelsup);
2699  COMPARE_SCALAR_FIELD(self_reference);
2700  COMPARE_NODE_FIELD(coltypes);
2701  COMPARE_NODE_FIELD(coltypmods);
2702  COMPARE_NODE_FIELD(colcollations);
2703  COMPARE_STRING_FIELD(enrname);
2704  COMPARE_SCALAR_FIELD(enrtuples);
2705  COMPARE_NODE_FIELD(alias);
2706  COMPARE_NODE_FIELD(eref);
2707  COMPARE_SCALAR_FIELD(lateral);
2708  COMPARE_SCALAR_FIELD(inh);
2709  COMPARE_SCALAR_FIELD(inFromCl);
2710  COMPARE_SCALAR_FIELD(requiredPerms);
2711  COMPARE_SCALAR_FIELD(checkAsUser);
2712  COMPARE_BITMAPSET_FIELD(selectedCols);
2713  COMPARE_BITMAPSET_FIELD(insertedCols);
2714  COMPARE_BITMAPSET_FIELD(updatedCols);
2715  COMPARE_BITMAPSET_FIELD(extraUpdatedCols);
2716  COMPARE_NODE_FIELD(securityQuals);
2717 
2718  return true;
2719 }
2720 
2721 static bool
2723 {
2724  COMPARE_NODE_FIELD(funcexpr);
2725  COMPARE_SCALAR_FIELD(funccolcount);
2726  COMPARE_NODE_FIELD(funccolnames);
2727  COMPARE_NODE_FIELD(funccoltypes);
2728  COMPARE_NODE_FIELD(funccoltypmods);
2729  COMPARE_NODE_FIELD(funccolcollations);
2730  COMPARE_BITMAPSET_FIELD(funcparams);
2731 
2732  return true;
2733 }
2734 
2735 static bool
2737 {
2738  COMPARE_SCALAR_FIELD(tsmhandler);
2740  COMPARE_NODE_FIELD(repeatable);
2741 
2742  return true;
2743 }
2744 
2745 static bool
2747 {
2748  COMPARE_SCALAR_FIELD(kind);
2750  COMPARE_STRING_FIELD(polname);
2751  COMPARE_NODE_FIELD(qual);
2752  COMPARE_SCALAR_FIELD(cascaded);
2753 
2754  return true;
2755 }
2756 
2757 static bool
2759 {
2760  COMPARE_SCALAR_FIELD(tleSortGroupRef);
2761  COMPARE_SCALAR_FIELD(eqop);
2762  COMPARE_SCALAR_FIELD(sortop);
2763  COMPARE_SCALAR_FIELD(nulls_first);
2764  COMPARE_SCALAR_FIELD(hashable);
2765 
2766  return true;
2767 }
2768 
2769 static bool
2771 {
2772  COMPARE_SCALAR_FIELD(kind);
2773  COMPARE_NODE_FIELD(content);
2774  COMPARE_LOCATION_FIELD(location);
2775 
2776  return true;
2777 }
2778 
2779 static bool
2781 {
2783  COMPARE_STRING_FIELD(refname);
2784  COMPARE_NODE_FIELD(partitionClause);
2785  COMPARE_NODE_FIELD(orderClause);
2786  COMPARE_SCALAR_FIELD(frameOptions);
2787  COMPARE_NODE_FIELD(startOffset);
2788  COMPARE_NODE_FIELD(endOffset);
2789  COMPARE_SCALAR_FIELD(startInRangeFunc);
2790  COMPARE_SCALAR_FIELD(endInRangeFunc);
2791  COMPARE_SCALAR_FIELD(inRangeColl);
2792  COMPARE_SCALAR_FIELD(inRangeAsc);
2793  COMPARE_SCALAR_FIELD(inRangeNullsFirst);
2794  COMPARE_SCALAR_FIELD(winref);
2795  COMPARE_SCALAR_FIELD(copiedOrder);
2796 
2797  return true;
2798 }
2799 
2800 static bool
2802 {
2803  COMPARE_SCALAR_FIELD(rti);
2804  COMPARE_SCALAR_FIELD(strength);
2805  COMPARE_SCALAR_FIELD(waitPolicy);
2806  COMPARE_SCALAR_FIELD(pushedDown);
2807 
2808  return true;
2809 }
2810 
2811 static bool
2813 {
2814  COMPARE_NODE_FIELD(ctes);
2815  COMPARE_SCALAR_FIELD(recursive);
2816  COMPARE_LOCATION_FIELD(location);
2817 
2818  return true;
2819 }
2820 
2821 static bool
2823 {
2824  COMPARE_NODE_FIELD(indexElems);
2825  COMPARE_NODE_FIELD(whereClause);
2826  COMPARE_STRING_FIELD(conname);
2827  COMPARE_LOCATION_FIELD(location);
2828 
2829  return true;
2830 }
2831 
2832 static bool
2834 {
2836  COMPARE_NODE_FIELD(infer);
2837  COMPARE_NODE_FIELD(targetList);
2838  COMPARE_NODE_FIELD(whereClause);
2839  COMPARE_LOCATION_FIELD(location);
2840 
2841  return true;
2842 }
2843 
2844 static bool
2846 {
2847  COMPARE_NODE_FIELD(search_col_list);
2848  COMPARE_SCALAR_FIELD(search_breadth_first);
2849  COMPARE_STRING_FIELD(search_seq_column);
2850  COMPARE_LOCATION_FIELD(location);
2851 
2852  return true;
2853 }
2854 
2855 static bool
2857 {
2858  COMPARE_NODE_FIELD(cycle_col_list);
2859  COMPARE_STRING_FIELD(cycle_mark_column);
2860  COMPARE_NODE_FIELD(cycle_mark_value);
2861  COMPARE_NODE_FIELD(cycle_mark_default);
2862  COMPARE_STRING_FIELD(cycle_path_column);
2863  COMPARE_LOCATION_FIELD(location);
2864  COMPARE_SCALAR_FIELD(cycle_mark_type);
2865  COMPARE_SCALAR_FIELD(cycle_mark_typmod);
2866  COMPARE_SCALAR_FIELD(cycle_mark_collation);
2867  COMPARE_SCALAR_FIELD(cycle_mark_neop);
2868 
2869  return true;
2870 }
2871 
2872 static bool
2874 {
2875  COMPARE_STRING_FIELD(ctename);
2876  COMPARE_NODE_FIELD(aliascolnames);
2877  COMPARE_SCALAR_FIELD(ctematerialized);
2878  COMPARE_NODE_FIELD(ctequery);
2879  COMPARE_NODE_FIELD(search_clause);
2880  COMPARE_NODE_FIELD(cycle_clause);
2881  COMPARE_LOCATION_FIELD(location);
2882  COMPARE_SCALAR_FIELD(cterecursive);
2883  COMPARE_SCALAR_FIELD(cterefcount);
2884  COMPARE_NODE_FIELD(ctecolnames);
2885  COMPARE_NODE_FIELD(ctecoltypes);
2886  COMPARE_NODE_FIELD(ctecoltypmods);
2887  COMPARE_NODE_FIELD(ctecolcollations);
2888 
2889  return true;
2890 }
2891 
2892 static bool
2894 {
2896  COMPARE_NODE_FIELD(expr);
2897  COMPARE_NODE_FIELD(typeName);
2898  COMPARE_LOCATION_FIELD(location);
2899 
2900  return true;
2901 }
2902 
2903 static bool
2904 _equalRoleSpec(const RoleSpec *a, const RoleSpec *b)
2905 {
2906  COMPARE_SCALAR_FIELD(roletype);
2907  COMPARE_STRING_FIELD(rolename);
2908  COMPARE_LOCATION_FIELD(location);
2909 
2910  return true;
2911 }
2912 
2913 static bool
2915 {
2917  COMPARE_SCALAR_FIELD(isNew);
2918  COMPARE_SCALAR_FIELD(isTable);
2919 
2920  return true;
2921 }
2922 
2923 static bool
2925 {
2927  COMPARE_NODE_FIELD(expr);
2928  COMPARE_NODE_FIELD(collation);
2929  COMPARE_NODE_FIELD(opclass);
2930  COMPARE_LOCATION_FIELD(location);
2931 
2932  return true;
2933 }
2934 
2935 static bool
2937 {
2938  COMPARE_STRING_FIELD(strategy);
2939  COMPARE_NODE_FIELD(partParams);
2940  COMPARE_LOCATION_FIELD(location);
2941 
2942  return true;
2943 }
2944 
2945 static bool
2947 {
2948  COMPARE_SCALAR_FIELD(strategy);
2949  COMPARE_SCALAR_FIELD(is_default);
2950  COMPARE_SCALAR_FIELD(modulus);
2951  COMPARE_SCALAR_FIELD(remainder);
2952  COMPARE_NODE_FIELD(listdatums);
2953  COMPARE_NODE_FIELD(lowerdatums);
2954  COMPARE_NODE_FIELD(upperdatums);
2955  COMPARE_LOCATION_FIELD(location);
2956 
2957  return true;
2958 }
2959 
2960 static bool
2962 {
2963  COMPARE_SCALAR_FIELD(kind);
2965  COMPARE_LOCATION_FIELD(location);
2966 
2967  return true;
2968 }
2969 
2970 static bool
2972 {
2974  COMPARE_NODE_FIELD(bound);
2975 
2976  return true;
2977 }
2978 
2979 /*
2980  * Stuff from pg_list.h
2981  */
2982 
2983 static bool
2984 _equalList(const List *a, const List *b)
2985 {
2986  const ListCell *item_a;
2987  const ListCell *item_b;
2988 
2989  /*
2990  * Try to reject by simple scalar checks before grovelling through all the
2991  * list elements...
2992  */
2994  COMPARE_SCALAR_FIELD(length);
2995 
2996  /*
2997  * We place the switch outside the loop for the sake of efficiency; this
2998  * may not be worth doing...
2999  */
3000  switch (a->type)
3001  {
3002  case T_List:
3003  forboth(item_a, a, item_b, b)
3004  {
3005  if (!equal(lfirst(item_a), lfirst(item_b)))
3006  return false;
3007  }
3008  break;
3009  case T_IntList:
3010  forboth(item_a, a, item_b, b)
3011  {
3012  if (lfirst_int(item_a) != lfirst_int(item_b))
3013  return false;
3014  }
3015  break;
3016  case T_OidList:
3017  forboth(item_a, a, item_b, b)
3018  {
3019  if (lfirst_oid(item_a) != lfirst_oid(item_b))
3020  return false;
3021  }
3022  break;
3023  default:
3024  elog(ERROR, "unrecognized list node type: %d",
3025  (int) a->type);
3026  return false; /* keep compiler quiet */
3027  }
3028 
3029  /*
3030  * If we got here, we should have run out of elements of both lists
3031  */
3032  Assert(item_a == NULL);
3033  Assert(item_b == NULL);
3034 
3035  return true;
3036 }
3037 
3038 /*
3039  * Stuff from value.h
3040  */
3041 
3042 static bool
3043 _equalValue(const Value *a, const Value *b)
3044 {
3046 
3047  switch (a->type)
3048  {
3049  case T_Integer:
3050  COMPARE_SCALAR_FIELD(val.ival);
3051  break;
3052  case T_Float:
3053  case T_String:
3054  case T_BitString:
3056  break;
3057  case T_Null:
3058  /* nothing to do */
3059  break;
3060  default:
3061  elog(ERROR, "unrecognized node type: %d", (int) a->type);
3062  break;
3063  }
3064 
3065  return true;
3066 }
3067 
3068 /*
3069  * equal
3070  * returns whether two nodes are equal
3071  */
3072 bool
3073 equal(const void *a, const void *b)
3074 {
3075  bool retval;
3076 
3077  if (a == b)
3078  return true;
3079 
3080  /*
3081  * note that a!=b, so only one of them can be NULL
3082  */
3083  if (a == NULL || b == NULL)
3084  return false;
3085 
3086  /*
3087  * are they the same type of nodes?
3088  */
3089  if (nodeTag(a) != nodeTag(b))
3090  return false;
3091 
3092  /* Guard against stack overflow due to overly complex expressions */
3094 
3095  switch (nodeTag(a))
3096  {
3097  /*
3098  * PRIMITIVE NODES
3099  */
3100  case T_Alias:
3101  retval = _equalAlias(a, b);
3102  break;
3103  case T_RangeVar:
3104  retval = _equalRangeVar(a, b);
3105  break;
3106  case T_TableFunc:
3107  retval = _equalTableFunc(a, b);
3108  break;
3109  case T_IntoClause:
3110  retval = _equalIntoClause(a, b);
3111  break;
3112  case T_Var:
3113  retval = _equalVar(a, b);
3114  break;
3115  case T_Const:
3116  retval = _equalConst(a, b);
3117  break;
3118  case T_Param:
3119  retval = _equalParam(a, b);
3120  break;
3121  case T_Aggref:
3122  retval = _equalAggref(a, b);
3123  break;
3124  case T_GroupingFunc:
3125  retval = _equalGroupingFunc(a, b);
3126  break;
3127  case T_WindowFunc:
3128  retval = _equalWindowFunc(a, b);
3129  break;
3130  case T_SubscriptingRef:
3131  retval = _equalSubscriptingRef(a, b);
3132  break;
3133  case T_FuncExpr:
3134  retval = _equalFuncExpr(a, b);
3135  break;
3136  case T_NamedArgExpr:
3137  retval = _equalNamedArgExpr(a, b);
3138  break;
3139  case T_OpExpr:
3140  retval = _equalOpExpr(a, b);
3141  break;
3142  case T_DistinctExpr:
3143  retval = _equalDistinctExpr(a, b);
3144  break;
3145  case T_NullIfExpr:
3146  retval = _equalNullIfExpr(a, b);
3147  break;
3148  case T_ScalarArrayOpExpr:
3149  retval = _equalScalarArrayOpExpr(a, b);
3150  break;
3151  case T_BoolExpr:
3152  retval = _equalBoolExpr(a, b);
3153  break;
3154  case T_SubLink:
3155  retval = _equalSubLink(a, b);
3156  break;
3157  case T_SubPlan:
3158  retval = _equalSubPlan(a, b);
3159  break;
3160  case T_AlternativeSubPlan:
3161  retval = _equalAlternativeSubPlan(a, b);
3162  break;
3163  case T_FieldSelect:
3164  retval = _equalFieldSelect(a, b);
3165  break;
3166  case T_FieldStore:
3167  retval = _equalFieldStore(a, b);
3168  break;
3169  case T_RelabelType:
3170  retval = _equalRelabelType(a, b);
3171  break;
3172  case T_CoerceViaIO:
3173  retval = _equalCoerceViaIO(a, b);
3174  break;
3175  case T_ArrayCoerceExpr:
3176  retval = _equalArrayCoerceExpr(a, b);
3177  break;
3178  case T_ConvertRowtypeExpr:
3179  retval = _equalConvertRowtypeExpr(a, b);
3180  break;
3181  case T_CollateExpr:
3182  retval = _equalCollateExpr(a, b);
3183  break;
3184  case T_CaseExpr:
3185  retval = _equalCaseExpr(a, b);
3186  break;
3187  case T_CaseWhen:
3188  retval = _equalCaseWhen(a, b);
3189  break;
3190  case T_CaseTestExpr:
3191  retval = _equalCaseTestExpr(a, b);
3192  break;
3193  case T_ArrayExpr:
3194  retval = _equalArrayExpr(a, b);
3195  break;
3196  case T_RowExpr:
3197  retval = _equalRowExpr(a, b);
3198  break;
3199  case T_RowCompareExpr:
3200  retval = _equalRowCompareExpr(a, b);
3201  break;
3202  case T_CoalesceExpr:
3203  retval = _equalCoalesceExpr(a, b);
3204  break;
3205  case T_MinMaxExpr:
3206  retval = _equalMinMaxExpr(a, b);
3207  break;
3208  case T_SQLValueFunction:
3209  retval = _equalSQLValueFunction(a, b);
3210  break;
3211  case T_XmlExpr:
3212  retval = _equalXmlExpr(a, b);
3213  break;
3214  case T_NullTest:
3215  retval = _equalNullTest(a, b);
3216  break;
3217  case T_BooleanTest:
3218  retval = _equalBooleanTest(a, b);
3219  break;
3220  case T_CoerceToDomain:
3221  retval = _equalCoerceToDomain(a, b);
3222  break;
3223  case T_CoerceToDomainValue:
3224  retval = _equalCoerceToDomainValue(a, b);
3225  break;
3226  case T_SetToDefault:
3227  retval = _equalSetToDefault(a, b);
3228  break;
3229  case T_CurrentOfExpr:
3230  retval = _equalCurrentOfExpr(a, b);
3231  break;
3232  case T_NextValueExpr:
3233  retval = _equalNextValueExpr(a, b);
3234  break;
3235  case T_InferenceElem:
3236  retval = _equalInferenceElem(a, b);
3237  break;
3238  case T_TargetEntry:
3239  retval = _equalTargetEntry(a, b);
3240  break;
3241  case T_RangeTblRef:
3242  retval = _equalRangeTblRef(a, b);
3243  break;
3244  case T_FromExpr:
3245  retval = _equalFromExpr(a, b);
3246  break;
3247  case T_OnConflictExpr:
3248  retval = _equalOnConflictExpr(a, b);
3249  break;
3250  case T_JoinExpr:
3251  retval = _equalJoinExpr(a, b);
3252  break;
3253 
3254  /*
3255  * RELATION NODES
3256  */
3257  case T_PathKey:
3258  retval = _equalPathKey(a, b);
3259  break;
3260  case T_RestrictInfo:
3261  retval = _equalRestrictInfo(a, b);
3262  break;
3263  case T_PlaceHolderVar:
3264  retval = _equalPlaceHolderVar(a, b);
3265  break;
3266  case T_SpecialJoinInfo:
3267  retval = _equalSpecialJoinInfo(a, b);
3268  break;
3269  case T_AppendRelInfo:
3270  retval = _equalAppendRelInfo(a, b);
3271  break;
3272  case T_PlaceHolderInfo:
3273  retval = _equalPlaceHolderInfo(a, b);
3274  break;
3275 
3276  case T_List:
3277  case T_IntList:
3278  case T_OidList:
3279  retval = _equalList(a, b);
3280  break;
3281 
3282  case T_Integer:
3283  case T_Float:
3284  case T_String:
3285  case T_BitString:
3286  case T_Null:
3287  retval = _equalValue(a, b);
3288  break;
3289 
3290  /*
3291  * EXTENSIBLE NODES
3292  */
3293  case T_ExtensibleNode:
3294  retval = _equalExtensibleNode(a, b);
3295  break;
3296 
3297  /*
3298  * PARSE NODES
3299  */
3300  case T_Query:
3301  retval = _equalQuery(a, b);
3302  break;
3303  case T_RawStmt:
3304  retval = _equalRawStmt(a, b);
3305  break;
3306  case T_InsertStmt:
3307  retval = _equalInsertStmt(a, b);
3308  break;
3309  case T_DeleteStmt:
3310  retval = _equalDeleteStmt(a, b);
3311  break;
3312  case T_UpdateStmt:
3313  retval = _equalUpdateStmt(a, b);
3314  break;
3315  case T_SelectStmt:
3316  retval = _equalSelectStmt(a, b);
3317  break;
3318  case T_SetOperationStmt:
3319  retval = _equalSetOperationStmt(a, b);
3320  break;
3321  case T_PLAssignStmt:
3322  retval = _equalPLAssignStmt(a, b);
3323  break;
3324  case T_AlterTableStmt:
3325  retval = _equalAlterTableStmt(a, b);
3326  break;
3327  case T_AlterTableCmd:
3328  retval = _equalAlterTableCmd(a, b);
3329  break;
3330  case T_AlterDomainStmt:
3331  retval = _equalAlterDomainStmt(a, b);
3332  break;
3333  case T_GrantStmt:
3334  retval = _equalGrantStmt(a, b);
3335  break;
3336  case T_GrantRoleStmt:
3337  retval = _equalGrantRoleStmt(a, b);
3338  break;
3340  retval = _equalAlterDefaultPrivilegesStmt(a, b);
3341  break;
3342  case T_DeclareCursorStmt:
3343  retval = _equalDeclareCursorStmt(a, b);
3344  break;
3345  case T_ClosePortalStmt:
3346  retval = _equalClosePortalStmt(a, b);
3347  break;
3348  case T_CallStmt:
3349  retval = _equalCallStmt(a, b);
3350  break;
3351  case T_ClusterStmt:
3352  retval = _equalClusterStmt(a, b);
3353  break;
3354  case T_CopyStmt:
3355  retval = _equalCopyStmt(a, b);
3356  break;
3357  case T_CreateStmt:
3358  retval = _equalCreateStmt(a, b);
3359  break;
3360  case T_TableLikeClause:
3361  retval = _equalTableLikeClause(a, b);
3362  break;
3363  case T_DefineStmt:
3364  retval = _equalDefineStmt(a, b);
3365  break;
3366  case T_DropStmt:
3367  retval = _equalDropStmt(a, b);
3368  break;
3369  case T_TruncateStmt:
3370  retval = _equalTruncateStmt(a, b);
3371  break;
3372  case T_CommentStmt:
3373  retval = _equalCommentStmt(a, b);
3374  break;
3375  case T_SecLabelStmt:
3376  retval = _equalSecLabelStmt(a, b);
3377  break;
3378  case T_FetchStmt:
3379  retval = _equalFetchStmt(a, b);
3380  break;
3381  case T_IndexStmt:
3382  retval = _equalIndexStmt(a, b);
3383  break;
3384  case T_CreateStatsStmt:
3385  retval = _equalCreateStatsStmt(a, b);
3386  break;
3387  case T_AlterStatsStmt:
3388  retval = _equalAlterStatsStmt(a, b);
3389  break;
3390  case T_CreateFunctionStmt:
3391  retval = _equalCreateFunctionStmt(a, b);
3392  break;
3393  case T_FunctionParameter:
3394  retval = _equalFunctionParameter(a, b);
3395  break;
3396  case T_AlterFunctionStmt:
3397  retval = _equalAlterFunctionStmt(a, b);
3398  break;
3399  case T_DoStmt:
3400  retval = _equalDoStmt(a, b);
3401  break;
3402  case T_RenameStmt:
3403  retval = _equalRenameStmt(a, b);
3404  break;
3406  retval = _equalAlterObjectDependsStmt(a, b);
3407  break;
3409  retval = _equalAlterObjectSchemaStmt(a, b);
3410  break;
3411  case T_AlterOwnerStmt:
3412  retval = _equalAlterOwnerStmt(a, b);
3413  break;
3414  case T_AlterOperatorStmt:
3415  retval = _equalAlterOperatorStmt(a, b);
3416  break;
3417  case T_AlterTypeStmt:
3418  retval = _equalAlterTypeStmt(a, b);
3419  break;
3420  case T_RuleStmt:
3421  retval = _equalRuleStmt(a, b);
3422  break;
3423  case T_NotifyStmt:
3424  retval = _equalNotifyStmt(a, b);
3425  break;
3426  case T_ListenStmt:
3427  retval = _equalListenStmt(a, b);
3428  break;
3429  case T_UnlistenStmt:
3430  retval = _equalUnlistenStmt(a, b);
3431  break;
3432  case T_TransactionStmt:
3433  retval = _equalTransactionStmt(a, b);
3434  break;
3435  case T_CompositeTypeStmt:
3436  retval = _equalCompositeTypeStmt(a, b);
3437  break;
3438  case T_CreateEnumStmt:
3439  retval = _equalCreateEnumStmt(a, b);
3440  break;
3441  case T_CreateRangeStmt:
3442  retval = _equalCreateRangeStmt(a, b);
3443  break;
3444  case T_AlterEnumStmt:
3445  retval = _equalAlterEnumStmt(a, b);
3446  break;
3447  case T_ViewStmt:
3448  retval = _equalViewStmt(a, b);
3449  break;
3450  case T_LoadStmt:
3451  retval = _equalLoadStmt(a, b);
3452  break;
3453  case T_CreateDomainStmt:
3454  retval = _equalCreateDomainStmt(a, b);
3455  break;
3456  case T_CreateOpClassStmt:
3457  retval = _equalCreateOpClassStmt(a, b);
3458  break;
3459  case T_CreateOpClassItem:
3460  retval = _equalCreateOpClassItem(a, b);
3461  break;
3462  case T_CreateOpFamilyStmt:
3463  retval = _equalCreateOpFamilyStmt(a, b);
3464  break;
3465  case T_AlterOpFamilyStmt:
3466  retval = _equalAlterOpFamilyStmt(a, b);
3467  break;
3468  case T_CreatedbStmt:
3469  retval = _equalCreatedbStmt(a, b);
3470  break;
3471  case T_AlterDatabaseStmt:
3472  retval = _equalAlterDatabaseStmt(a, b);
3473  break;
3475  retval = _equalAlterDatabaseSetStmt(a, b);
3476  break;
3477  case T_DropdbStmt:
3478  retval = _equalDropdbStmt(a, b);
3479  break;
3480  case T_VacuumStmt:
3481  retval = _equalVacuumStmt(a, b);
3482  break;
3483  case T_VacuumRelation:
3484  retval = _equalVacuumRelation(a, b);
3485  break;
3486  case T_ExplainStmt:
3487  retval = _equalExplainStmt(a, b);
3488  break;
3489  case T_CreateTableAsStmt:
3490  retval = _equalCreateTableAsStmt(a, b);
3491  break;
3492  case T_RefreshMatViewStmt:
3493  retval = _equalRefreshMatViewStmt(a, b);
3494  break;
3495  case T_ReplicaIdentityStmt:
3496  retval = _equalReplicaIdentityStmt(a, b);
3497  break;
3498  case T_AlterSystemStmt:
3499  retval = _equalAlterSystemStmt(a, b);
3500  break;
3501  case T_CreateSeqStmt:
3502  retval = _equalCreateSeqStmt(a, b);
3503  break;
3504  case T_AlterSeqStmt:
3505  retval = _equalAlterSeqStmt(a, b);
3506  break;
3507  case T_VariableSetStmt:
3508  retval = _equalVariableSetStmt(a, b);
3509  break;
3510  case T_VariableShowStmt:
3511  retval = _equalVariableShowStmt(a, b);
3512  break;
3513  case T_DiscardStmt:
3514  retval = _equalDiscardStmt(a, b);
3515  break;
3517  retval = _equalCreateTableSpaceStmt(a, b);
3518  break;
3519  case T_DropTableSpaceStmt:
3520  retval = _equalDropTableSpaceStmt(a, b);
3521  break;
3523  retval = _equalAlterTableSpaceOptionsStmt(a, b);
3524  break;
3526  retval = _equalAlterTableMoveAllStmt(a, b);
3527  break;
3528  case T_CreateExtensionStmt:
3529  retval = _equalCreateExtensionStmt(a, b);
3530  break;
3531  case T_AlterExtensionStmt:
3532  retval = _equalAlterExtensionStmt(a, b);
3533  break;
3535  retval = _equalAlterExtensionContentsStmt(a, b);
3536  break;
3537  case T_CreateFdwStmt:
3538  retval = _equalCreateFdwStmt(a, b);
3539  break;
3540  case T_AlterFdwStmt:
3541  retval = _equalAlterFdwStmt(a, b);
3542  break;
3544  retval = _equalCreateForeignServerStmt(a, b);
3545  break;
3547  retval = _equalAlterForeignServerStmt(a, b);
3548  break;
3550  retval = _equalCreateUserMappingStmt(a, b);
3551  break;
3553  retval = _equalAlterUserMappingStmt(a, b);
3554  break;
3555  case T_DropUserMappingStmt:
3556  retval = _equalDropUserMappingStmt(a, b);
3557  break;
3559  retval = _equalCreateForeignTableStmt(a, b);
3560  break;
3562  retval = _equalImportForeignSchemaStmt(a, b);
3563  break;
3564  case T_CreateTransformStmt:
3565  retval = _equalCreateTransformStmt(a, b);
3566  break;
3567  case T_CreateAmStmt:
3568  retval = _equalCreateAmStmt(a, b);
3569  break;
3570  case T_CreateTrigStmt:
3571  retval = _equalCreateTrigStmt(a, b);
3572  break;
3573  case T_CreateEventTrigStmt:
3574  retval = _equalCreateEventTrigStmt(a, b);
3575  break;
3576  case T_AlterEventTrigStmt:
3577  retval = _equalAlterEventTrigStmt(a, b);
3578  break;
3579  case T_CreatePLangStmt:
3580  retval = _equalCreatePLangStmt(a, b);
3581  break;
3582  case T_CreateRoleStmt:
3583  retval = _equalCreateRoleStmt(a, b);
3584  break;
3585  case T_AlterRoleStmt:
3586  retval = _equalAlterRoleStmt(a, b);
3587  break;
3588  case T_AlterRoleSetStmt:
3589  retval = _equalAlterRoleSetStmt(a, b);
3590  break;
3591  case T_DropRoleStmt:
3592  retval = _equalDropRoleStmt(a, b);
3593  break;
3594  case T_LockStmt:
3595  retval = _equalLockStmt(a, b);
3596  break;
3597  case T_ConstraintsSetStmt:
3598  retval = _equalConstraintsSetStmt(a, b);
3599  break;
3600  case T_ReindexStmt:
3601  retval = _equalReindexStmt(a, b);
3602  break;
3603  case T_CheckPointStmt:
3604  retval = true;
3605  break;
3606  case T_CreateSchemaStmt:
3607  retval = _equalCreateSchemaStmt(a, b);
3608  break;
3610  retval = _equalCreateConversionStmt(a, b);
3611  break;
3612  case T_CreateCastStmt:
3613  retval = _equalCreateCastStmt(a, b);
3614  break;
3615  case T_PrepareStmt:
3616  retval = _equalPrepareStmt(a, b);
3617  break;
3618  case T_ExecuteStmt:
3619  retval = _equalExecuteStmt(a, b);
3620  break;
3621  case T_DeallocateStmt:
3622  retval = _equalDeallocateStmt(a, b);
3623  break;
3624  case T_DropOwnedStmt:
3625  retval = _equalDropOwnedStmt(a, b);
3626  break;
3627  case T_ReassignOwnedStmt:
3628  retval = _equalReassignOwnedStmt(a, b);
3629  break;
3631  retval = _equalAlterTSDictionaryStmt(a, b);
3632  break;
3634  retval = _equalAlterTSConfigurationStmt(a, b);
3635  break;
3636  case T_CreatePolicyStmt:
3637  retval = _equalCreatePolicyStmt(a, b);
3638  break;
3639  case T_AlterPolicyStmt:
3640  retval = _equalAlterPolicyStmt(a, b);
3641  break;
3643  retval = _equalCreatePublicationStmt(a, b);
3644  break;
3646  retval = _equalAlterPublicationStmt(a, b);
3647  break;
3649  retval = _equalCreateSubscriptionStmt(a, b);
3650  break;
3652  retval = _equalAlterSubscriptionStmt(a, b);
3653  break;
3655  retval = _equalDropSubscriptionStmt(a, b);
3656  break;
3657  case T_A_Expr:
3658  retval = _equalAExpr(a, b);
3659  break;
3660  case T_ColumnRef:
3661  retval = _equalColumnRef(a, b);
3662  break;
3663  case T_ParamRef:
3664  retval = _equalParamRef(a, b);
3665  break;
3666  case T_A_Const:
3667  retval = _equalAConst(a, b);
3668  break;
3669  case T_FuncCall:
3670  retval = _equalFuncCall(a, b);
3671  break;
3672  case T_A_Star:
3673  retval = _equalAStar(a, b);
3674  break;
3675  case T_A_Indices:
3676  retval = _equalAIndices(a, b);
3677  break;
3678  case T_A_Indirection:
3679  retval = _equalA_Indirection(a, b);
3680  break;
3681  case T_A_ArrayExpr:
3682  retval = _equalA_ArrayExpr(a, b);
3683  break;
3684  case T_ResTarget:
3685  retval = _equalResTarget(a, b);
3686  break;
3687  case T_MultiAssignRef:
3688  retval = _equalMultiAssignRef(a, b);
3689  break;
3690  case T_TypeCast:
3691  retval = _equalTypeCast(a, b);
3692  break;
3693  case T_CollateClause:
3694  retval = _equalCollateClause(a, b);
3695  break;
3696  case T_SortBy:
3697  retval = _equalSortBy(a, b);
3698  break;
3699  case T_WindowDef:
3700  retval = _equalWindowDef(a, b);
3701  break;
3702  case T_RangeSubselect:
3703  retval = _equalRangeSubselect(a, b);
3704  break;
3705  case T_RangeFunction:
3706  retval = _equalRangeFunction(a, b);
3707  break;
3708  case T_RangeTableSample:
3709  retval = _equalRangeTableSample(a, b);
3710  break;
3711  case T_RangeTableFunc:
3712  retval = _equalRangeTableFunc(a, b);
3713  break;
3714  case T_RangeTableFuncCol:
3715  retval = _equalRangeTableFuncCol(a, b);
3716  break;
3717  case T_TypeName:
3718  retval = _equalTypeName(a, b);
3719  break;
3720  case T_IndexElem:
3721  retval = _equalIndexElem(a, b);
3722  break;
3723  case T_ColumnDef:
3724  retval = _equalColumnDef(a, b);
3725  break;
3726  case T_Constraint:
3727  retval = _equalConstraint(a, b);
3728  break;
3729  case T_DefElem:
3730  retval = _equalDefElem(a, b);
3731  break;
3732  case T_LockingClause:
3733  retval = _equalLockingClause(a, b);
3734  break;
3735  case T_RangeTblEntry:
3736  retval = _equalRangeTblEntry(a, b);
3737  break;
3738  case T_RangeTblFunction:
3739  retval = _equalRangeTblFunction(a, b);
3740  break;
3741  case T_TableSampleClause:
3742  retval = _equalTableSampleClause(a, b);
3743  break;
3744  case T_WithCheckOption:
3745  retval = _equalWithCheckOption(a, b);
3746  break;
3747  case T_SortGroupClause:
3748  retval = _equalSortGroupClause(a, b);
3749  break;
3750  case T_GroupingSet:
3751  retval = _equalGroupingSet(a, b);
3752  break;
3753  case T_WindowClause:
3754  retval = _equalWindowClause(a, b);
3755  break;
3756  case T_RowMarkClause:
3757  retval = _equalRowMarkClause(a, b);
3758  break;
3759  case T_WithClause:
3760  retval = _equalWithClause(a, b);
3761  break;
3762  case T_InferClause:
3763  retval = _equalInferClause(a, b);
3764  break;
3765  case T_OnConflictClause:
3766  retval = _equalOnConflictClause(a, b);
3767  break;
3768  case T_CTESearchClause:
3769  retval = _equalCTESearchClause(a, b);
3770  break;
3771  case T_CTECycleClause:
3772  retval = _equalCTECycleClause(a, b);
3773  break;
3774  case T_CommonTableExpr:
3775  retval = _equalCommonTableExpr(a, b);
3776  break;
3777  case T_ObjectWithArgs:
3778  retval = _equalObjectWithArgs(a, b);
3779  break;
3780  case T_AccessPriv:
3781  retval = _equalAccessPriv(a, b);
3782  break;
3783  case T_XmlSerialize:
3784  retval = _equalXmlSerialize(a, b);
3785  break;
3786  case T_RoleSpec:
3787  retval = _equalRoleSpec(a, b);
3788  break;
3789  case T_TriggerTransition:
3790  retval = _equalTriggerTransition(a, b);
3791  break;
3792  case T_PartitionElem:
3793  retval = _equalPartitionElem(a, b);
3794  break;
3795  case T_PartitionSpec:
3796  retval = _equalPartitionSpec(a, b);
3797  break;
3798  case T_PartitionBoundSpec:
3799  retval = _equalPartitionBoundSpec(a, b);
3800  break;
3801  case T_PartitionRangeDatum:
3802  retval = _equalPartitionRangeDatum(a, b);
3803  break;
3804  case T_PartitionCmd:
3805  retval = _equalPartitionCmd(a, b);
3806  break;
3807 
3808  default:
3809  elog(ERROR, "unrecognized node type: %d",
3810  (int) nodeTag(a));
3811  retval = false; /* keep compiler quiet */
3812  break;
3813  }
3814 
3815  return retval;
3816 }
static bool _equalDropUserMappingStmt(const DropUserMappingStmt *a, const DropUserMappingStmt *b)
Definition: equalfuncs.c:1972
Datum constvalue
Definition: primnodes.h:214
static bool _equalWindowDef(const WindowDef *a, const WindowDef *b)
Definition: equalfuncs.c:2504
static bool _equalDiscardStmt(const DiscardStmt *a, const DiscardStmt *b)
Definition: equalfuncs.c:1825
static bool _equalAlterFdwStmt(const AlterFdwStmt *a, const AlterFdwStmt *b)
Definition: equalfuncs.c:1917
static bool _equalParamRef(const ParamRef *a, const ParamRef *b)
Definition: equalfuncs.c:2365
static bool _equalListenStmt(const ListenStmt *a, const ListenStmt *b)
Definition: equalfuncs.c:1531
static bool _equalAlterDomainStmt(const AlterDomainStmt *a, const AlterDomainStmt *b)
Definition: equalfuncs.c:1126
static bool _equalConstraintsSetStmt(const ConstraintsSetStmt *a, const ConstraintsSetStmt *b)
Definition: equalfuncs.c:2133
static PgChecksumMode mode
Definition: pg_checksums.c:61
static bool _equalScalarArrayOpExpr(const ScalarArrayOpExpr *a, const ScalarArrayOpExpr *b)
Definition: equalfuncs.c:396
static bool _equalAlterTableCmd(const AlterTableCmd *a, const AlterTableCmd *b)
Definition: equalfuncs.c:1112
Datum boolop(PG_FUNCTION_ARGS)
Definition: _int_bool.c:419
static bool _equalCreateEnumStmt(const CreateEnumStmt *a, const CreateEnumStmt *b)
Definition: equalfuncs.c:1568
static bool _equalCreateTableAsStmt(const CreateTableAsStmt *a, const CreateTableAsStmt *b)
Definition: equalfuncs.c:1743
static bool _equalAlterDatabaseStmt(const AlterDatabaseStmt *a, const AlterDatabaseStmt *b)
Definition: equalfuncs.c:1686
static bool _equalViewStmt(const ViewStmt *a, const ViewStmt *b)
Definition: equalfuncs.c:1599
static bool _equalDropStmt(const DropStmt *a, const DropStmt *b)
Definition: equalfuncs.c:1291
static bool _equalVacuumRelation(const VacuumRelation *a, const VacuumRelation *b)
Definition: equalfuncs.c:1724
static bool _equalCollateExpr(const CollateExpr *a, const CollateExpr *b)
Definition: equalfuncs.c:547
#define forboth(cell1, list1, cell2, list2)
Definition: pg_list.h:446
static bool _equalGroupingSet(const GroupingSet *a, const GroupingSet *b)
Definition: equalfuncs.c:2770
static bool _equalSortGroupClause(const SortGroupClause *a, const SortGroupClause *b)
Definition: equalfuncs.c:2758
static bool _equalCreateFdwStmt(const CreateFdwStmt *a, const CreateFdwStmt *b)
Definition: equalfuncs.c:1907
static bool _equalTargetEntry(const TargetEntry *a, const TargetEntry *b)
Definition: equalfuncs.c:764
bool constbyval
Definition: primnodes.h:217
static bool _equalBooleanTest(const BooleanTest *a, const BooleanTest *b)
Definition: equalfuncs.c:690
int num_child_cols
Definition: pathnodes.h:2286
bool equal(const void *a, const void *b)
Definition: equalfuncs.c:3073
#define COMPARE_STRING_FIELD(fldname)
Definition: equalfuncs.c:67
static bool _equalMinMaxExpr(const MinMaxExpr *a, const MinMaxExpr *b)
Definition: equalfuncs.c:639
static bool _equalCTECycleClause(const CTECycleClause *a, const CTECycleClause *b)
Definition: equalfuncs.c:2856
static bool _equalTriggerTransition(const TriggerTransition *a, const TriggerTransition *b)
Definition: equalfuncs.c:2914
static bool _equalCreateAmStmt(const CreateAmStmt *a, const CreateAmStmt *b)
Definition: equalfuncs.c:2019
static bool _equalAccessPriv(const AccessPriv *a, const AccessPriv *b)
Definition: equalfuncs.c:1165
static bool _equalVariableSetStmt(const VariableSetStmt *a, const VariableSetStmt *b)
Definition: equalfuncs.c:1806
static bool _equalDropTableSpaceStmt(const DropTableSpaceStmt *a, const DropTableSpaceStmt *b)
Definition: equalfuncs.c:1844
static bool _equalCoerceViaIO(const CoerceViaIO *a, const CoerceViaIO *b)
Definition: equalfuncs.c:510
static bool _equalRowExpr(const RowExpr *a, const RowExpr *b)
Definition: equalfuncs.c:603
static bool _equalReindexStmt(const ReindexStmt *a, const ReindexStmt *b)
Definition: equalfuncs.c:2142
static bool _equalPrepareStmt(const PrepareStmt *a, const PrepareStmt *b)
Definition: equalfuncs.c:2188
static bool _equalTypeName(const TypeName *a, const TypeName *b)
Definition: equalfuncs.c:2457
static bool _equalOnConflictClause(const OnConflictClause *a, const OnConflictClause *b)
Definition: equalfuncs.c:2833
static bool _equalExecuteStmt(const ExecuteStmt *a, const ExecuteStmt *b)
Definition: equalfuncs.c:2198
static bool _equalExtensibleNode(const ExtensibleNode *a, const ExtensibleNode *b)
Definition: equalfuncs.c:934
static bool _equalCommonTableExpr(const CommonTableExpr *a, const CommonTableExpr *b)
Definition: equalfuncs.c:2873
static bool _equalAlterTypeStmt(const AlterTypeStmt *a, const AlterTypeStmt *b)
Definition: equalfuncs.c:1499
#define COMPARE_BITMAPSET_FIELD(fldname)
Definition: equalfuncs.c:60
static bool _equalVar(const Var *a, const Var *b)
Definition: equalfuncs.c:163
bool datumIsEqual(Datum value1, Datum value2, bool typByVal, int typLen)
Definition: datum.c:222
static bool _equalCreateCastStmt(const CreateCastStmt *a, const CreateCastStmt *b)
Definition: equalfuncs.c:2176
static bool _equalUpdateStmt(const UpdateStmt *a, const UpdateStmt *b)
Definition: equalfuncs.c:1035
static bool _equalArrayExpr(const ArrayExpr *a, const ArrayExpr *b)
Definition: equalfuncs.c:590
static bool _equalCreateTrigStmt(const CreateTrigStmt *a, const CreateTrigStmt *b)
Definition: equalfuncs.c:2029
static bool _equalIndexElem(const IndexElem *a, const IndexElem *b)
Definition: equalfuncs.c:2583
#define COMPARE_POINTER_FIELD(fldname, sz)
Definition: equalfuncs.c:78
static bool _equalArrayCoerceExpr(const ArrayCoerceExpr *a, const ArrayCoerceExpr *b)
Definition: equalfuncs.c:522
static bool _equalTransactionStmt(const TransactionStmt *a, const TransactionStmt *b)
Definition: equalfuncs.c:1547
static bool _equalReplicaIdentityStmt(const ReplicaIdentityStmt *a, const ReplicaIdentityStmt *b)
Definition: equalfuncs.c:1765
static bool _equalInferClause(const InferClause *a, const InferClause *b)
Definition: equalfuncs.c:2822
#define COMPARE_COERCIONFORM_FIELD(fldname)
Definition: equalfuncs.c:89
static bool _equalCaseWhen(const CaseWhen *a, const CaseWhen *b)
Definition: equalfuncs.c:570
static bool _equalRoleSpec(const RoleSpec *a, const RoleSpec *b)
Definition: equalfuncs.c:2904
static bool _equalPathKey(const PathKey *a, const PathKey *b)
Definition: equalfuncs.c:829
static bool _equalDropRoleStmt(const DropRoleStmt *a, const DropRoleStmt *b)
Definition: equalfuncs.c:2114
static bool _equalRangeTableFuncCol(const RangeTableFuncCol *a, const RangeTableFuncCol *b)
Definition: equalfuncs.c:2568
static bool _equalGrantRoleStmt(const GrantRoleStmt *a, const GrantRoleStmt *b)
Definition: equalfuncs.c:1174
static bool _equalAlterFunctionStmt(const AlterFunctionStmt *a, const AlterFunctionStmt *b)
Definition: equalfuncs.c:1422
static bool _equalCallStmt(const CallStmt *a, const CallStmt *b)
Definition: equalfuncs.c:1214
static bool _equalAlterOpFamilyStmt(const AlterOpFamilyStmt *a, const AlterOpFamilyStmt *b)
Definition: equalfuncs.c:1666
static bool _equalCreatedbStmt(const CreatedbStmt *a, const CreatedbStmt *b)
Definition: equalfuncs.c:1677
NameData relname
Definition: pg_class.h:38
static bool _equalAppendRelInfo(const AppendRelInfo *a, const AppendRelInfo *b)
Definition: equalfuncs.c:903
Definition: primnodes.h:181
NameData subname
static bool _equalAlterRoleSetStmt(const AlterRoleSetStmt *a, const AlterRoleSetStmt *b)
Definition: equalfuncs.c:2104
static bool _equalReassignOwnedStmt(const ReassignOwnedStmt *a, const ReassignOwnedStmt *b)
Definition: equalfuncs.c:2224
static bool _equalTruncateStmt(const TruncateStmt *a, const TruncateStmt *b)
Definition: equalfuncs.c:1303
static bool _equalSelectStmt(const SelectStmt *a, const SelectStmt *b)
Definition: equalfuncs.c:1048
static bool _equalRangeTblRef(const RangeTblRef *a, const RangeTblRef *b)
Definition: equalfuncs.c:778
static bool _equalCoerceToDomain(const CoerceToDomain *a, const CoerceToDomain *b)
Definition: equalfuncs.c:700
static bool _equalUnlistenStmt(const UnlistenStmt *a, const UnlistenStmt *b)
Definition: equalfuncs.c:1539
static bool _equalSubscriptingRef(const SubscriptingRef *a, const SubscriptingRef *b)
Definition: equalfuncs.c:275
static bool _equalDropdbStmt(const DropdbStmt *a, const DropdbStmt *b)
Definition: equalfuncs.c:1704
static bool _equalAlterSeqStmt(const AlterSeqStmt *a, const AlterSeqStmt *b)
Definition: equalfuncs.c:1795
static bool _equalAlterObjectSchemaStmt(const AlterObjectSchemaStmt *a, const AlterObjectSchemaStmt *b)
Definition: equalfuncs.c:1467
static bool _equalCreateExtensionStmt(const CreateExtensionStmt *a, const CreateExtensionStmt *b)
Definition: equalfuncs.c:1877
static bool _equalAlterOperatorStmt(const AlterOperatorStmt *a, const AlterOperatorStmt *b)
Definition: equalfuncs.c:1490
static bool _equalTableLikeClause(const TableLikeClause *a, const TableLikeClause *b)
Definition: equalfuncs.c:1267
static bool _equalAlterDatabaseSetStmt(const AlterDatabaseSetStmt *a, const AlterDatabaseSetStmt *b)
Definition: equalfuncs.c:1695
static bool _equalParam(const Param *a, const Param *b)
Definition: equalfuncs.c:204
static bool _equalDefElem(const DefElem *a, const DefElem *b)
Definition: equalfuncs.c:2657
static bool _equalPartitionBoundSpec(const PartitionBoundSpec *a, const PartitionBoundSpec *b)
Definition: equalfuncs.c:2946
static struct @141 value
static bool _equalSortBy(const SortBy *a, const SortBy *b)
Definition: equalfuncs.c:2492
static bool _equalRelabelType(const RelabelType *a, const RelabelType *b)
Definition: equalfuncs.c:497
static bool _equalAlterTSDictionaryStmt(const AlterTSDictionaryStmt *a, const AlterTSDictionaryStmt *b)
Definition: equalfuncs.c:2233
static bool _equalCollateClause(const CollateClause *a, const CollateClause *b)
Definition: equalfuncs.c:2482
int constlen
Definition: primnodes.h:213
static bool _equalAlterStatsStmt(const AlterStatsStmt *a, const AlterStatsStmt *b)
Definition: equalfuncs.c:1388
static bool _equalAlterExtensionStmt(const AlterExtensionStmt *a, const AlterExtensionStmt *b)
Definition: equalfuncs.c:1887
static bool _equalCreateOpFamilyStmt(const CreateOpFamilyStmt *a, const CreateOpFamilyStmt *b)
Definition: equalfuncs.c:1657
static bool _equalWithCheckOption(const WithCheckOption *a, const WithCheckOption *b)
Definition: equalfuncs.c:2746
static bool _equalAExpr(const A_Expr *a, const A_Expr *b)
Definition: equalfuncs.c:2344
static bool _equalSecLabelStmt(const SecLabelStmt *a, const SecLabelStmt *b)
Definition: equalfuncs.c:1323
static bool _equalFunctionParameter(const FunctionParameter *a, const FunctionParameter *b)
Definition: equalfuncs.c:1411
static bool _equalAlterExtensionContentsStmt(const AlterExtensionContentsStmt *a, const AlterExtensionContentsStmt *b)
Definition: equalfuncs.c:1896
static bool _equalCoalesceExpr(const CoalesceExpr *a, const CoalesceExpr *b)
Definition: equalfuncs.c:628
static bool _equalJoinExpr(const JoinExpr *a, const JoinExpr *b)
Definition: equalfuncs.c:786
static bool _equalSubLink(const SubLink *a, const SubLink *b)
Definition: equalfuncs.c:430
static bool _equalRangeTblFunction(const RangeTblFunction *a, const RangeTblFunction *b)
Definition: equalfuncs.c:2722
static bool _equalCreateStatsStmt(const CreateStatsStmt *a, const CreateStatsStmt *b)
Definition: equalfuncs.c:1375
#define ERROR
Definition: elog.h:45
static bool _equalVariableShowStmt(const VariableShowStmt *a, const VariableShowStmt *b)
Definition: equalfuncs.c:1817
static bool _equalCaseExpr(const CaseExpr *a, const CaseExpr *b)
Definition: equalfuncs.c:557
#define lfirst_int(lc)
Definition: pg_list.h:170
static bool _equalList(const List *a, const List *b)
Definition: equalfuncs.c:2984
static bool _equalAlterObjectDependsStmt(const AlterObjectDependsStmt *a, const AlterObjectDependsStmt *b)
Definition: equalfuncs.c:1455
static JitProviderCallbacks provider
Definition: jit.c:43
static bool _equalNamedArgExpr(const NamedArgExpr *a, const NamedArgExpr *b)
Definition: equalfuncs.c:307
static bool _equalAlterEnumStmt(const AlterEnumStmt *a, const AlterEnumStmt *b)
Definition: equalfuncs.c:1586
static bool _equalAlterTableStmt(const AlterTableStmt *a, const AlterTableStmt *b)
Definition: equalfuncs.c:1101
static bool _equalPartitionCmd(const PartitionCmd *a, const PartitionCmd *b)
Definition: equalfuncs.c:2971
static bool _equalIntoClause(const IntoClause *a, const IntoClause *b)
Definition: equalfuncs.c:141
static bool _equalCreateConversionStmt(const CreateConversionStmt *a, const CreateConversionStmt *b)
Definition: equalfuncs.c:2164
static bool _equalRangeTableSample(const RangeTableSample *a, const RangeTableSample *b)
Definition: equalfuncs.c:2542
static bool _equalCreateFunctionStmt(const CreateFunctionStmt *a, const CreateFunctionStmt *b)
Definition: equalfuncs.c:1398
Definition: nodes.h:151
void check_stack_depth(void)
Definition: postgres.c:3310
static bool _equalPartitionSpec(const PartitionSpec *a, const PartitionSpec *b)
Definition: equalfuncs.c:2936
static bool _equalCreatePLangStmt(const CreatePLangStmt *a, const CreatePLangStmt *b)
Definition: equalfuncs.c:2071
static bool _equalDistinctExpr(const DistinctExpr *a, const DistinctExpr *b)
Definition: equalfuncs.c:344
static bool _equalRowCompareExpr(const RowCompareExpr *a, const RowCompareExpr *b)
Definition: equalfuncs.c:615
static bool _equalPLAssignStmt(const PLAssignStmt *a, const PLAssignStmt *b)
Definition: equalfuncs.c:1089
static bool _equalAlterForeignServerStmt(const AlterForeignServerStmt *a, const AlterForeignServerStmt *b)
Definition: equalfuncs.c:1940
static bool _equalCoerceToDomainValue(const CoerceToDomainValue *a, const CoerceToDomainValue *b)
Definition: equalfuncs.c:713
static bool _equalAlterDefaultPrivilegesStmt(const AlterDefaultPrivilegesStmt *a, const AlterDefaultPrivilegesStmt *b)
Definition: equalfuncs.c:1187
static bool _equalAlias(const Alias *a, const Alias *b)
Definition: equalfuncs.c:98
static bool _equalWindowClause(const WindowClause *a, const WindowClause *b)
Definition: equalfuncs.c:2780
static bool _equalCurrentOfExpr(const CurrentOfExpr *a, const CurrentOfExpr *b)
Definition: equalfuncs.c:735
static bool _equalOpExpr(const OpExpr *a, const OpExpr *b)
Definition: equalfuncs.c:318
static bool _equalSetToDefault(const SetToDefault *a, const SetToDefault *b)
Definition: equalfuncs.c:724
static bool _equalFuncCall(const FuncCall *a, const FuncCall *b)
Definition: equalfuncs.c:2384
static bool _equalAlterEventTrigStmt(const AlterEventTrigStmt *a, const AlterEventTrigStmt *b)
Definition: equalfuncs.c:2062
static bool _equalQuery(const Query *a, const Query *b)
Definition: equalfuncs.c:955
static bool _equalConstraint(const Constraint *a, const Constraint *b)
Definition: equalfuncs.c:2622
static bool _equalCreateUserMappingStmt(const CreateUserMappingStmt *a, const CreateUserMappingStmt *b)
Definition: equalfuncs.c:1951
static bool _equalAlterTSConfigurationStmt(const AlterTSConfigurationStmt *a, const AlterTSConfigurationStmt *b)
Definition: equalfuncs.c:2242
static bool _equalCaseTestExpr(const CaseTestExpr *a, const CaseTestExpr *b)
Definition: equalfuncs.c:580
static bool _equalLoadStmt(const LoadStmt *a, const LoadStmt *b)
Definition: equalfuncs.c:1612
static bool _equalSQLValueFunction(const SQLValueFunction *a, const SQLValueFunction *b)
Definition: equalfuncs.c:652
static bool _equalCreateForeignServerStmt(const CreateForeignServerStmt *a, const CreateForeignServerStmt *b)
Definition: equalfuncs.c:1927
static bool _equalImportForeignSchemaStmt(const ImportForeignSchemaStmt *a, const ImportForeignSchemaStmt *b)
Definition: equalfuncs.c:1994
static bool _equalNullTest(const NullTest *a, const NullTest *b)
Definition: equalfuncs.c:679
static bool _equalPartitionRangeDatum(const PartitionRangeDatum *a, const PartitionRangeDatum *b)
Definition: equalfuncs.c:2961
static bool _equalInferenceElem(const InferenceElem *a, const InferenceElem *b)
Definition: equalfuncs.c:754
static bool _equalRangeTableFunc(const RangeTableFunc *a, const RangeTableFunc *b)
Definition: equalfuncs.c:2554
static bool _equalDoStmt(const DoStmt *a, const DoStmt *b)
Definition: equalfuncs.c:1432
static bool _equalSubPlan(const SubPlan *a, const SubPlan *b)
Definition: equalfuncs.c:443
static bool _equalAlterSubscriptionStmt(const AlterSubscriptionStmt *a, const AlterSubscriptionStmt *b)
Definition: equalfuncs.c:2294
Definition: nodes.h:301
static bool _equalCreateTableSpaceStmt(const CreateTableSpaceStmt *a, const CreateTableSpaceStmt *b)
Definition: equalfuncs.c:1833
static bool _equalNullIfExpr(const NullIfExpr *a, const NullIfExpr *b)
Definition: equalfuncs.c:370
static bool _equalPlaceHolderVar(const PlaceHolderVar *a, const PlaceHolderVar *b)
Definition: equalfuncs.c:860
static bool _equalNotifyStmt(const NotifyStmt *a, const NotifyStmt *b)
Definition: equalfuncs.c:1522
Definition: nodes.h:156
static bool _equalPartitionElem(const PartitionElem *a, const PartitionElem *b)
Definition: equalfuncs.c:2924
static bool _equalRawStmt(const RawStmt *a, const RawStmt *b)
Definition: equalfuncs.c:999
Definition: nodes.h:155
static bool _equalSpecialJoinInfo(const SpecialJoinInfo *a, const SpecialJoinInfo *b)
Definition: equalfuncs.c:885
static bool _equalAlterRoleStmt(const AlterRoleStmt *a, const AlterRoleStmt *b)
Definition: equalfuncs.c:2094
static bool _equalA_Indirection(const A_Indirection *a, const A_Indirection *b)
Definition: equalfuncs.c:2418
static bool _equalCreateRangeStmt(const CreateRangeStmt *a, const CreateRangeStmt *b)
Definition: equalfuncs.c:1577
Definition: nodes.h:314
static bool _equalCreateRoleStmt(const CreateRoleStmt *a, const CreateRoleStmt *b)
Definition: equalfuncs.c:2084
static bool _equalAlterPolicyStmt(const AlterPolicyStmt *a, const AlterPolicyStmt *b)
Definition: equalfuncs.c:2332
static bool _equalRuleStmt(const RuleStmt *a, const RuleStmt *b)
Definition: equalfuncs.c:1508
static bool _equalAlternativeSubPlan(const AlternativeSubPlan *a, const AlternativeSubPlan *b)
Definition: equalfuncs.c:466
static bool _equalFromExpr(const FromExpr *a, const FromExpr *b)
Definition: equalfuncs.c:801
static bool _equalCreateDomainStmt(const CreateDomainStmt *a, const CreateDomainStmt *b)
Definition: equalfuncs.c:1620
Oid opfuncid
Definition: primnodes.h:538
static char * label
static bool _equalBoolExpr(const BoolExpr *a, const BoolExpr *b)
Definition: equalfuncs.c:420
static bool _equalExplainStmt(const ExplainStmt *a, const ExplainStmt *b)
Definition: equalfuncs.c:1734
static bool _equalVacuumStmt(const VacuumStmt *a, const VacuumStmt *b)
Definition: equalfuncs.c:1714
static bool _equalCreatePublicationStmt(const CreatePublicationStmt *a, const CreatePublicationStmt *b)
Definition: equalfuncs.c:2257
static bool _equalCreateTransformStmt(const CreateTransformStmt *a, const CreateTransformStmt *b)
Definition: equalfuncs.c:2007
const char * extnodename
Definition: extensible.h:35
static bool _equalDeleteStmt(const DeleteStmt *a, const DeleteStmt *b)
Definition: equalfuncs.c:1023
static bool _equalSetOperationStmt(const SetOperationStmt *a, const SetOperationStmt *b)
Definition: equalfuncs.c:1074
static bool _equalDeclareCursorStmt(const DeclareCursorStmt *a, const DeclareCursorStmt *b)
Definition: equalfuncs.c:1196
static bool _equalAlterPublicationStmt(const AlterPublicationStmt *a, const AlterPublicationStmt *b)
Definition: equalfuncs.c:2269
static bool _equalLockingClause(const LockingClause *a, const LockingClause *b)
Definition: equalfuncs.c:2669
static bool _equalTypeCast(const TypeCast *a, const TypeCast *b)
Definition: equalfuncs.c:2472
static bool _equalCreateSeqStmt(const CreateSeqStmt *a, const CreateSeqStmt *b)
Definition: equalfuncs.c:1783
#define Assert(condition)
Definition: c.h:804
#define lfirst(lc)
Definition: pg_list.h:169
static bool _equalWindowFunc(const WindowFunc *a, const WindowFunc *b)
Definition: equalfuncs.c:258
static bool _equalAlterTableSpaceOptionsStmt(const AlterTableSpaceOptionsStmt *a, const AlterTableSpaceOptionsStmt *b)
Definition: equalfuncs.c:1853
Definition: value.h:42
static bool _equalDropSubscriptionStmt(const DropSubscriptionStmt *a, const DropSubscriptionStmt *b)
Definition: equalfuncs.c:2307
static bool _equalFieldStore(const FieldStore *a, const FieldStore *b)
Definition: equalfuncs.c:486
static bool _equalPlaceHolderInfo(const PlaceHolderInfo *a, const PlaceHolderInfo *b)
Definition: equalfuncs.c:918
#define COMPARE_LOCATION_FIELD(fldname)
Definition: equalfuncs.c:85
static bool _equalResTarget(const ResTarget *a, const ResTarget *b)
Definition: equalfuncs.c:2436
static bool _equalTableFunc(const TableFunc *a, const TableFunc *b)
Definition: equalfuncs.c:121
static rewind_source * source
Definition: pg_rewind.c:79
static bool _equalCreatePolicyStmt(const CreatePolicyStmt *a, const CreatePolicyStmt *b)
Definition: equalfuncs.c:2318
char * dbname
Definition: streamutil.c:51
static bool _equalDropOwnedStmt(const DropOwnedStmt *a, const DropOwnedStmt *b)
Definition: equalfuncs.c:2215
static bool _equalCTESearchClause(const CTESearchClause *a, const CTESearchClause *b)
Definition: equalfuncs.c:2845
static bool _equalXmlExpr(const XmlExpr *a, const XmlExpr *b)
Definition: equalfuncs.c:663
static const struct fns functions
Definition: regcomp.c:314
static bool _equalNextValueExpr(const NextValueExpr *a, const NextValueExpr *b)
Definition: equalfuncs.c:745
static bool _equalValue(const Value *a, const Value *b)
Definition: equalfuncs.c:3043
static bool _equalAlterUserMappingStmt(const AlterUserMappingStmt *a, const AlterUserMappingStmt *b)
Definition: equalfuncs.c:1962
static bool _equalCompositeTypeStmt(const CompositeTypeStmt *a, const CompositeTypeStmt *b)
Definition: equalfuncs.c:1559
bool(* nodeEqual)(const struct ExtensibleNode *a, const struct ExtensibleNode *b)
Definition: extensible.h:66
const char * name
Definition: encode.c:515
static bool _equalCreateForeignTableStmt(const CreateForeignTableStmt *a, const CreateForeignTableStmt *b)
Definition: equalfuncs.c:1982
#define nodeTag(nodeptr)
Definition: nodes.h:538
static bool _equalDefineStmt(const DefineStmt *a, const DefineStmt *b)
Definition: equalfuncs.c:1277
static bool _equalFieldSelect(const FieldSelect *a, const FieldSelect *b)
Definition: equalfuncs.c:474
static bool _equalAStar(const A_Star *a, const A_Star *b)
Definition: equalfuncs.c:2402
static bool _equalFuncExpr(const FuncExpr *a, const FuncExpr *b)
Definition: equalfuncs.c:291
Definition: nodes.h:296
#define COMPARE_NODE_FIELD(fldname)
Definition: equalfuncs.c:53
static bool _equalTableSampleClause(const TableSampleClause *a, const TableSampleClause *b)
Definition: equalfuncs.c:2736
Definition: nodes.h:293
static char * filename
Definition: pg_dumpall.c:91
NodeTag type
Definition: pg_list.h:52
static bool _equalMultiAssignRef(const MultiAssignRef *a, const MultiAssignRef *b)
Definition: equalfuncs.c:2447
static char * user
Definition: pg_regress.c:95
static bool _equalRangeVar(const RangeVar *a, const RangeVar *b)
Definition: equalfuncs.c:107
static bool _equalColumnRef(const ColumnRef *a, const ColumnRef *b)
Definition: equalfuncs.c:2356
static bool _equalAConst(const A_Const *a, const A_Const *b)
Definition: equalfuncs.c:2374
static bool _equalRangeTblEntry(const RangeTblEntry *a, const RangeTblEntry *b)
Definition: equalfuncs.c:2679
static bool _equalCreateOpClassStmt(const CreateOpClassStmt *a, const CreateOpClassStmt *b)
Definition: equalfuncs.c:1631
static bool _equalRefreshMatViewStmt(const RefreshMatViewStmt *a, const RefreshMatViewStmt *b)
Definition: equalfuncs.c:1755
int xmloption
Definition: xml.c:98
static bool _equalGrantStmt(const GrantStmt *a, const GrantStmt *b)
Definition: equalfuncs.c:1139
static bool _equalAIndices(const A_Indices *a, const A_Indices *b)
Definition: equalfuncs.c:2408
static bool _equalConst(const Const *a, const Const *b)
Definition: equalfuncs.c:183
static bool _equalCreateSubscriptionStmt(const CreateSubscriptionStmt *a, const CreateSubscriptionStmt *b)
Definition: equalfuncs.c:2282
#define elog(elevel,...)
Definition: elog.h:227
static bool _equalOnConflictExpr(const OnConflictExpr *a, const OnConflictExpr *b)
Definition: equalfuncs.c:810
static bool _equalFetchStmt(const FetchStmt *a, const FetchStmt *b)
Definition: equalfuncs.c:1334
void * arg
static bool _equalCreateOpClassItem(const CreateOpClassItem *a, const CreateOpClassItem *b)
Definition: equalfuncs.c:1644
static bool _equalInsertStmt(const InsertStmt *a, const InsertStmt *b)
Definition: equalfuncs.c:1009
static bool _equalCopyStmt(const CopyStmt *a, const CopyStmt *b)
Definition: equalfuncs.c:1233
static bool _equalRestrictInfo(const RestrictInfo *a, const RestrictInfo *b)
Definition: equalfuncs.c:841
static bool _equalDeallocateStmt(const DeallocateStmt *a, const DeallocateStmt *b)
Definition: equalfuncs.c:2207
static bool _equalRangeSubselect(const RangeSubselect *a, const RangeSubselect *b)
Definition: equalfuncs.c:2519
static bool _equalAlterTableMoveAllStmt(const AlterTableMoveAllStmt *a, const AlterTableMoveAllStmt *b)
Definition: equalfuncs.c:1864
static bool _equalGroupingFunc(const GroupingFunc *a, const GroupingFunc *b)
Definition: equalfuncs.c:243
static bool _equalWithClause(const WithClause *a, const WithClause *b)
Definition: equalfuncs.c:2812
static bool _equalCommentStmt(const CommentStmt *a, const CommentStmt *b)
Definition: equalfuncs.c:1313
static bool _equalA_ArrayExpr(const A_ArrayExpr *a, const A_ArrayExpr *b)
Definition: equalfuncs.c:2427
static bool _equalCreateSchemaStmt(const CreateSchemaStmt *a, const CreateSchemaStmt *b)
Definition: equalfuncs.c:2153
Value val
Definition: parsenodes.h:287
Definition: pg_list.h:50
int16 AttrNumber
Definition: attnum.h:21
static bool _equalCreateStmt(const CreateStmt *a, const CreateStmt *b)
Definition: equalfuncs.c:1248
static bool _equalRenameStmt(const RenameStmt *a, const RenameStmt *b)
Definition: equalfuncs.c:1440
static bool _equalClusterStmt(const ClusterStmt *a, const ClusterStmt *b)
Definition: equalfuncs.c:1223
long val
Definition: informix.c:664
static bool _equalAlterOwnerStmt(const AlterOwnerStmt *a, const AlterOwnerStmt *b)
Definition: equalfuncs.c:1479
static bool _equalAlterSystemStmt(const AlterSystemStmt *a, const AlterSystemStmt *b)
Definition: equalfuncs.c:1774
static bool _equalClosePortalStmt(const ClosePortalStmt *a, const ClosePortalStmt *b)
Definition: equalfuncs.c:1206
static bool _equalXmlSerialize(const XmlSerialize *a, const XmlSerialize *b)
Definition: equalfuncs.c:2893
bool constisnull
Definition: primnodes.h:215
static bool _equalIndexStmt(const IndexStmt *a, const IndexStmt *b)
Definition: equalfuncs.c:1345
static bool _equalObjectWithArgs(const ObjectWithArgs *a, const ObjectWithArgs *b)
Definition: equalfuncs.c:1155
static bool _equalLockStmt(const LockStmt *a, const LockStmt *b)
Definition: equalfuncs.c:2123
#define lfirst_oid(lc)
Definition: pg_list.h:171
NodeTag type
Definition: value.h:44
static bool _equalRangeFunction(const RangeFunction *a, const RangeFunction *b)
Definition: equalfuncs.c:2529
static bool _equalCreateEventTrigStmt(const CreateEventTrigStmt *a, const CreateEventTrigStmt *b)
Definition: equalfuncs.c:2051
const ExtensibleNodeMethods * GetExtensibleNodeMethods(const char *extnodename, bool missing_ok)
Definition: extensible.c:125
#define COMPARE_SCALAR_FIELD(fldname)
Definition: equalfuncs.c:46
static bool _equalConvertRowtypeExpr(const ConvertRowtypeExpr *a, const ConvertRowtypeExpr *b)
Definition: equalfuncs.c:536
static bool _equalAggref(const Aggref *a, const Aggref *b)
Definition: equalfuncs.c:217
static bool _equalRowMarkClause(const RowMarkClause *a, const RowMarkClause *b)
Definition: equalfuncs.c:2801
Definition: nodes.h:157
static bool _equalColumnDef(const ColumnDef *a, const ColumnDef *b)
Definition: equalfuncs.c:2598