LCOV - code coverage report
Current view: top level - src/backend/nodes - equalfuncs.c (source / functions) Hit Total Coverage
Test: PostgreSQL 13beta1 Lines: 2158 2274 94.9 %
Date: 2020-06-01 09:07:10 Functions: 217 227 95.6 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.13