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

Generated by: LCOV version 1.14