Re: ALTER TABLE ... REPLACE WITH

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ALTER TABLE ... REPLACE WITH
Дата
Msg-id 23306.1295565585@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: ALTER TABLE ... REPLACE WITH  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Jan 20, 2011 at 4:24 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> If you're willing to substitute an incompatible table, it's not clear
>> why you don't just do
>> 
>>                begin;
>>                drop table t;
>>                alter table t_new rename to t;
>>                commit;

> Because the whole source of this problem is dependency hell.

Well, if you want to preserve dependencies, you can *not* just blindly
substitute an incompatible table.  You must ensure that views and
foreign keys referencing the table are still valid.  So I'm not sure
where anybody got the idea that an implementation that fails to check
all that is even worth presenting.
        regards, tom lane


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

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: ALTER TABLE ... REPLACE WITH
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: SSI and Hot Standby