Thomas Pasch wrote:
> well, the reason I'm asking is that this *is* posible in Oracle DB.
For
> me it looks like that the DB knows that the view is broken. You can't
> use it, *but* it is still there (and it will be usable again when the
> view query is valid again).
True, but Oracle pays a price for it. There is never a guarantee that
all objects in the database are consistent, and in fact you're always
likely to have a number of 'invalid' objects around that might fail or
not if you use them.
> The heart of the my pain is that a program I use works like this. I
> would like to migrate the DB beneath it...
I'd say that a program that changes views on the fly has a questionable
design, but obviously that won't help you.
You could automatically find out all dependent views (via pg_depend),
get their DDL (with pg_get_viewdef()) and drop and recreate them in
order.
That's painful of course.
Yours,
Laurenz Albe