Re: BUG #17502: View based on window functions returns wrong results when queried - Mailing list pgsql-bugs

From David Rowley
Subject Re: BUG #17502: View based on window functions returns wrong results when queried
Date
Msg-id CAApHDvoxZCwf7js-Xc5L=3HV65VVOOAoNm=SeTpXG9sZhR5NJQ@mail.gmail.com
Whole thread
In response to Re: BUG #17502: View based on window functions returns wrong results when queried  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #17502: View based on window functions returns wrong results when queried
List pgsql-bugs
On Tue, 31 Jan 2023 at 11:53, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Richard Guo <guofenglinux@gmail.com> writes:
> > On Mon, May 30, 2022 at 9:12 AM David Rowley <dgrowleyml@gmail.com> wrote:
> >> The following is also pretty strange. Why should adding the SRF column
> >> to the ORDER BY change the number of output rows?
>
> > Is this a bug we should fix?
>
> 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?

David



pgsql-bugs by date:

Previous
From: David Rowley
Date:
Subject: Re: BUG #19535: Splitting window input targets can break same-level SRF lockstep semantics
Next
From: Tom Lane
Date:
Subject: Re: BUG #17502: View based on window functions returns wrong results when queried