Re: Elementary dependency look-up

From: decibel <decibel(at)decibel(dot)org>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Josh Williams <joshwilliams(at)ij(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Elementary dependency look-up
Date: 2009-09-09 16:30:35
Message-ID: C816EB25-BF3C-4848-AA9C-57A9C7434B95@decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)decibel(dot)org
Give your computer some brain candy! www.distributed.net Team #1828

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2009-09-09 16:37:07 Re: RfD: more powerful "any" types
Previous Message Maarten Foqué 2009-09-09 15:57:34 corrupted double-linked list