From: Bruce Momjian Date: Fri, 22 Apr 2005 04:20:44 +0000 (+0000) Subject: Remove pre-7.3 mention that FOR UPDATE can be before LIMIT. X-Git-Tag: REL8_1_0BETA1~969 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d76f279a55203472302944ab592f6e681b367c48;p=postgresql 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. --- diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml index 9044adfa8c..444b72cebe 100644 --- a/doc/src/sgml/ref/select.sgml +++ b/doc/src/sgml/ref/select.sgml @@ -1,5 +1,5 @@ @@ -830,11 +830,13 @@ FOR UPDATE [ OF table_name [, ...] - FOR UPDATE may appear before - LIMIT for compatibility with - PostgreSQL versions before 7.3. It - effectively executes after LIMIT, however, and - so that is the recommended place to write it. + It is possible for a SELECT command using both + LIMIT and FOR UPDATE + clauses to return fewer rows than specified by LIMIT. + This is because LIMIT selects a number of rows, + but might then block requesting a FOR UPDATE lock. + Once the SELECT unblocks, the query qualifiation might not + be met and the row not be returned by SELECT.