diff options
Diffstat (limited to 'doc/src/sgml/ref/select.sgml')
-rw-r--r-- | doc/src/sgml/ref/select.sgml | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml index 9675adcbf86..96442a93084 100644 --- a/doc/src/sgml/ref/select.sgml +++ b/doc/src/sgml/ref/select.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/select.sgml,v 1.122 2009/05/03 20:45:43 tgl Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/select.sgml,v 1.122.2.1 2009/08/27 20:08:12 tgl Exp $ PostgreSQL documentation --> @@ -595,18 +595,25 @@ WINDOW <replaceable class="parameter">window_name</replaceable> AS ( <replaceabl <para> The elements of the <literal>PARTITION BY</> list are interpreted in - the same fashion as elements of a - <xref linkend="sql-groupby" endterm="sql-groupby-title">, and - the elements of the <literal>ORDER BY</> list are interpreted in the - same fashion as elements of an - <xref linkend="sql-orderby" endterm="sql-orderby-title">. - The only difference is that these expressions can contain aggregate + much the same fashion as elements of a + <xref linkend="sql-groupby" endterm="sql-groupby-title">, except that + they are always simple expressions and never the name or number of an + output column. + Another difference is that these expressions can contain aggregate function calls, which are not allowed in a regular <literal>GROUP BY</> clause. They are allowed here because windowing occurs after grouping and aggregation. </para> <para> + Similarly, the elements of the <literal>ORDER BY</> list are interpreted + in much the same fashion as elements of an + <xref linkend="sql-orderby" endterm="sql-orderby-title">, except that + the expressions are always taken as simple expressions and never the name + or number of an output column. + </para> + + <para> The optional <replaceable class="parameter">frame_clause</> defines the <firstterm>window frame</> for window functions that depend on the frame (not all do). It can be one of |