aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2001-02-22 21:48:49 +0000
committerBruce Momjian <bruce@momjian.us>2001-02-22 21:48:49 +0000
commit4f6c49fef0ddb568d2bf23a338645336737a32c5 (patch)
tree01d7752a305dd367323086eabba921838366ea34 /src/backend
parent660ca3e01c0ac2cd27d07979d026263ff9e4b1bd (diff)
downloadpostgresql-4f6c49fef0ddb568d2bf23a338645336737a32c5.tar.gz
postgresql-4f6c49fef0ddb568d2bf23a338645336737a32c5.zip
Clean up index/btree comments/macros, as approved.
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/access/common/indextuple.c8
-rw-r--r--src/backend/access/gist/gist.c4
-rw-r--r--src/backend/access/hash/hash.c6
-rw-r--r--src/backend/access/hash/hashutil.c4
4 files changed, 11 insertions, 11 deletions
diff --git a/src/backend/access/common/indextuple.c b/src/backend/access/common/indextuple.c
index 4b46c202dcd..e503d9b888d 100644
--- a/src/backend/access/common/indextuple.c
+++ b/src/backend/access/common/indextuple.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.51 2001/02/15 20:57:01 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.52 2001/02/22 21:48:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -230,7 +230,7 @@ nocache_index_getattr(IndexTuple tup,
attnum--;
- if (IndexTupleNoNulls(tup))
+ if (!IndexTupleHasNulls(tup))
{
#ifdef IN_MACRO
/* This is handled in the macro */
@@ -301,7 +301,7 @@ nocache_index_getattr(IndexTuple tup,
return fetchatt(att[attnum],
tp + att[attnum]->attcacheoff);
}
- else if (!IndexTupleAllFixed(tup))
+ else if (IndexTupleHasVarlenas(tup))
{
int j;
@@ -365,7 +365,7 @@ nocache_index_getattr(IndexTuple tup,
for (i = 0; i < attnum; i++)
{
- if (!IndexTupleNoNulls(tup))
+ if (IndexTupleHasNulls(tup))
{
if (att_isnull(i, bp))
{
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c
index c631f385037..c7bfa9c9626 100644
--- a/src/backend/access/gist/gist.c
+++ b/src/backend/access/gist/gist.c
@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.69 2001/01/29 00:39:12 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.70 2001/02/22 21:48:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1102,7 +1102,7 @@ gist_tuple_replacekey(Relation r, GISTENTRY entry, IndexTuple t)
{
memcpy(datum, entry.pred, entry.bytes);
/* clear out old size */
- t->t_info &= 0xe000;
+ t->t_info &= ~INDEX_SIZE_MASK;
/* or in new size */
t->t_info |= MAXALIGN(entry.bytes + sizeof(IndexTupleData));
diff --git a/src/backend/access/hash/hash.c b/src/backend/access/hash/hash.c
index 2f4448e107e..44a8b225e8f 100644
--- a/src/backend/access/hash/hash.c
+++ b/src/backend/access/hash/hash.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.48 2001/01/29 00:39:13 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.49 2001/02/22 21:48:49 momjian Exp $
*
* NOTES
* This file contains only the public interface routines.
@@ -170,7 +170,7 @@ hashbuild(PG_FUNCTION_ARGS)
* of the way nulls are handled here.
*/
- if (itup->t_info & INDEX_NULL_MASK)
+ if (IndexTupleHasNulls(itup))
{
pfree(itup);
continue;
@@ -256,7 +256,7 @@ hashinsert(PG_FUNCTION_ARGS)
itup = index_formtuple(RelationGetDescr(rel), datum, nulls);
itup->t_tid = *ht_ctid;
- if (itup->t_info & INDEX_NULL_MASK)
+ if (IndexTupleHasNulls(itup))
PG_RETURN_POINTER((InsertIndexResult) NULL);
hitem = _hash_formitem(itup);
diff --git a/src/backend/access/hash/hashutil.c b/src/backend/access/hash/hashutil.c
index 338ea849ca1..0aac61fa025 100644
--- a/src/backend/access/hash/hashutil.c
+++ b/src/backend/access/hash/hashutil.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.25 2001/01/24 19:42:47 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.26 2001/02/22 21:48:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -72,7 +72,7 @@ _hash_formitem(IndexTuple itup)
Size tuplen;
/* disallow nulls in hash keys */
- if (itup->t_info & INDEX_NULL_MASK)
+ if (IndexTupleHasNulls(itup))
elog(ERROR, "hash indices cannot include null keys");
/* make a copy of the index tuple with room for the sequence number */