Comparing Datum's at aminsert() stage

From: "Victor Y(dot) Yegorov" <viy(at)mits(dot)lv>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Comparing Datum's at aminsert() stage
Date: 2005-04-18 20:32:18
Message-ID: 20050418203218.GA9482@mits.lv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-04-18 21:04:28 Re: Comparing Datum's at aminsert() stage
Previous Message Dave Held 2005-04-18 20:14:15 Re: pg_hba.conf