Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tqdze-008GQg-Ji for pgsql-bugs@arkaria.postgresql.org; Fri, 07 Mar 2025 20:08:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tqdzd-00GnAE-BR for pgsql-bugs@arkaria.postgresql.org; Fri, 07 Mar 2025 20:08:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tqdzd-00GnA3-2e for pgsql-bugs@lists.postgresql.org; Fri, 07 Mar 2025 20:08:25 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tqdzZ-001YqH-1w for pgsql-bugs@lists.postgresql.org; Fri, 07 Mar 2025 20:08:24 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 527K8KeT1122079; Fri, 7 Mar 2025 15:08:20 -0500 From: Tom Lane To: exclusion@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18835: spgist index fails to accept point with NaN In-reply-to: <18835-deaf2add28625ed3@postgresql.org> References: <18835-deaf2add28625ed3@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Fri, 07 Mar 2025 18:00:01 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1122077.1741378100.1@sss.pgh.pa.us> Date: Fri, 07 Mar 2025 15:08:20 -0500 Message-ID: <1122078.1741378100@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form 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