Обсуждение: Feature request - Decode relation in Server Status / Lock display

Поиск
Список
Период
Сортировка

Feature request - Decode relation in Server Status / Lock display

От
Mike Blackwell
Дата:
Would it be possible, perhaps as an option, to display the relation 
name, and possibly the type, in the Server Status Lock display?

Mike


Re: Feature request - Decode relation in Server Status / Lock display

От
Guillaume Lelarge
Дата:
Mike Blackwell wrote:
> Would it be possible, perhaps as an option, to display the relation 
> name, and possibly the type, in the Server Status Lock display?
> 

It already does this but you only have relation names for relations 
belonging to the database you're connected to (ie your maintenance 
database).


-- 
Guillaume. http://www.postgresqlfr.org http://dalibo.com


Re: Feature request - Decode relation in Server Status / Lock display

От
Guillaume Lelarge
Дата:
Mike Blackwell wrote:
> Guillaume Lelarge wrote:
>> Mike Blackwell wrote:
>>> Would it be possible, perhaps as an option, to display the relation 
>>> name, and possibly the type, in the Server Status Lock display?
>>>
>>
>> It already does this but you only have relation names for relations 
>> belonging to the database you're connected to (ie your maintenance 
>> database).
>>
>>
> Hmm...
> 
> Connected to via the initial connection as listed in the server 
> registrartion window?

Yes, this is the maintenance database.

>  Or connected to by selecting it in the Object 
> browser so it no longer has on X on the icon, or the currently selected 
> database in the browser?

No.

> I generally have connections (as shown on the 
> Server Status page) to several database, including the one I expect to 
> have the locks in question, but do not see the relations translated.
> What prevents showing the names for all databases?

It's a PostgreSQL security feature. When you're connected to a database, 
tables from other databases are not available (even their names).
  It's curious that
> the oids are available but not the names.  I should really brush off my 
> C skills and take a look at the code sometime to see what's going on in 
> there. ^_^'''

:)


-- 
Guillaume. http://www.postgresqlfr.org http://dalibo.com


Re: Feature request - Decode relation in Server Status / Lock display

От
Guillaume Lelarge
Дата:
Mike Blackwell wrote:
> Guillaume Lelarge wrote:
>> It's a PostgreSQL security feature. When you're connected to a 
>> database, tables from other databases are not available (even their 
>> names).
>>
>>   It's curious that
>>> the oids are available but not the names.  I should really brush off 
>>> my C skills and take a look at the code sometime to see what's going 
>>> on in there. ^_^'''
>>
>> :)
>>
>>
> 
> Ah.  I see.  So to display the names, we'd have to connect to each 
> database in turn and look for a name that matched the oid, right?  Might 
> be worth it, as that's what I end up having to do manually, anyway. ^_^
> 
> 

Something that would be interesting to do is to add a combobox to 
quickly change the database used for connection (something like the 
connection combo box in the query tool).


-- 
Guillaume. http://www.postgresqlfr.org http://dalibo.com