Comparing Datum's at aminsert() stage - Mailing list pgsql-hackers

From Victor Y. Yegorov
Subject Comparing Datum's at aminsert() stage
Date
Msg-id 20050418203218.GA9482@mits.lv
Whole thread Raw
Responses Re: Comparing Datum's at aminsert() stage
List pgsql-hackers
Hi!

For bitmaps, I need to search each value being inserted (for each column of
the index) in the list of already existing values (stored in index's header
area). To do that I need:

1) create Datum from PageItem's value (I store each value in it's own  PageItem);
2) compare newly inserted Datum with on-disk existing one.

For hash access method (maybe others too, haven't checked), this is done
via index_keytest() function. But it uses ScanKey, there's no such
at aminsert() stage.


So, I'd like to ask -- what is the "reverse" function for heap_fill_tuple(),
is it OK to use index_getattr()?
And how do I compare 2 Datums? I need FmgrInfo pointer for the equality
operator of the corresponding data type. Are there any API calls to obtain one?

Thank you.


-- 

Victor Y. Yegorov


pgsql-hackers by date:

Previous
From: "Dave Held"
Date:
Subject: Re: pg_hba.conf
Next
From: "Chuck McDevitt"
Date:
Subject: Re: argtype_inherit() is dead code