"Victor Y. Yegorov" <[EMAIL PROTECTED]> 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 ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster