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/ 

Reply via email to