Re: alter table alter type CASCADE

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: alter table alter type CASCADE
Дата
Msg-id s2xdcc563d11005050551r6808ea05x29be828a769f93f5@mail.gmail.com
обсуждение исходный текст
Ответ на alter table alter type CASCADE  (Sim Zacks <sim@compulab.co.il>)
Список pgsql-general
2010/5/5 Sim Zacks <sim@compulab.co.il>:
> One of the biggest problems I have maintaining a database with a lot of
> views is that when I want to change a datatype, I have to drop every
> view uses the column and every view that uses those views etc...
> This turns into a maintenance nightmare.

Then I would question your approach to maintenance.  In the past when
I've had to deal with this type of thing, all views were created from
a script.  Edit the script, run the script, you're done.  Do it in a
transaction and if there are any errors nothing changes.  Script looks
something like:

begin;
drop view x1;
drop view y1;
... more drop statements
create view x1...
create view y1 ...
commit;

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: Savepoint and prepared transactions
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: temp sequence