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

Generated by: LCOV version 1.13