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 1no6TD-0002vg-Af for pgsql-hackers@arkaria.postgresql.org; Mon, 09 May 2022 16:42:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1no6TB-0006X0-E8 for pgsql-hackers@arkaria.postgresql.org; Mon, 09 May 2022 16:42:49 +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 1no6TB-0006Wr-3l for pgsql-hackers@lists.postgresql.org; Mon, 09 May 2022 16:42:49 +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 1no6T8-00029b-KQ for pgsql-hackers@lists.postgresql.org; Mon, 09 May 2022 16:42:47 +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 249Ggi4d3817755; Mon, 9 May 2022 12:42:44 -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> <3603504.1652068977@sss.pgh.pa.us> Comments: In-reply-to Corey Huinker message dated "Mon, 09 May 2022 02:19:30 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3817753.1652114564.1@sss.pgh.pa.us> Date: Mon, 09 May 2022 12:42:44 -0400 Message-ID: <3817754.1652114564@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Corey Huinker writes: > The infinite-upper-bound-withlimit-pushdown counterexample makes sense, but > seems like we're using generate_series() only because we lack a function > that generates a series of N elements, without a specified upper bound, > something like > generate_finite_series( start, step, num_elements ) Yeah, that could be a reasonable thing to add. > And if we did that, I'd lobby that we have one that takes dates as well as > one that takes timestamps, because that was my reason for starting the > thread above. Less sure about that. ISTM the reason that the previous proposal failed was that it introduced too much ambiguity about how to resolve unknown-type arguments. Wouldn't the same problems arise here? regards, tom lane