*** pgsql/doc/src/sgml/syntax.sgml 2008/12/31 00:08:35 1.128 --- pgsql/doc/src/sgml/syntax.sgml 2008/12/31 23:42:56 1.129 *************** *** 1,4 **** ! SQL Syntax --- 1,4 ---- ! SQL Syntax *************** sqrt(2) *** 1588,1599 **** where window_definition has the syntax ! [ window_name ] [ PARTITION BY expression [, ...] ] [ ORDER BY expression [ ASC | DESC | USING operator ] [ NULLS { FIRST | LAST } ] [, ...] ] ! [ framing_clause ] ! and the optional framing_clause can be one of RANGE UNBOUNDED PRECEDING --- 1588,1599 ---- where window_definition has the syntax ! [ existing_window_name ] [ PARTITION BY expression [, ...] ] [ ORDER BY expression [ ASC | DESC | USING operator ] [ NULLS { FIRST | LAST } ] [, ...] ] ! [ frame_clause ] ! and the optional frame_clause can be one of RANGE UNBOUNDED PRECEDING *************** ROWS BETWEEN UNBOUNDED PRECEDING AND UNB *** 1614,1620 **** Named window specifications are usually referenced with just OVER window_name, but it is also possible to write a window name inside the parentheses and then ! optionally override its ordering clause and/or framing clause. This latter syntax follows the same rules as modifying an existing window name within the WINDOW clause; see the reference --- 1614,1621 ---- Named window specifications are usually referenced with just OVER window_name, but it is also possible to write a window name inside the parentheses and then ! optionally supply an ordering clause and/or frame clause (the referenced ! window must lack these clauses, if they are supplied here). This latter syntax follows the same rules as modifying an existing window name within the WINDOW clause; see the reference *************** ROWS BETWEEN UNBOUNDED PRECEDING AND UNB *** 1622,1627 **** --- 1623,1631 ---- + The frame_clause specifies + the set of rows constituting the window frame, for those + window functions that act on the frame instead of the whole partition. The default framing option is RANGE UNBOUNDED PRECEDING, which is the same as RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW; it selects rows up through the current row's last *************** ROWS BETWEEN UNBOUNDED PRECEDING AND UNB *** 1639,1646 **** The built-in window functions are described in . Also, any built-in or ! user-defined aggregate function can be used as a window function. --- 1643,1651 ---- The built-in window functions are described in . Other window functions can be added by ! the user. Also, any built-in or user-defined aggregate function can be ! used as a window function.