Re: GiST index build versus NaN coordinates - Mailing list pgsql-hackers

From Tom Lane
Subject Re: GiST index build versus NaN coordinates
Date
Msg-id 12093.1468693668@sss.pgh.pa.us
Whole thread Raw
In response to Re: GiST index build versus NaN coordinates  (Andreas Seltenreich <seltenreich@gmx.de>)
List pgsql-hackers
Andreas Seltenreich <seltenreich@gmx.de> writes:
> I wrote:
>> Sounds like some fuzz testing with nan/infinity is in order.

> related fallout: close_ps returns a NULL pointer with NaNs around:
> select close_ps('(nan,nan)', '(nan,nan),(nan,nan)');
> -- TRAP: FailedAssertion("!(result != ((void *)0))", File: "geo_ops.c", Line: 2860)

Yeah, that Assert seems way too optimistic.  Even without NaNs, I wonder
whether plain old roundoff error couldn't trigger cases where interpt_sl
fails to find an intersection point.  I'm inclined to just let close_ps
return SQL NULL in such cases.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Reviewing freeze map code
Next
From: Jan Wieck
Date:
Subject: Re: DO with a large amount of statements get stuck with high memory consumption