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

From Victor Y. Yegorov
Subject Re: Comparing Datum's at aminsert() stage
Date
Msg-id 20050419190319.GA10376@mits.lv
Whole thread Raw
In response to Re: Comparing Datum's at aminsert() stage  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
* Tom Lane <tgl@sss.pgh.pa.us> [19.04.2005 19:48]:
> That's probably what you *have* to use, since the normal deconstructors
> assume they are working with heap tuples, which are different.  But I
> don't understand why you are waiting till after the index tuple is
> formed.  The aminsert function gets an array of Datums to start with.
> Why not do it there?

Well, I need that exactly in aminsert.

Each value is stored only once in the index (along with it's own
series-of-bits). Thus, I need to compare each Datum from aminsert()'s
array with the existing ones.

Also, I cannot form tuple the ordinary way (I need all values separated),
so I copy each TuplDesc->attrs[i] into temporary TupleDesc (1 attribute big)
and call heap_fill_tuple(). Actually, I'm not sure this is the right way...

I think, storing some kind of hash-value from the Datum is a good idea, but
it's need to be unique. Is it possible with any existing API?


-- 

Victor Y. Yegorov


pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: Problem with PITR recovery
Next
From: Bruno Wolff III
Date:
Subject: Re: inet increment w/ int8