Re: Adding a column to a VIEW which has dependent objects.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Adding a column to a VIEW which has dependent objects.
Дата
Msg-id 9810.1073753325@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Adding a column to a VIEW which has dependent objects.  (Rajesh Kumar Mallah <mallah@trade-india.com>)
Ответы Re: Adding a column to a VIEW which has dependent objects.
Список pgsql-sql
Rajesh Kumar Mallah <mallah@trade-india.com> writes:
> How do people extend a parent view which has
> lot of dependent views?
> The parent view cannot be dropped because that will
> require recreating a dozen of dependent views.

You're out of luck, you'll have to drop and remake them all.
In future we could think about some kind of ALTER VIEW ADD COLUMN
operation, but it ain't there now.

(I suppose if you were really desperate you could think about manually
hacking the system catalogs, but this would be pretty risky on a
production database.)

> Also is there an easy way of dumping the definitions
> of all the dependent views of a given object.

You can chase the links in pg_depend to see what the dependent objects
are, but extracting their definitions would be a tad harder ...
        regards, tom lane


В списке pgsql-sql по дате отправления:

Предыдущее
От: Rajesh Kumar Mallah
Дата:
Сообщение: Adding a column to a VIEW which has dependent objects.
Следующее
От: Jeff Eckermann
Дата:
Сообщение: Re: data loading