Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nnucy-0005Hp-BY for pgsql-hackers@arkaria.postgresql.org; Mon, 09 May 2022 04:04:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nnubz-0006wV-2X for pgsql-hackers@arkaria.postgresql.org; Mon, 09 May 2022 04:03:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nnuby-0006wM-Q5 for pgsql-hackers@lists.postgresql.org; Mon, 09 May 2022 04:03:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nnubs-0004SB-23 for pgsql-hackers@lists.postgresql.org; Mon, 09 May 2022 04:03:05 +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 24942v213603505; Mon, 9 May 2022 00:02:57 -0400 From: Tom Lane To: Corey Huinker cc: Jeff Janes , Richard Wesley , PostgreSQL Hackers Subject: Re: Query generates infinite loop In-reply-to: References: <91B44E7B-68D5-448F-95C8-B4B3B0F5DEAF@duckdblabs.com> <2842828.1650474225@sss.pgh.pa.us> <3010353.1650490989@sss.pgh.pa.us> Comments: In-reply-to Corey Huinker message dated "Sun, 08 May 2022 23:44:33 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3603503.1652068977.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 09 May 2022 00:02:57 -0400 Message-ID: <3603504.1652068977@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Corey Huinker writes: > On Wed, May 4, 2022 at 3:01 PM Jeff Janes wrote: >> On Wed, Apr 20, 2022 at 5:43 PM Tom Lane wrote: >>> Oh --- looks like numeric generate_series() already throws error for >>> this, so we should just make the timestamp variants do the same. > This came up once before > https://www.postgresql.org/message-id/CAB7nPqQUuUh_W3s55eSiMnt901Ud3meF7= f_96yPkKcqfd1ZaMg%40mail.gmail.com Oh! I'd totally forgotten that thread, but given that discussion, and particularly the counterexample at https://www.postgresql.org/message-id/16807.1456091547%40sss.pgh.pa.us it now feels to me like maybe this change was a mistake. Perhaps instead of the committed change, we ought to go the other way and rip out the infinity checks in numeric generate_series(). In view of tomorrow's minor-release wrap, there is not time for the sort of more leisured discussion that I now think this topic needs. I propose to revert eafdf9de0 et al before the wrap, and think about this at more length before doing anything. regards, tom lane