Re: pg_depend

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Alex Pilosov <alex(at)pilosoft(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_depend
Date: 2001-07-17 17:33:52
Message-ID: 25685.995391232@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2001-07-17 17:43:22 Re: ALTER TABLE ADD COLUMN column SERIAL -- unexpected results
Previous Message Bruce Momjian 2001-07-17 17:31:16 Re: Idea: recycle WAL segments, don't delete/recreate 'em