Re: pgsql: Protect GIST logic that assumes penalty values can't be negative - Mailing list pgsql-hackers

From Greg Stark
Subject Re: pgsql: Protect GIST logic that assumes penalty values can't be negative
Date
Msg-id BANLkTi=d+bPpS1cM4YC8KuKHj63Hwj4LMA@mail.gmail.com
Whole thread Raw
Responses Re: pgsql: Protect GIST logic that assumes penalty values can't be negative  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, May 31, 2011 at 2:54 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>  Prevent problems by clamping negative penalty values to
> zero.  (Just to be really sure, I also made it force NaNs to zero.)

Do gistchoose et al expect the triangle function to obey the triangle
inequality? If so isn't it possible treating NaNs as zero would fail
that? I'm not sure there's any safe assumption for NaN

--
greg


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: creating CHECK constraints as NOT VALID
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Protect GIST logic that assumes penalty values can't be negative