Re: Comparing Datum's at aminsert() stage
От | Tom Lane |
---|---|
Тема | Re: Comparing Datum's at aminsert() stage |
Дата | |
Msg-id | 25792.1113858268@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Comparing Datum's at aminsert() stage ("Victor Y. Yegorov" <viy@mits.lv>) |
Ответы |
Re: Comparing Datum's at aminsert() stage
|
Список | pgsql-hackers |
"Victor Y. Yegorov" <viy@mits.lv> writes: > So, I'd like to ask -- what is the "reverse" function for heap_fill_tuple(), > is it OK to use index_getattr()? 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? > 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? Look at the array comparison functions for some ideas. Be wary about memory leaks: index AM code generally runs in a context that won't get cleaned up until query end, so if you leak a little bit of memory per call, you will have a problem you won't notice until it goes into the field. regards, tom lane
В списке pgsql-hackers по дате отправления: