Re: view OIDs - Mailing list pgsql-bugs

From Tom Lane
Subject Re: view OIDs
Date
Msg-id 2465.1025103771@sss.pgh.pa.us
Whole thread Raw
In response to view OIDs  ("David M. Kaplan" <dmkaplan@ucdavis.edu>)
List pgsql-bugs
"David M. Kaplan" <dmkaplan@ucdavis.edu> writes:
> I use a lot of views in my DB, many of whom depend on each other (ie
> views of views).  When I alter one of the subviews, all the views that
> depend on it fail.  Postgres complains that the view with the old OID no
> longer exists.  The fix is to drop and create all views that depend on
> the altered view.  This can get really tedious.

7.3 will refuse to drop a view that has such dependencies unless you
DROP CASCADE --- meaning that the dependent views go away too.

That may not be the most user-friendly approach, but at least you'll
know what definitions you need to reload.  (I am hoping to arrange
things so that if you don't CASCADE, it will tell you all the dependent
objects, not just error out after finding the first one.)

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Alfredo"
Date:
Subject: Please I want to unsusribe me from this list
Next
From: Tatsuo Ishii
Date:
Subject: Re: [Fwd: [GENERAL] [Please Help!!!!!!!!] Problem in