Re: pg_depend - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: pg_depend
Date
Msg-id 200107180229.f6I2TsD24825@candle.pha.pa.us
Whole thread Raw
In response to Re: pg_depend  (Hiroshi Inoue <Inoue@tpf.co.jp>)
List pgsql-hackers
> Then we have an pg_depend entry e.g.
> 
>     pg_class_relid
>     oid of the view_a
>     pg_class_relid
>     oid of the table a
>     'a' the name of the table
> 
> and so on.
> 
>  drop table a; (unadorned drop).
> 
> Then the above entry would be changed to
> 
>     pg_class_relid(unchanged)
>     oid of the view_s(unchagned)
>     pg_class_relid(unchanged)
>     InvalidOid
>     'a' the name of the table(unchanged)
> 
>  create table a (...);
> 
> Then the pg_depend entry would be
> 
>     pg_class_relid(unchanged)
>     oid of the view_s(unchagned)
>     pg_class_relid(unchanged)
>     the oid of the new table a
>     'a' the name of the table(unchanged)

So you want to keep the name of the referenced object in case it is
dropped.  Makes sense.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: pg_depend
Next
From: Philip Warner
Date:
Subject: Re: pg_depend