Re: SELECT FOR UPDATE and LIMIT 1 behave oddly

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: SELECT FOR UPDATE and LIMIT 1 behave oddly
Date: 2004-10-16 17:35:16
Message-ID: 1097948116.12716.32.camel@linda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, 2004-10-15 at 17:09, Josh Berkus wrote:
> I propose that I add this sentence to the Docs:
>
> --------------
> Please not that, since LIMIT is applied before FOR UPDATE, rows which
^^^
I assume this should be "note". It took me a little time to parse your
plaintive appeal correctly. :-)

> disappear from the target set while waiting for a lock may result in less
> than LIMIT # of rows being returned. This can result in unintuitive
> behavior, so FOR UPDATE and LIMIT should only be combined after significant
> testing.
> ---------------

--
Oliver Elphick olly(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
========================================
"But be ye doers of the word, and not hearers only,
deceiving your own selves." James 1:22

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Fuhr 2004-10-17 02:45:10 Stale entries in pg_stat_activity
Previous Message Josh Berkus 2004-10-15 16:09:47 Re: SELECT FOR UPDATE and LIMIT 1 behave oddly