dbTalk Databases Forums  

relation column in pg_locks

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss relation column in pg_locks in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Frank Kurzawa
 
Posts: n/a

Default relation column in pg_locks - 08-26-2004 , 10:53 AM






How can I find out what object corresponds to a given OID in the
relation column in the pg_locks table?

Thanks in advance,

Frank


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: relation column in pg_locks - 08-26-2004 , 11:01 AM






Frank Kurzawa <fkurzawa (AT) topazsoftware (DOT) com> writes:
Quote:
How can I find out what object corresponds to a given OID in the
relation column in the pg_locks table?
Join to pg_class.oid:

select relname from pg_locks, pg_class where relation = pg_class.oid;

or cast it to regclass:

select relation::regclass from pg_locks;

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.