Re: pg_depend - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_depend
Date
Msg-id 25685.995391232@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_depend  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: pg_depend
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Bruce Momjian writes:
>> But how then do you find the system table that uses the given oid?

> It's implied by the column you're looking at.

It is?  Remember that we need to use this table to get from an object
to the objects that depend on it.  A datatype OID, for example, would
have table OIDs (for column datatypes), function OIDs (for argument
datatypes), operator OIDs (ditto), aggregate OIDs (ditto), etc etc
dependent on it.  How will you intuit which of those is represented
by a given row in pg_depend?

The alternative to pg_depend is to do a brute force scan of all the
system catalogs looking for dependent objects.  In that case, you'd
know what you are looking at, but if we extract the dependencies as
a separate table, I don't see how you'd know without being told.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: pg_depend
Next
From: fche@redhat.com (Frank Ch. Eigler)
Date:
Subject: Re: Idea: recycle WAL segments, don't delete/recreate 'em