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

David G. Johnston <david.g.johnston@gmail.com>

From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Christopher Inokuchi <cinokuchi@gmail.com>, Greg Sabino Mullane <htamfids@gmail.com>, pgsql-bugs@lists.postgresql.org
Date: 2025-03-09T19:48:25Z
Lists: pgsql-bugs
On Sun, Mar 9, 2025 at 10:27 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:

> "David G. Johnston" <david.g.johnston@gmail.com> writes:
> > On Sat, Mar 8, 2025 at 12:50 PM Tom Lane <tgl@sss.pgh.pa.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.

Commits

  1. Doc: improve description of window function processing.