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