1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Remove the no-longer-useful HashItem/HashItemData level of structure.

Same motivation as for BTItem.
This commit is contained in:
Tom Lane
2006-01-25 23:26:11 +00:00
parent c389760c32
commit 5997386a0a
7 changed files with 34 additions and 98 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/hash/hashutil.c,v 1.45 2006/01/14 22:03:35 tgl Exp $
* $PostgreSQL: pgsql/src/backend/access/hash/hashutil.c,v 1.46 2006/01/25 23:26:11 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -60,38 +60,6 @@ _hash_checkqual(IndexScanDesc scan, IndexTuple itup)
return true;
}
/*
* _hash_formitem -- construct a hash index entry
*/
HashItem
_hash_formitem(IndexTuple itup)
{
int nbytes_hitem;
HashItem hitem;
Size tuplen;
/* disallow nulls in hash keys */
if (IndexTupleHasNulls(itup))
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("hash indexes cannot contain null keys")));
/*
* make a copy of the index tuple (XXX do we still need to copy?)
*
* HashItemData used to have more fields than IndexTupleData, but no
* longer...
*/
tuplen = IndexTupleSize(itup);
nbytes_hitem = tuplen +
(sizeof(HashItemData) - sizeof(IndexTupleData));
hitem = (HashItem) palloc(nbytes_hitem);
memcpy(&(hitem->hash_itup), itup, tuplen);
return hitem;
}
/*
* _hash_datum2hashkey -- given a Datum, call the index's hash procedure
*/