diff options
author | Bruce Momjian <bruce@momjian.us> | 2011-02-20 00:01:08 -0500 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2011-02-20 00:01:08 -0500 |
commit | d5813488a4ccc78ec3a4ad0d5da4e6e844af75e8 (patch) | |
tree | fc368a0db2b6d992c25e2efdf74ddfc6e7d79cba | |
parent | 8c0f1e2762a896e3af890b14babd3409fa49e641 (diff) | |
download | postgresql-d5813488a4ccc78ec3a4ad0d5da4e6e844af75e8.tar.gz postgresql-d5813488a4ccc78ec3a4ad0d5da4e6e844af75e8.zip |
Adjust documentation wording of window function ORDER BY to not mention
avg() because it was inaccurate.
-rw-r--r-- | doc/src/sgml/advanced.sgml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/src/sgml/advanced.sgml b/doc/src/sgml/advanced.sgml index 11859b4e30f..218988e0afc 100644 --- a/doc/src/sgml/advanced.sgml +++ b/doc/src/sgml/advanced.sgml @@ -383,10 +383,10 @@ SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM emps </para> <para> - Although <function>avg</> will produce the same result no matter - what order it processes the partition's rows in, this is not true of all - window functions. When needed, you can control that order using - <literal>ORDER BY</> within <literal>OVER</>. Here is an example: + You can also control the order in which rows are processed by + window functions using <literal>ORDER BY</> within <literal>OVER</>. + (The window <literal>ORDER BY</> does not even have to match the + order in which the rows are output.) Here is an example: <programlisting> SELECT depname, empno, salary, rank() OVER (PARTITION BY depname ORDER BY salary DESC) FROM empsalary; |