summaryrefslogtreecommitdiff
path: root/src/backend/access/hash/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/hash/hash.c')
-rw-r--r--src/backend/access/hash/hash.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/backend/access/hash/hash.c b/src/backend/access/hash/hash.c
index a4a4e16e599..bd3b8cd73ce 100644
--- a/src/backend/access/hash/hash.c
+++ b/src/backend/access/hash/hash.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.1.1.1 1996/07/09 06:21:10 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.2 1996/08/26 06:27:28 scrappy Exp $
*
* NOTES
* This file contains only the public interface routines.
@@ -252,11 +252,17 @@ hashbuild(Relation heap,
* to the caller.
*/
InsertIndexResult
-hashinsert(Relation rel, IndexTuple itup)
+hashinsert(Relation rel, Datum *datum, char *nulls, ItemPointer ht_ctid)
{
HashItem hitem;
+ IndexTuple itup;
InsertIndexResult res;
+
+ /* generate an index tuple */
+ itup = index_formtuple(RelationGetTupleDescriptor(rel), datum, nulls);
+ itup->t_tid = *ht_ctid;
+
if (itup->t_info & INDEX_NULL_MASK)
return ((InsertIndexResult) NULL);
@@ -265,6 +271,7 @@ hashinsert(Relation rel, IndexTuple itup)
res = _hash_doinsert(rel, hitem);
pfree(hitem);
+ pfree(itup);
return (res);
}