alter view, add/drop column

Поиск
Список
Период
Сортировка
От Gauthier, Dave
Тема alter view, add/drop column
Дата
Msg-id 0AD01C53605506449BA127FB8B99E5E1180311AA@FMSMSX105.amr.corp.intel.com
обсуждение исходный текст
Ответы Re: alter view, add/drop column  (Johan Nel <johan.nel@xsinet.co.za>)
Список pgsql-general

I googled around and found that adding/dropping columns from views is not available. (if not true, I'm all ears).

 

Given that, what's the best way to do this?  I was thinking along the lines of a stored procedure that reads the view's definition, modifies it, drops the view, recreates the view.  The main concern here is that the view drop may fail if someone is using it.  (is that a valid concern?).  The procedure would take as args  a verb (add/delete/rename), an object (column to operate on), new name (optional, not used for delete), maybe a table name to know where in the view def to add the new column.

 

But I'm all ears for other suggestions.

 

Thanks !

 

 

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

Предыдущее
От: damien clochard
Дата:
Сообщение: pgBadger 2.0 released
Следующее
От: Tom Lane
Дата:
Сообщение: Re: postgres process got stuck in "notify interrupt waiting" status