mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-18 18:44:06 +08:00
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.
This commit is contained in:
parent
26bb65df1e
commit
d76f279a55
@ -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
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -830,11 +830,13 @@ FOR UPDATE [ OF <replaceable class="parameter">table_name</replaceable> [, ...]
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<literal>FOR UPDATE</literal> may appear before
|
It is possible for a <command>SELECT</> command using both
|
||||||
<literal>LIMIT</literal> for compatibility with
|
<literal>LIMIT</literal> and <literal>FOR UPDATE</literal>
|
||||||
<productname>PostgreSQL</productname> versions before 7.3. It
|
clauses to return fewer rows than specified by <literal>LIMIT</literal>.
|
||||||
effectively executes after <literal>LIMIT</literal>, however, and
|
This is because <literal>LIMIT</> selects a number of rows,
|
||||||
so that is the recommended place to write it.
|
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>
|
</para>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
Loading…
Reference in New Issue
Block a user