summaryrefslogtreecommitdiff
path: root/doc/src/sgml
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-08-18 23:40:20 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-08-18 23:40:20 +0000
commitbe4cd18f71daef23d85703fb7542ae50d802e07c (patch)
tree8e73a2ac733a8c85136d59dfeb59bdfddd7c6d4c /doc/src/sgml
parent514c3f19a2cba010c9e7b5abcd20c540fcbf6c0f (diff)
Allow mixing of traditional and SQL:2008 LIMIT/OFFSET syntax. Being rigid
about it doesn't simplify the grammar at all, and it does invite confusion among those who only read the SELECT syntax summary and not the full details. Per gripe from Jaime Casanova.
Diffstat (limited to 'doc/src/sgml')
-rw-r--r--doc/src/sgml/ref/select.sgml11
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml
index 9675adcbf86..d67d2b4ff76 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.123 2009/08/18 23:40:20 tgl Exp $
PostgreSQL documentation
-->
@@ -1005,14 +1005,15 @@ OFFSET <replaceable class="parameter">start</replaceable>
<para>
SQL:2008 introduced a different syntax to achieve the same thing,
- which PostgreSQL also supports. It is:
+ which <productname>PostgreSQL</> also supports. It is:
<synopsis>
OFFSET <replaceable class="parameter">start</replaceable> { ROW | ROWS }
FETCH { FIRST | NEXT } [ <replaceable class="parameter">count</replaceable> ] { ROW | ROWS } ONLY
</synopsis>
- Both clauses are optional, but if present
- the <literal>OFFSET</literal> clause must come before
- the <literal>FETCH</literal> clause. <literal>ROW</literal>
+ According to the standard, the <literal>OFFSET</literal> clause must come
+ before the <literal>FETCH</literal> clause if both are present; but
+ <productname>PostgreSQL</> is laxer and allows either order.
+ <literal>ROW</literal>
and <literal>ROWS</literal> as well as <literal>FIRST</literal>
and <literal>NEXT</literal> are noise words that don't influence
the effects of these clauses. In this syntax, when using expressions