diff options
author | Tom Lane | 2005-03-21 01:24:04 +0000 |
---|---|---|
committer | Tom Lane | 2005-03-21 01:24:04 +0000 |
commit | ee4ddac137b7c66e3bec6f74e3503236476cb16e (patch) | |
tree | 3f8d12f472288b6758fc74802230374ef0e4b764 /src/backend/access/hash/hashinsert.c | |
parent | fe7015f5e821d70428995f04726215fc79294f10 (diff) |
Convert index-related tuple handling routines from char 'n'/' ' to bool
convention for isnull flags. Also, remove the useless InsertIndexResult
return struct from index AM aminsert calls --- there is no reason for
the caller to know where in the index the tuple was inserted, and we
were wasting a palloc cycle per insert to deliver this uninteresting
value (plus nontrivial complexity in some AMs).
I forced initdb because of the change in the signature of the aminsert
routines, even though nothing really looks at those pg_proc entries...
Diffstat (limited to 'src/backend/access/hash/hashinsert.c')
-rw-r--r-- | src/backend/access/hash/hashinsert.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/backend/access/hash/hashinsert.c b/src/backend/access/hash/hashinsert.c index 22ad1a09108..a09b8b4bc15 100644 --- a/src/backend/access/hash/hashinsert.c +++ b/src/backend/access/hash/hashinsert.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/hash/hashinsert.c,v 1.35 2004/12/31 21:59:13 pgsql Exp $ + * $PostgreSQL: pgsql/src/backend/access/hash/hashinsert.c,v 1.36 2005/03/21 01:23:57 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -30,7 +30,7 @@ static OffsetNumber _hash_pgaddtup(Relation rel, Buffer buf, * and hashinsert. By here, hashitem is completely filled in. * The datum to be used as a "key" is in the hashitem. */ -InsertIndexResult +void _hash_doinsert(Relation rel, HashItem hitem) { Buffer buf; @@ -39,7 +39,6 @@ _hash_doinsert(Relation rel, HashItem hitem) IndexTuple itup; BlockNumber itup_blkno; OffsetNumber itup_off; - InsertIndexResult res; BlockNumber blkno; Page page; HashPageOpaque pageopaque; @@ -190,13 +189,6 @@ _hash_doinsert(Relation rel, HashItem hitem) /* Finally drop our pin on the metapage */ _hash_dropbuf(rel, metabuf); - - /* Create the return data structure */ - res = (InsertIndexResult) palloc(sizeof(InsertIndexResultData)); - - ItemPointerSet(&(res->pointerData), itup_blkno, itup_off); - - return res; } /* |