Skip site navigation (1) Skip section navigation (2)

Re: view OIDs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David M(dot) Kaplan" <dmkaplan(at)ucdavis(dot)edu>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: view OIDs
Date: 2002-06-26 15:02:51
Message-ID: 2465.1025103771@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"David M. Kaplan" <dmkaplan(at)ucdavis(dot)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



In response to

  • view OIDs at 2002-06-25 22:14:18 from David M. Kaplan

pgsql-bugs by date

Next:From: Webb SpragueDate: 2002-06-26 17:38:32
Subject: Re: "Field is too small"
Previous:From: Tatsuo IshiiDate: 2002-06-26 15:00:15
Subject: Re: [Fwd: [GENERAL] [Please Help!!!!!!!!] Problem in

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group