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