Remove pre-7.3 mention that FOR UPDATE can be before LIMIT.
authorBruce Momjian
Fri, 22 Apr 2005 04:20:44 +0000 (04:20 +0000)
committerBruce Momjian
Fri, 22 Apr 2005 04:20:44 +0000 (04:20 +0000)
Document that FOR UPDATE and LIMIT together can return fewer rows that
LIMIT specifies, and why.

doc/src/sgml/ref/select.sgml

index 9044adfa8c89f4f39aa2c95718d52c22b0290471..444b72cebe54c32e17ec6459a2e7cc0b3e5237ba 100644 (file)
@@ -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.