hi,
how can i detect a lock on a table or
a lock on a row (SELECT .... FOR UPDATE)
is this the right way, if i use the property connectiontimeout,
but i think there is a better way?
thank's
locks detecting
locks detecting
Information about lock tables you can obtain from the table pg_locks.
Here you get a list of locked tables at the moment of execution the query:
Here you get a list of locked tables at the moment of execution the query:
Code: Select all
select pg_class.relname from pg_locks inner join pg_class on relation = pg_class.oid
where pg_class.relname 'pg_locks' and pg_class.relname 'pg_class'
-
- Posts: 1
- Joined: Wed 03 Feb 2010 11:24
hi
is there any way to detect keys as well
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
Please specify the keys you mean. If, e.g., these are table primary keys, you may get their descriptions using the GetSchema method of the PgSqlConnection object:
Code: Select all
DataTable primaryKeys = pgSqlConnection1.GetSchema(PgSqlMetaDataCollectionNames.PrimaryKeys);