aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-04-14 10:57:29 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-04-14 10:57:29 -0400
commitfda21aa05bdc96c2c4141f5fd1245a11a41cf62c (patch)
treeb0ff2c5453a6a3f03a6ce97f5ea479a9859bac46
parent22989a8e34168f576e0f90b16fc3edabd28c40e6 (diff)
downloadpostgresql-fda21aa05bdc96c2c4141f5fd1245a11a41cf62c.tar.gz
postgresql-fda21aa05bdc96c2c4141f5fd1245a11a41cf62c.zip
Docs: clarify description of LIMIT/OFFSET behavior.
Section 7.6 was a tad confusing because it specified what LIMIT NULL does, but neglected to do the same for OFFSET NULL, making this look like perhaps a special case or a wrong restatement of the bit about LIMIT ALL. Wordsmith a bit while at it. Per bug #14084.
-rw-r--r--doc/src/sgml/queries.sgml11
1 files changed, 7 insertions, 4 deletions
diff --git a/doc/src/sgml/queries.sgml b/doc/src/sgml/queries.sgml
index b37adaa9ee6..718262f1aa7 100644
--- a/doc/src/sgml/queries.sgml
+++ b/doc/src/sgml/queries.sgml
@@ -1794,16 +1794,19 @@ SELECT <replaceable>select_list</replaceable>
<para>
If a limit count is given, no more than that many rows will be
- returned (but possibly less, if the query itself yields less rows).
+ returned (but possibly fewer, if the query itself yields fewer rows).
<literal>LIMIT ALL</> is the same as omitting the <literal>LIMIT</>
- clause.
+ clause, as is <literal>LIMIT</> with a NULL argument.
</para>
<para>
<literal>OFFSET</> says to skip that many rows before beginning to
return rows. <literal>OFFSET 0</> is the same as omitting the
- <literal>OFFSET</> clause, and <literal>LIMIT NULL</> is the same
- as omitting the <literal>LIMIT</> clause. If both <literal>OFFSET</>
+ <literal>OFFSET</> clause, as is <literal>OFFSET</> with a NULL argument.
+ </para>
+
+ <para>
+ If both <literal>OFFSET</>
and <literal>LIMIT</> appear, then <literal>OFFSET</> rows are
skipped before starting to count the <literal>LIMIT</> rows that
are returned.