Re: Elementary dependency look-up

Поиск
Список
Период
Сортировка
От decibel
Тема Re: Elementary dependency look-up
Дата
Msg-id C816EB25-BF3C-4848-AA9C-57A9C7434B95@decibel.org
обсуждение исходный текст
Ответ на Re: Elementary dependency look-up  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Elementary dependency look-up  (Josh Williams <joshwilliams@ij.net>)
Re: Elementary dependency look-up  (Greg Smith <gsmith@gregsmith.com>)
Список pgsql-hackers
On Sep 9, 2009, at 8:05 AM, Peter Eisentraut wrote:
> On Thu, 2009-09-03 at 20:45 -0400, Josh Williams wrote:
>> The patch adds two new functions to the backend, pg_get_owner_object
>> and
>> pg_get_owner_column.  These look up the requested object in the
>> pg_depend table, looking for an 'a' type dependency to another
>> relation,
>> and resolve either the relation or column names to text.
>
> How is this better than just reading the information directly from
> pg_depend?


pg_depend is very difficult to use. You have to really, really know  
the catalogs to be able to figure it out. Part of the problem is  
(afaik) there's nothing that documents every kind of record/ 
dependency you might find in there.

What might be more useful is a view that takes the guesswork out of  
using pg_depend. Namely, convert (ref)classid into a catalog table  
name (or better yet, what type of object it is), (ref)objid into an  
actual object name, and (ref)objsubid into a real name.
-- 
Decibel!, aka Jim C. Nasby, Database Architect  decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Marko Kreen
Дата:
Сообщение: Re: [rfc] unicode escapes for extended strings
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: RfD: more powerful "any" types