Lock : How to know if a row is locked ? - Mailing list pgsql-novice

From Patrice Espié
Subject Lock : How to know if a row is locked ?
Date
Msg-id 006501c0c1ba$99845bc0$0400a8c0@univlyon2.fr
Whole thread Raw
List 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:

Previous
From: Nabil Sayegh
Date:
Subject: Re: Calling 'c' function from PostGreSQL
Next
From: Patrice Espié
Date:
Subject: Buggy SELEC ... FROM UPDATE ?