Re: Comparing Datum's at aminsert() stage

Поиск
Список
Период
Сортировка
От Victor Y. Yegorov
Тема Re: Comparing Datum's at aminsert() stage
Дата
Msg-id 20050419190319.GA10376@mits.lv
обсуждение исходный текст
Ответ на Re: Comparing Datum's at aminsert() stage  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: Problem with PITR recovery
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: inet increment w/ int8