Skip site navigation (1) Skip section navigation (2)

Lock : How to know if a row is locked ?

From: Patrice Espié <patrice(dot)espie(at)univ-lyon2(dot)fr>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Lock : How to know if a row is locked ?
Date: 2001-04-10 12:34:34
Message-ID: 006501c0c1ba$99845bc0$0400a8c0@univlyon2.fr (view raw or flat)
Thread:
Lists: pgsql-novice
Hello,

I know SELECT ... FOR UPDATE, but if a row is cirrently locked, my user will
wait until the row is unlocked ... perhaps one hour if the other user (the
'locker' one) is taking a bath :)

Here are my two questions :
.o. How could I know if a row is locked before doing a SELECT ... FOR UPDATE
?
.o. Using an ODBC interface (under Windows), how could I get a timeout
(knowing that SQLSetStmtAttr( m_hStmt, SQL_ATTR_QUERY_TIMEOUT,
(void*)SecondTimeOut, SQL_IS_INTEGER ) doesn't works...) which stops (break
?) the SELECT or other SQL order ?

Thanks
Patrice Espié
--
Le Monde, c'est comme un éléphant
qui va à la pêche



pgsql-novice by date

Next:From: Patrice EspiéDate: 2001-04-10 14:30:18
Subject: Buggy SELEC ... FROM UPDATE ?
Previous:From: manoj gargDate: 2001-04-10 11:15:39
Subject: how to run postgre on winNT

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group