Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd76f279

Browse files
committed
Remove pre-7.3 mention that FOR UPDATE can be before LIMIT.
Document that FOR UPDATE and LIMIT together can return fewer rows thatLIMIT specifies, and why.
1 parent26bb65d commitd76f279

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

‎doc/src/sgml/ref/select.sgml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/select.sgml,v 1.83 2005/04/08 00:59:58 neilc Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/select.sgml,v 1.84 2005/04/22 04:20:44 momjian Exp $
33
PostgreSQL documentation
44
-->
55

@@ -830,11 +830,13 @@ FOR UPDATE [ OF <replaceable class="parameter">table_name</replaceable> [, ...]
830830
</para>
831831

832832
<para>
833-
<literal>FOR UPDATE</literal> may appear before
834-
<literal>LIMIT</literal> for compatibility with
835-
<productname>PostgreSQL</productname> versions before 7.3. It
836-
effectively executes after <literal>LIMIT</literal>, however, and
837-
so that is the recommended place to write it.
833+
It is possible for a <command>SELECT</> command using both
834+
<literal>LIMIT</literal> and <literal>FOR UPDATE</literal>
835+
clauses to return fewer rows than specified by <literal>LIMIT</literal>.
836+
This is because <literal>LIMIT</> selects a number of rows,
837+
but might then block requesting a <literal>FOR UPDATE</literal> lock.
838+
Once the <literal>SELECT</> unblocks, the query qualifiation might not
839+
be met and the row not be returned by <literal>SELECT</>.
838840
</para>
839841
</refsect2>
840842
</refsect1>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp