Re: Is there a way to 'unrestrict' drop view? - Mailing list pgsql-general

From Tom Lane
Subject Re: Is there a way to 'unrestrict' drop view?
Date
Msg-id 8808.1311343014@sss.pgh.pa.us
Whole thread Raw
In response to Re: Is there a way to 'unrestrict' drop view?  (Thomas Pasch <thomas.pasch@nuclos.de>)
List pgsql-general
Thomas Pasch <thomas.pasch@nuclos.de> writes:
> 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).

> I completely agree that the view should be usable again at the end of
> transaction (even thus Oracle DB doesn't impose that either), but drop
> and re-create the objects in correct order is painful.

Well, if the dependent objects don't need to be touched because the
view's API (its output column set) isn't changing, then you can use
CREATE OR REPLACE VIEW.

If the output column set *is* changing, you need to redefine all the
dependent objects anyway.  Oracle may be willing to guess at what
should happen to them, but Postgres isn't.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Timestamp parsing with blanked time part
Next
From: "Albe Laurenz"
Date:
Subject: Re: Is there a way to 'unrestrict' drop view?