aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-04-22 04:20:44 +0000
committerBruce Momjian <bruce@momjian.us>2005-04-22 04:20:44 +0000
commitd76f279a55203472302944ab592f6e681b367c48 (patch)
treee616208901972efc04aad99b0e8be468c59ab31d
parent26bb65df1e76e88bf0915cc563a627f983bc9ee1 (diff)
downloadpostgresql-d76f279a55203472302944ab592f6e681b367c48.tar.gz
postgresql-d76f279a55203472302944ab592f6e681b367c48.zip
Remove pre-7.3 mention that FOR UPDATE can be before LIMIT.
Document that FOR UPDATE and LIMIT together can return fewer rows that LIMIT specifies, and why.
-rw-r--r--doc/src/sgml/ref/select.sgml14
1 files changed, 8 insertions, 6 deletions
diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml
index 9044adfa8c8..444b72cebe5 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.83 2005/04/08 00:59:58 neilc Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/select.sgml,v 1.84 2005/04/22 04:20:44 momjian Exp $
PostgreSQL documentation
-->
@@ -830,11 +830,13 @@ FOR UPDATE [ OF <replaceable class="parameter">table_name</replaceable> [, ...]
</para>
<para>
- <literal>FOR UPDATE</literal> may appear before
- <literal>LIMIT</literal> for compatibility with
- <productname>PostgreSQL</productname> versions before 7.3. It
- effectively executes after <literal>LIMIT</literal>, however, and
- so that is the recommended place to write it.
+ It is possible for a <command>SELECT</> command using both
+ <literal>LIMIT</literal> and <literal>FOR UPDATE</literal>
+ clauses to return fewer rows than specified by <literal>LIMIT</literal>.
+ This is because <literal>LIMIT</> selects a number of rows,
+ but might then block requesting a <literal>FOR UPDATE</literal> lock.
+ Once the <literal>SELECT</> unblocks, the query qualifiation might not
+ be met and the row not be returned by <literal>SELECT</>.
</para>
</refsect2>
</refsect1>