diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-02-09 06:56:28 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-02-09 06:56:28 +0000 |
commit | 39b7ec330923b5a2746720101fbd83c1dd418aea (patch) | |
tree | 42cce57b7c823f65091b5e10c434a494716e0f82 /src/backend/nodes/equalfuncs.c | |
parent | 3646ab58b435e53dabd863d11b052e03220bb964 (diff) | |
download | postgresql-39b7ec330923b5a2746720101fbd83c1dd418aea.tar.gz postgresql-39b7ec330923b5a2746720101fbd83c1dd418aea.zip |
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.
Diffstat (limited to 'src/backend/nodes/equalfuncs.c')
-rw-r--r-- | src/backend/nodes/equalfuncs.c | 15 |
1 files changed, 11 insertions, 4 deletions
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; |