Re: BUG #18835: spgist index fails to accept point with NaN
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Date: 2025-03-07T20:08:20Z
Lists: pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> The following script:
> CREATE TABLE t(p point);
> INSERT INTO t SELECT point(g, g) FROM generate_series(1, 1000) g;
> INSERT INTO t VALUES ('(0,NaN)'::point);
> CREATE INDEX spgist_idx ON t USING spgist(p);
> triggers:
> ERROR: XX000: getQuadrant: impossible case
Yeah. There's been some past attempts to clean up our behavior
for NaNs in geometric values, but it's such a mess that not
much progress has been made. So I can't get excited about
worrying about this case in particular (especially since I don't
see any easy fix). I wonder if we shouldn't just ban NaNs in
the geometric types.
regards, tom lane