Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1f4d107

Browse files
committed
Clarify documentation about "peer" rows in window functions
Peer rows are matching rows when ORDER BY is specified.Report by arnaud.mouronval@gmail.com, David G Johnston
1 parenta9c22d1 commit1f4d107

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

‎doc/src/sgml/func.sgml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13050,7 +13050,8 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
1305013050
<firstterm>Window functions</firstterm> provide the ability to perform
1305113051
calculations across sets of rows that are related to the current query
1305213052
row. See <xref linkend="tutorial-window"> for an introduction to this
13053-
feature.
13053+
feature, and <xref linkend="syntax-window-functions"> for syntax
13054+
details.
1305413055
</para>
1305513056

1305613057
<para>

‎doc/src/sgml/ref/select.sgml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -792,8 +792,9 @@ UNBOUNDED FOLLOWING
792792
The default framing option is <literal>RANGE UNBOUNDED PRECEDING</>,
793793
which is the same as <literal>RANGE BETWEEN UNBOUNDED PRECEDING AND
794794
CURRENT ROW</>; it sets the frame to be all rows from the partition start
795-
up through the current row's last peer in the <literal>ORDER BY</>
796-
ordering (which means all rows if there is no <literal>ORDER BY</>).
795+
up through the current row's last peer (a row that <literal>ORDER
796+
BY</> considers equivalent to the current row, or all rows if there
797+
is no <literal>ORDER BY</>).
797798
In general, <literal>UNBOUNDED PRECEDING</> means that the frame
798799
starts with the first row of the partition, and similarly
799800
<literal>UNBOUNDED FOLLOWING</> means that the frame ends with the last
@@ -817,7 +818,7 @@ UNBOUNDED FOLLOWING
817818
results if the <literal>ORDER BY</> ordering does not order the rows
818819
uniquely. The <literal>RANGE</> options are designed to ensure that
819820
rows that are peers in the <literal>ORDER BY</> ordering are treated
820-
alike;any twopeer rows will bebothinor both not inthe frame.
821+
alike;allpeer rows will be in the same frame.
821822
</para>
822823

823824
<para>

‎doc/src/sgml/syntax.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1877,7 +1877,7 @@ UNBOUNDED FOLLOWING
18771877
first <firstterm>peer</> row (a row that <literal>ORDER BY</> considers
18781878
equivalent to the current row), while a <replaceable>frame_end</> of
18791879
<literal>CURRENT ROW</> means the frame ends with the last equivalent
1880-
peer. In <literal>ROWS</> mode, <literal>CURRENT ROW</> simply means
1880+
<literal>ORDER BY</>peer. In <literal>ROWS</> mode, <literal>CURRENT ROW</> simply means
18811881
the current row.
18821882
</para>
18831883

@@ -1897,7 +1897,7 @@ UNBOUNDED FOLLOWING
18971897
which is the same as <literal>RANGE BETWEEN UNBOUNDED PRECEDING AND
18981898
CURRENT ROW</>. With <literal>ORDER BY</>, this sets the frame to be
18991899
all rows from the partition start up through the current row's last
1900-
peer. Without <literal>ORDER BY</>, all rows of the partition are
1900+
<literal>ORDER BY</>peer. Without <literal>ORDER BY</>, all rows of the partition are
19011901
included in the window frame, since all rows become peers of the current
19021902
row.
19031903
</para>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp