SELECT FOR UPDATE

From: jose <jose(at)sferacarta(dot)com>
To: Postgres <pgsql-general(at)postgresql(dot)org>
Subject: SELECT FOR UPDATE
Date: 2001-08-22 13:21:49
Message-ID: 3B83B1ED.9050406@sferacarta.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-08-22 14:21:50 Re: add, subtract bool type
Previous Message Miroslav Koncar 2001-08-22 13:20:04 problems transfering databases