34#define COMPARE_SCALAR_FIELD(fldname) \
36 if (a->fldname != b->fldname) \
41#define COMPARE_NODE_FIELD(fldname) \
43 if (!equal(a->fldname, b->fldname)) \
48#define COMPARE_BITMAPSET_FIELD(fldname) \
50 if (!bms_equal(a->fldname, b->fldname)) \
55#define COMPARE_STRING_FIELD(fldname) \
57 if (!equalstr(a->fldname, b->fldname)) \
62#define equalstr(a, b) \
63 (((a) != NULL && (b) != NULL) ? (strcmp(a, b) == 0) : (a) == (b))
66#define COMPARE_ARRAY_FIELD(fldname) \
68 if (memcmp(a->fldname, b->fldname, sizeof(a->fldname)) != 0) \
73#define COMPARE_POINTER_FIELD(fldname, sz) \
75 if (memcmp(a->fldname, b->fldname, (sz)) != 0) \
80#define COMPARE_LOCATION_FIELD(fldname) \
84#define COMPARE_COERCIONFORM_FIELD(fldname) \
88#include "equalfuncs.funcs.c"
113 a->constbyval,
a->constlen);
203 elog(
ERROR,
"unrecognized list node type: %d",
233 if (
a == NULL ||
b == NULL)
247#include "equalfuncs.switch.c"
257 elog(
ERROR,
"unrecognized node type: %d",
bool bms_equal(const Bitmapset *a, const Bitmapset *b)
#define Assert(condition)
bool datumIsEqual(Datum value1, Datum value2, bool typByVal, int typLen)
static bool _equalExtensibleNode(const ExtensibleNode *a, const ExtensibleNode *b)
#define COMPARE_LOCATION_FIELD(fldname)
#define COMPARE_SCALAR_FIELD(fldname)
bool equal(const void *a, const void *b)
static bool _equalBitmapset(const Bitmapset *a, const Bitmapset *b)
static bool _equalConst(const Const *a, const Const *b)
#define COMPARE_STRING_FIELD(fldname)
static bool _equalList(const List *a, const List *b)
static bool _equalA_Const(const A_Const *a, const A_Const *b)
const ExtensibleNodeMethods * GetExtensibleNodeMethods(const char *extnodename, bool missing_ok)
#define forboth(cell1, list1, cell2, list2)
void check_stack_depth(void)
bool(* nodeEqual)(const struct ExtensibleNode *a, const struct ExtensibleNode *b)