view OIDs
От | David M. Kaplan |
---|---|
Тема | view OIDs |
Дата | |
Msg-id | 3D18EB3A.1050507@ucdavis.edu обсуждение исходный текст |
Ответы |
Re: view OIDs
|
Список | 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
В списке pgsql-bugs по дате отправления: