Re: Fix picksplit with nan values - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fix picksplit with nan values
Date
Msg-id 22236.1383933485@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fix picksplit with nan values  (Alexander Korotkov <aekorotkov@gmail.com>)
List pgsql-hackers
Alexander Korotkov <aekorotkov@gmail.com> writes:
>> Thanks, Andrew! Good spot.
>> I didn't examine order by operators for work with NaNs.
>> I think this time problem is in GiST itself rather than in opclass. I'm
>> going to fix it in a separate patch.

> Attached patch fixes knn GiST behaviour with NaN. It makes RB-tree
> comparison function in GiST work like float8 btree opclass comparison
> function.

Hmm ... does that really work, or even do anything?  I'd have thought
that if either input is a NAN, the initial test
    if (sa->distances[i] != sb->distances[i])

would return false so we'd not enter the rest of it.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Changing pg_dump default file format
Next
From: "Joshua D. Drake"
Date:
Subject: Re: backup.sgml-cmd-v003.patch