SELECT FOR UPDATE - Mailing list pgsql-general

From jose
Subject SELECT FOR UPDATE
Date
Msg-id 3B83B1ED.9050406@sferacarta.com
Whole thread Raw
In response to Re: Sort by foreign date column  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: SELECT FOR UPDATE
List pgsql-general
Hi all,

I'm trying SELECT FOR UPDATE
but I have a problem with locks.

example:
I have two users accessing to the same records, say...

user1:
DELECT * FROM table WHERE field=value FOR UPDATE
---------------------------------------------------------------------------

user2:
DELECT * FROM table WHERE field=value FOR UPDATE
at this point user2 can't do nothing except waiting for user1 unlock recors.

My question is:

- Is it possible to know  in advance if the records of a given query are
locked, to prevent to be locked for ever?

Thank for any help,

Jose Soares




pgsql-general by date:

Previous
From: Miroslav Koncar
Date:
Subject: problems transfering databases
Next
From: Tom Lane
Date:
Subject: Re: add, subtract bool type