Re: [GENERAL] How to add columns to view with dependencies

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема Re: [GENERAL] How to add columns to view with dependencies
Дата
Msg-id 20170417034011.GB28599@telsasoft.com
обсуждение исходный текст
Ответ на [GENERAL] How to add columns to view with dependencies  (Guyren Howe <guyren@gmail.com>)
Список pgsql-general
On Sun, Apr 16, 2017 at 08:02:54PM -0700, Guyren Howe wrote:
> Seems like a simple question, but I’ve never found a good answer to this and similar issues.
>
> I would think it was safe to let me add columns to a view on which other views depend, but Postgres won’t let me.
>
> I can imagine ways of sort-of dealing with this. I might maintain a SQL file with views to create in a suitable
order,Then I could drop all views, edit the definition of one, then run the file, but this is awfully tedious. 
>
> What is best practice in this situation?

If you're not re-ordering existing columns, you can use CREATE OR REPLACE VIEW

Justin


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

Предыдущее
От: Guyren Howe
Дата:
Сообщение: [GENERAL] How to add columns to view with dependencies
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] How to add columns to view with dependencies