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.
pgsql-bugs by date
|Next:||From: Tom Lane||Date: 2002-06-25 22:28:46|
|Subject: Re: Bug #698: Error haciendo Backup con pg_dump!! |
|Previous:||From: pgsql-bugs||Date: 2002-06-25 18:42:01|
|Subject: Bug #698: Error haciendo Backup con pg_dump!!|