Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9f87e25

Browse files
committed
Doc: improve description of window function processing.
The previous wording talked about a "single pass over the data", which can be read as promising more than intended (to wit, that only one WindowAgg plan node will be used). What we promise is only what the SQL spec requires, namely that the data not get re-sorted between window functions with compatible PARTITION BY/ORDER BY clauses. Adjust the wording in hopes of making this clearer. Reported-by: Christopher Inokuchi <cinokuchi@gmail.com> Author: Tom Lane <tgl@sss.pgh.pa.us> Reviewed-by: David G. Johnston <david.g.johnston@gmail.com> Discussion: https://postgr.es/m/CABde6B5va2wMsnM79u_x=n9KUgfKQje_pbLROEBmA9Ru5XWidw@mail.gmail.com Backpatch-through: 13
1 parent 6bb6a62 commit 9f87e25

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/src/sgml/queries.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,10 +1461,10 @@ GROUP BY GROUPING SETS (
14611461

14621462
<para>
14631463
When multiple window functions are used, all the window functions having
1464-
syntactically equivalent <literal>PARTITION BY</literal> and <literal>ORDER BY</literal>
1465-
clauses in their window definitions are guaranteed to be evaluated in a
1466-
single pass over the data. Therefore they will see the same sort ordering,
1467-
even if the <literal>ORDER BY</literal> does not uniquely determine an ordering.
1464+
equivalent <literal>PARTITION BY</literal> and <literal>ORDER BY</literal>
1465+
clauses in their window definitions are guaranteed to see the same
1466+
ordering of the input rows, even if the <literal>ORDER BY</literal> does
1467+
not uniquely determine the ordering.
14681468
However, no guarantees are made about the evaluation of functions having
14691469
different <literal>PARTITION BY</literal> or <literal>ORDER BY</literal> specifications.
14701470
(In such cases a sort step is typically required between the passes of

0 commit comments

Comments
 (0)