Re: [GENERAL] How to drop column from interrelated views

Поиск
Список
Период
Сортировка
От Karsten Hilbert
Тема Re: [GENERAL] How to drop column from interrelated views
Дата
Msg-id 20170716100843.parphvck27m3x2zi@hermes.hilbert.loc
обсуждение исходный текст
Ответ на [GENERAL] How to drop column from interrelated views  (Guyren Howe <guyren@gmail.com>)
Список pgsql-general
On Sat, Jul 08, 2017 at 03:18:39PM -0700, Guyren Howe wrote:

> I’ve a set of interrelated views. I want to drop a column from a table and from all the views that cascade from it.
>
> I’ve gone to the leaf dependencies and removed the field from them. But I can’t remove the field from the
intermediateviews because Postgres doesn’t appear to be clever enough to see that the leafs no longer depend on the
column.Or did I just miss one? 
>
> In general, this seems like a major weakness expressing a model in Postgres (I get that any such weakness derives
fromSQL; that doesn’t stop me wanting a solution). 

Not that it helps much with your immediate problem but this
is typically the point where one realizes that database
definitions should live under version control.

That doesn't enable easy dropping of a column from
interrelated views but does allow for more convenient ways of
writing the required DDL change script.

Regards,
Karsten
--
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] spi/timetravel: unique constraint violation on UPDATE
Следующее
От: Devrim Gündüz
Дата:
Сообщение: Re: [GENERAL] Failed DNF dependency in Fedora