Re: BUG #19535: Splitting window input targets can break same-level SRF lockstep semantics

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: imchifan(at)163(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19535: Splitting window input targets can break same-level SRF lockstep semantics
Date: 2026-06-29 23:32:52
Message-ID: CAApHDvruxTGmMkXBTiu7B_=SgeeqTMJKmB6JOdsb6wWBR9U_TQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sun, 28 Jun 2026 at 00:55, PG Bug reporting form
<noreply(at)postgresql(dot)org> wrote:
> ## Actual Behavior
>
> The query returns four rows instead of two:
>
> ```text
> 1 | 1 | 11
> 1 | 1 | 12
> 1 | 2 | 11
> 1 | 2 | 12
> ```
>
> The plan shows one `ProjectSet` below `WindowAgg` and another above it,
> which breaks same-level SRF lockstep semantics.

Thanks for the report. This is the same as what was discussed in bug
#17502. There was a patch there to disallow SRFs in the WindowClause.
I believe it was intended to go into master only, but that wasn't
done.

David

[1] https://postgr.es/m/flat/17502-281a7aaacfaa872a%40postgresql.org

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message David Rowley 2026-06-29 23:35:19 Re: BUG #17502: View based on window functions returns wrong results when queried
Previous Message Masahiko Sawada 2026-06-29 23:18:08 Re: uuidv7 improperly accepts dates before 1970-01-01