Re: SELECT FOR UPDATE and LIMIT 1 behave oddly

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: SELECT FOR UPDATE and LIMIT 1 behave oddly
Date: 2004-10-14 16:45:20
Message-ID: 200410140945.20826.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Tom,

> The FOR UPDATE part executes after the LIMIT part. Arguably this is a
> bad thing, but I'm concerned about the compatibility issues if we change
> it.

In that case, maybe I should do a doc patch warning people not to combine
them?

Hmmm .... come to think of it, is there any easy way to query "give me the
first row which is not locked"? If I tie pg_locks to a query, will I get
wierd effects? Just musing ....

--
Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Ivan Esteban Rivera Uria 2004-10-14 22:11:37 finger print (minutias)
Previous Message Federico Di Gregorio 2004-10-14 11:06:39 Re: BUG #1286: indices not used after a pg_restore