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