summaryrefslogtreecommitdiff
path: root/src/backend/access/hash/hash.c
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1996-08-26 06:32:06 +0000
committerMarc G. Fournier <scrappy@hub.org>1996-08-26 06:32:06 +0000
commita2740a455f558a1b8b9cd1962f92980efa4a984a (patch)
tree6f52d29248743f100fa40c32cef2cd48043c43f5 /src/backend/access/hash/hash.c
parentfe87dbb1403c557bee85115ebe12b69f9ee92ed3 (diff)
downloadpostgresql-a2740a455f558a1b8b9cd1962f92980efa4a984a.tar.gz
There, now we support GiST...now what? :)
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 a4a4e16e59..bd3b8cd73c 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);
}