diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-03-27 18:38:27 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-03-27 18:38:27 +0000 |
commit | 617dd33b6effe01852d6b4f71cd4c4e1f6eccbd6 (patch) | |
tree | dc39d13fbe3be6f7adad62ac958930e309207d7f /src/backend/access/common/indextuple.c | |
parent | 926e8a00d38e1873369ab9a24062440c82d7731c (diff) | |
download | postgresql-617dd33b6effe01852d6b4f71cd4c4e1f6eccbd6.tar.gz postgresql-617dd33b6effe01852d6b4f71cd4c4e1f6eccbd6.zip |
Eliminate duplicate hasnulls bit testing in index tuple access, and
clean up itup.h a little bit.
Diffstat (limited to 'src/backend/access/common/indextuple.c')
-rw-r--r-- | src/backend/access/common/indextuple.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/backend/access/common/indextuple.c b/src/backend/access/common/indextuple.c index e52f61a2ad4..e5d19765e79 100644 --- a/src/backend/access/common/indextuple.c +++ b/src/backend/access/common/indextuple.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/common/indextuple.c,v 1.73 2005/03/21 01:23:55 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/access/common/indextuple.c,v 1.74 2005/03/27 18:38:26 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -137,7 +137,7 @@ index_form_tuple(TupleDesc tupleDescriptor, isnull, (char *) tp + hoff, &tupmask, - (hasnull ? (bits8 *) tp + sizeof(*tuple) : NULL)); + (hasnull ? (bits8 *) tp + sizeof(IndexTupleData) : NULL)); #ifdef TOAST_INDEX_HACK for (i = 0; i < numberOfAttributes; i++) @@ -230,8 +230,7 @@ nocache_index_getattr(IndexTuple tup, *isnull = false; #endif - data_off = IndexTupleHasMinHeader(tup) ? sizeof *tup : - IndexInfoFindDataOffset(tup->t_info); + data_off = IndexInfoFindDataOffset(tup->t_info); attnum--; @@ -256,7 +255,7 @@ nocache_index_getattr(IndexTuple tup, */ /* XXX "knows" t_bits are just after fixed tuple header! */ - bp = (bits8 *) ((char *) tup + sizeof(*tup)); + bp = (bits8 *) ((char *) tup + sizeof(IndexTupleData)); #ifdef IN_MACRO /* This is handled in the macro */ |