diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-03-21 01:24:04 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-03-21 01:24:04 +0000 |
commit | ee4ddac137b7c66e3bec6f74e3503236476cb16e (patch) | |
tree | 3f8d12f472288b6758fc74802230374ef0e4b764 /src/backend/access/index/indexam.c | |
parent | fe7015f5e821d70428995f04726215fc79294f10 (diff) | |
download | postgresql-ee4ddac137b7c66e3bec6f74e3503236476cb16e.tar.gz postgresql-ee4ddac137b7c66e3bec6f74e3503236476cb16e.zip |
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/index/indexam.c')
-rw-r--r-- | src/backend/access/index/indexam.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/backend/access/index/indexam.c b/src/backend/access/index/indexam.c index 38f0443194e..6d7a874aac8 100644 --- a/src/backend/access/index/indexam.c +++ b/src/backend/access/index/indexam.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/index/indexam.c,v 1.77 2004/12/31 21:59:19 pgsql Exp $ + * $PostgreSQL: pgsql/src/backend/access/index/indexam.c,v 1.78 2005/03/21 01:23:58 tgl Exp $ * * INTERFACE ROUTINES * index_open - open an index relation by relation OID @@ -211,16 +211,15 @@ index_close(Relation relation) * index_insert - insert an index tuple into a relation * ---------------- */ -InsertIndexResult +bool index_insert(Relation indexRelation, - Datum *datums, - char *nulls, + Datum *values, + bool *isnull, ItemPointer heap_t_ctid, Relation heapRelation, bool check_uniqueness) { RegProcedure procedure; - InsertIndexResult specificResult; RELATION_CHECKS; GET_REL_PROCEDURE(insert, aminsert); @@ -228,17 +227,13 @@ index_insert(Relation indexRelation, /* * have the am's insert proc do all the work. */ - specificResult = (InsertIndexResult) - DatumGetPointer(OidFunctionCall6(procedure, + return DatumGetBool(OidFunctionCall6(procedure, PointerGetDatum(indexRelation), - PointerGetDatum(datums), - PointerGetDatum(nulls), + PointerGetDatum(values), + PointerGetDatum(isnull), PointerGetDatum(heap_t_ctid), PointerGetDatum(heapRelation), BoolGetDatum(check_uniqueness))); - - /* must be pfree'ed */ - return specificResult; } /* ---------------- |