1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-09 06:21:09 +03:00

Clean up index/btree comments/macros, as approved.

This commit is contained in:
Bruce Momjian
2001-02-22 21:48:49 +00:00
parent 660ca3e01c
commit 4f6c49fef0
6 changed files with 52 additions and 42 deletions

View File

@@ -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))
{

View File

@@ -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));

View File

@@ -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);

View File

@@ -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 */