diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
new file mode 100644
index daa56e9..e50408c
*** a/doc/src/sgml/func.sgml
--- b/doc/src/sgml/func.sgml
*************** SELECT xmlagg(x) FROM (SELECT x FROM tes
*** 13050,13056 ****
     <firstterm>Window functions</firstterm> provide the ability to perform
     calculations across sets of rows that are related to the current query
     row.  See <xref linkend="tutorial-window"> for an introduction to this
!    feature.
    </para>
  
    <para>
--- 13050,13057 ----
     <firstterm>Window functions</firstterm> provide the ability to perform
     calculations across sets of rows that are related to the current query
     row.  See <xref linkend="tutorial-window"> for an introduction to this
!    feature, and <xref linkend="syntax-window-functions"> for syntax
!    details.
    </para>
  
    <para>
diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml
new file mode 100644
index b69b634..940d1aa
*** a/doc/src/sgml/ref/select.sgml
--- b/doc/src/sgml/ref/select.sgml
*************** UNBOUNDED FOLLOWING
*** 792,799 ****
      The default framing option is <literal>RANGE UNBOUNDED PRECEDING</>,
      which is the same as <literal>RANGE BETWEEN UNBOUNDED PRECEDING AND
      CURRENT ROW</>; it sets the frame to be all rows from the partition start
!     up through the current row's last peer in the <literal>ORDER BY</>
!     ordering (which means all rows if there is no <literal>ORDER BY</>).
      In general, <literal>UNBOUNDED PRECEDING</> means that the frame
      starts with the first row of the partition, and similarly
      <literal>UNBOUNDED FOLLOWING</> means that the frame ends with the last
--- 792,800 ----
      The default framing option is <literal>RANGE UNBOUNDED PRECEDING</>,
      which is the same as <literal>RANGE BETWEEN UNBOUNDED PRECEDING AND
      CURRENT ROW</>; it sets the frame to be all rows from the partition start
!     up through the current row's last peer (a row that <literal>ORDER
!     BY</> considers equivalent to the current row, or all rows if there
!     is no <literal>ORDER BY</>).
      In general, <literal>UNBOUNDED PRECEDING</> means that the frame
      starts with the first row of the partition, and similarly
      <literal>UNBOUNDED FOLLOWING</> means that the frame ends with the last
*************** UNBOUNDED FOLLOWING
*** 817,823 ****
      results if the <literal>ORDER BY</> ordering does not order the rows
      uniquely.  The <literal>RANGE</> options are designed to ensure that
      rows that are peers in the <literal>ORDER BY</> ordering are treated
!     alike; any two peer rows will be both in or both not in the frame.
     </para>
  
     <para>
--- 818,824 ----
      results if the <literal>ORDER BY</> ordering does not order the rows
      uniquely.  The <literal>RANGE</> options are designed to ensure that
      rows that are peers in the <literal>ORDER BY</> ordering are treated
!     alike; all peer rows will be in the same frame.
     </para>
  
     <para>
diff --git a/doc/src/sgml/syntax.sgml b/doc/src/sgml/syntax.sgml
new file mode 100644
index 434a894..2f0680f
*** a/doc/src/sgml/syntax.sgml
--- b/doc/src/sgml/syntax.sgml
*************** UNBOUNDED FOLLOWING
*** 1877,1883 ****
      first <firstterm>peer</> row (a row that <literal>ORDER BY</> considers
      equivalent to the current row), while a <replaceable>frame_end</> of
      <literal>CURRENT ROW</> means the frame ends with the last equivalent
!     peer.  In <literal>ROWS</> mode, <literal>CURRENT ROW</> simply means
      the current row.
     </para>
  
--- 1877,1883 ----
      first <firstterm>peer</> row (a row that <literal>ORDER BY</> considers
      equivalent to the current row), while a <replaceable>frame_end</> of
      <literal>CURRENT ROW</> means the frame ends with the last equivalent
!     <literal>ORDER BY</> peer.  In <literal>ROWS</> mode, <literal>CURRENT ROW</> simply means
      the current row.
     </para>
  
*************** UNBOUNDED FOLLOWING
*** 1897,1903 ****
      which is the same as <literal>RANGE BETWEEN UNBOUNDED PRECEDING AND
      CURRENT ROW</>.  With <literal>ORDER BY</>, this sets the frame to be
      all rows from the partition start up through the current row's last
!     peer.  Without <literal>ORDER BY</>, all rows of the partition are
      included in the window frame, since all rows become peers of the current
      row.
     </para>
--- 1897,1903 ----
      which is the same as <literal>RANGE BETWEEN UNBOUNDED PRECEDING AND
      CURRENT ROW</>.  With <literal>ORDER BY</>, this sets the frame to be
      all rows from the partition start up through the current row's last
!     <literal>ORDER BY</> peer.  Without <literal>ORDER BY</>, all rows of the partition are
      included in the window frame, since all rows become peers of the current
      row.
     </para>
