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:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user