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.96) (envelope-from ) id 1weOBu-004lnY-2e for pgsql-bugs@arkaria.postgresql.org; Tue, 30 Jun 2026 02:27:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1weOBt-0060SU-1z for pgsql-bugs@arkaria.postgresql.org; Tue, 30 Jun 2026 02:27:13 +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.96) (envelope-from ) id 1weOBt-0060SM-1F for pgsql-bugs@lists.postgresql.org; Tue, 30 Jun 2026 02:27:13 +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.98.2) (envelope-from ) id 1weOBr-00000000uFt-0xSQ for pgsql-bugs@lists.postgresql.org; Tue, 30 Jun 2026 02:27:13 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 65U2R5g22450293; Mon, 29 Jun 2026 22:27:05 -0400 From: Tom Lane To: David Rowley cc: Richard Guo , =?UTF-8?Q?Daniel_Farka=C5=A1?= , Magnus Hagander , PostgreSQL mailing lists Subject: Re: BUG #17502: View based on window functions returns wrong results when queried In-reply-to: References: <17502-281a7aaacfaa872a@postgresql.org> <965990.1675119213@sss.pgh.pa.us> Comments: In-reply-to David Rowley message dated "Tue, 30 Jun 2026 11:35:19 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2450291.1782786425.1@sss.pgh.pa.us> Date: Mon, 29 Jun 2026 22:27:05 -0400 Message-ID: <2450292.1782786425@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk David Rowley writes: > On Tue, 31 Jan 2023 at 11:53, Tom Lane wrote: >> This bug seems to have slipped off the radar screen, but it's still >> a bug. I continue to believe that the best fix is to disallow SRFs >> in window definitions, and present the trivial patch to do so. >> As discussed, I'm comfortable with leaving this alone in the back >> branches. > There has been another report about this in bug #19535. Should we > consider going with disallowing SRFs in the WindowClause for v19? Yeah, that slipped off the radar screen *again*. Let's disallow SRFs in WindowClauses in HEAD and v19, and see if anyone complains. regards, tom lane