> What is the point of the macro > > #define ATTGET(itup, Rel, i, isnull ) ((char*)( \ > ( IndexTupleSize(itup) == sizeof(IndexTupleData) ) ? \ > *(isnull)=true, NULL \ > : \ > index_getattr(itup, i, (Rel)->rd_att, isnull) \ > )) > > It appears to me that index_getattr should handle an all-NULL index > tuple just fine by itself --- certainly the btree code expects it to. > So I do not see the reason for this extra layer on top of it. You are right. It can be removed or replaced to #define ATTGET(itup, Rel, i, isnull ) (char*)( index_getattr(itup, i, (Rel)->rd_att, isnull) ) The point was that in gist_tuple_replacekey (called from gistPageAddItem) key may be replaced by null value, but flag itup->t_info & INDEX_NULL_MASK is not set. Now we don't use gistPageAddItem ( see http://fts.postgresql.org/db/mw/msg.html?mid=118707). This is our oversight. -- Teodor Sigaev [EMAIL PROTECTED] ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster