view OIDs

From: "David M(dot) Kaplan" <dmkaplan(at)ucdavis(dot)edu>
To: pgsql-bugs(at)postgresql(dot)org
Subject: view OIDs
Date: 2002-06-25 22:14:18
Message-ID: 3D18EB3A.1050507@ucdavis.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

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.

Is there any fix for this?

If there isnt, I was thinking of trying to implement something. I can
think of several possible solutions:

1) Allow users to create views with particular OID's. For example
something like CREATE VIEW WITH OID=.... Seems like the simplest solution.

2) On using views that depend on a subview that has changed, if OID
fails, fallback to view name and use that. It seems that postgres is
aware that another view with the same name exists, as the error is
different in this case than if the view is simply absent. This would
solve the problem, but it would be nice to update the OIDs somehow.

3) Upon creating a view with a certain name, make all views that depend
on it point to it with the correct OID.

David Kaplan

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2002-06-25 22:28:46 Re: Bug #698: Error haciendo Backup con pg_dump!!
Previous Message pgsql-bugs 2002-06-25 18:42:01 Bug #698: Error haciendo Backup con pg_dump!!