Re: Is there a way to 'unrestrict' drop view?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Is there a way to 'unrestrict' drop view?
Дата
Msg-id 8808.1311343014@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Is there a way to 'unrestrict' drop view?  (Thomas Pasch <thomas.pasch@nuclos.de>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Timestamp parsing with blanked time part
Следующее
От: "Albe Laurenz"
Дата:
Сообщение: Re: Is there a way to 'unrestrict' drop view?