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

From David Rowley
Subject Re: BUG #19535: Splitting window input targets can break same-level SRF lockstep semantics
Date
Msg-id CAApHDvruxTGmMkXBTiu7B_=SgeeqTMJKmB6JOdsb6wWBR9U_TQ@mail.gmail.com
Whole thread
In response to BUG #19535: Splitting window input targets can break same-level SRF lockstep semantics  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
On Sun, 28 Jun 2026 at 00:55, PG Bug reporting form
<noreply@postgresql.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



pgsql-bugs by date:

Previous
From: Bill Kim
Date:
Subject: Re: BUG #19524: NaN handling in btree_gist's float4/float8 opclasses
Next
From: David Rowley
Date:
Subject: Re: BUG #17502: View based on window functions returns wrong results when queried