From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Cc: | "Thach Anh Tran" <myquartz(at)gmail(dot)com> |
Subject: | Re: BUG #5129: LIMIT not correct. |
Date: | 2009-10-21 09:59:03 |
Message-ID: | 200910211159.03544.andres@anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Wednesday 21 October 2009 05:37:36 Thach Anh Tran wrote:
> The following bug has been logged online:
>
> Bug reference: 5129
> Logged by: Thach Anh Tran
> Email address: myquartz(at)gmail(dot)com
> PostgreSQL version: 8.3.8
> Operating system: Linux
> Description: LIMIT not correct.
> Details:
>
> the LIMIT clause is not reply correct number of rows and rows returns.
Read the second caution block in the relevant section of the manual:
http://www.postgresql.org/docs/current/interactive/sql-select.html#SQL-FOR-
UPDATE-SHARE
"It is possible for a SELECT command using both LIMIT and FOR UPDATE/SHARE
clauses to return fewer rows than specified by LIMIT. This is because LIMIT is
applied first. The command selects the specified number of rows, but might then
block trying to obtain a lock on one or more of them. Once the SELECT
unblocks, the row might have been deleted or updated so that it does not meet
the query WHERE condition anymore, in which case it will not be returned.
"
Andres
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2009-10-21 11:52:54 | Re: Re: BUG #5065: pg_ctl start fails as administrator, with "could not locate matching postgres executable" |
Previous Message | Dave Page | 2009-10-21 07:45:18 | Re: Re: BUG #5065: pg_ctl start fails as administrator, with "could not locate matching postgres executable" |