On Fri, Oct 7, 2011 at 7:41 AM, Jeff Davis <pg...@j-davis.com> wrote:
> I'd prefer to include it in the initial patch. If the current GiST code > is going to be replaced, then there's not much sense reviewing/testing > it. > > You may need to consider unbounded and empty ranges specially. I made an > attempt to do so in the current GiST code, and you might want to take a > look at that first. I'm not particularly attached to my approach, but we > should do something reasonable with unbounded and empty ranges. > The first thing caught my eye in existing GiST code is idea of subtype_float. float8 has limited precision and can't respresent, for example, varlena values good enough. Even if we have large int8 value we can loose lower bits, but data distribution can be so that these bits are valuable. Wouldn't it better to have function like subtype_diff_float which returns difference between two values of subtype as an float? Using of such function could make penalty more sensible to even small difference between values, and accordingly more relevant. ------ With best regards, Alexander Korotkov.