Re: pg_depend

From: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Alex Pilosov <alex(at)pilosoft(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_depend
Date: 2001-07-18 14:52:32
Message-ID: 20010718095232.B25319@rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 18, 2001 at 01:08:15PM +1000, Philip Warner wrote:
> At 11:25 18/07/01 +0900, Hiroshi Inoue wrote:
> >
> >Oops I made a mistake.
> >Reference name is needed not an object name,
> >i.e
> > object relid
> > object oid
> > relerence relid
> > reference oid
> > reference name
> >
>
> I think any deisgn needs to cater for attr dependencies. eg.
>
> create table a (f1 int4, f2 int8);
> create view view_a as select f2 from a;
>
> Then
>
> alter table a drop f1; -- Is OK. Should just happen
> alter table a drop f2; -- Should warn about the view, and/or cascade etc.
> alter table a alter f2 float; -- Should trigger a view recompilation.
>
> ...same thing needs to happen with constraints that reference attrs
>
> I *think* tables are the only items that can have subobjects with dependant.

Wouldn't that work simply by using the oid for the column in pg_attribute
as the primary dependency, rather than the table itself, from pg_class? So,
the dependency chain would be:

view -> attribute -> table

So your examples would 'just work', I think.

Ross

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Warner 2001-07-18 14:58:26 Re: pg_depend
Previous Message Ross J. Reedstrom 2001-07-18 14:48:28 Re: pg_depend