pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Carlos Santos <carloscompels@yahoo.com.br>
To: Lista PostgreSQL SQL <pgsql-sql@postgresql.org>
Subject: How can I know if a row is Locked?
Date: Fri, 13 Apr 2007 04:27:34 -0700 (PDT)
Message-ID: <651844.97452.qm@web57110.mail.re3.yahoo.com> (raw)

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/ 

view thread (3+ messages)  latest in thread

Message-ID: <651844.97452.qm@web57110.mail.re3.yahoo.com>
Permalink:  ../651844.97452.qm@web57110.mail.re3.yahoo.com/
Also on:    postgresql.org/message-id/651844.97452.qm@web57110.mail.re3.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: carloscompels@yahoo.com.br
  Subject: Re: How can I know if a row is Locked?
  In-Reply-To: <651844.97452.qm@web57110.mail.re3.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox