From: | Carlos Santos <carloscompels(at)yahoo(dot)com(dot)br> |
---|---|
To: | Lista PostgreSQL SQL <pgsql-sql(at)postgresql(dot)org> |
Subject: | How can I know if a row is Locked? |
Date: | 2007-04-13 11:27:34 |
Message-ID: | 651844.97452.qm@web57110.mail.re3.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
How can I know if a row is locked by another transaction.
I have in a transaction like that:
BEGIN;
SELECT * FROM compels.teste WHERE id = '1' FOR UPDATE;
PS1: where id is the primary key.
PS2: The COMMIT command is done after a long time.
In this case the row with the primary-key equals to '1' will be locked to other transactions until the COMMIT command be executed.
So, how can I detect if this row is locked?
Tks
Carlos Henrique Iazzetti Santos
Compels Informática
Santa Rita do Sapucaí - MG
www.compels.net
__________________________________________________
Fale com seus amigos de graça com o novo Yahoo! Messenger
http://br.messenger.yahoo.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Marcin Stępnicki | 2007-04-13 11:48:52 | Re: How can I know if a row is Locked? |
Previous Message | Dmitry Turin | 2007-04-13 07:58:12 | We all are looped on Internet: request + transport = invariant |