From 39b7ec330923b5a2746720101fbd83c1dd418aea Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 9 Feb 2003 06:56:28 +0000 Subject: Create a distinction between Lists of integers and Lists of OIDs, to get rid of the assumption that sizeof(Oid)==sizeof(int). This is one small step towards someday supporting 8-byte OIDs. For the moment, it doesn't do much except get rid of a lot of unsightly casts. --- src/backend/nodes/equalfuncs.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/backend/nodes/equalfuncs.c') diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index b347f779bd5..d33c4f52732 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -18,7 +18,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.184 2003/02/08 20:20:53 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.185 2003/02/09 06:56:27 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -59,6 +59,13 @@ return false; \ } while (0) +/* Compare a field that is a pointer to a list of Oids */ +#define COMPARE_OIDLIST_FIELD(fldname) \ + do { \ + if (!equalo(a->fldname, b->fldname)) \ + return false; \ + } while (0) + /* Compare a field that is a pointer to a Bitmapset */ #define COMPARE_BITMAPSET_FIELD(fldname) \ do { \ @@ -297,7 +304,7 @@ _equalSubLink(SubLink *a, SubLink *b) COMPARE_SCALAR_FIELD(useOr); COMPARE_NODE_FIELD(lefthand); COMPARE_NODE_FIELD(operName); - COMPARE_INTLIST_FIELD(operOids); + COMPARE_OIDLIST_FIELD(operOids); COMPARE_NODE_FIELD(subselect); return true; @@ -611,7 +618,7 @@ _equalSetOperationStmt(SetOperationStmt *a, SetOperationStmt *b) COMPARE_SCALAR_FIELD(all); COMPARE_NODE_FIELD(larg); COMPARE_NODE_FIELD(rarg); - COMPARE_INTLIST_FIELD(colTypes); + COMPARE_OIDLIST_FIELD(colTypes); return true; } @@ -1237,7 +1244,7 @@ _equalPrepareStmt(PrepareStmt *a, PrepareStmt *b) { COMPARE_STRING_FIELD(name); COMPARE_NODE_FIELD(argtypes); - COMPARE_INTLIST_FIELD(argtype_oids); + COMPARE_OIDLIST_FIELD(argtype_oids); COMPARE_NODE_FIELD(query); return true; -- cgit v1.2.3