Re: Window Functions with identical PARTITION BY and ORDER BY clauses evaluated separately

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Christopher Inokuchi <cinokuchi(at)gmail(dot)com>, Greg Sabino Mullane <htamfids(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Window Functions with identical PARTITION BY and ORDER BY clauses evaluated separately
Date: 2025-03-09 19:48:25
Message-ID: CAKFQuwYKrE538QskTWa+_eznnKTFkNhRfnLW_H5OuNW4xgX1hQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sun, Mar 9, 2025 at 10:27 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> > On Sat, Mar 8, 2025 at 12:50 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> For a shorter fix
> >> When multiple window functions are used, all the window functions
> >> having syntactically equivalent PARTITION BY and ORDER BY clauses
> >> in their window definitions are guaranteed to see the same
> >> ordering of the input rows, even if the ORDER BY does not uniquely
> >> determine the ordering.
>

> So let's go with
> my wording less the "syntactically".
>
>
+1

David J.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrei Lepikhov 2025-03-10 09:22:17 Re: Memoize in between of two JOIN nodes
Previous Message Tom Lane 2025-03-09 17:27:45 Re: Window Functions with identical PARTITION BY and ORDER BY clauses evaluated separately