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

Generated by: LCOV version 1.11