Re: BUG #13513: Turning a table into a view

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: BUG #13513: Turning a table into a view
Дата
Msg-id 20150722085906.GE5053@awork2.anarazel.de
обсуждение исходный текст
Ответ на BUG #13513: Turning a table into a view  (p.buongiovanni@net-international.com)
Ответы Re: BUG #13513: Turning a table into a view  (Piergiorgio Buongiovanni <p.buongiovanni@net-international.com>)
Список pgsql-bugs
On 2015-07-22 08:25:38 +0000, p.buongiovanni@net-international.com wrote:
> I create the table MyTable with a foreign key. In a second time I drop that
> foreign key (using ALTER TABLE command) in order to turn the table MyTable
> into a view, using the command: CREATE RULE "_RETURN" AS ON SELECT TO
> MyTable DO INSTEAD...
> The server doesn't allow me to esecute this command as it tells me that
> there is a foreign key or a trigger on the table MyTable.
> The problem does not occur if I create the table MyTable without foreign
> keys at the beginnning.

Why are you converting tables to views like that? That's really only
supported to break dependency cycles when restoring dumps...

The "problem" is that we don't reset relhastriggers (and some other
fields) when dropping them, which normally is fine.

Regards,

Andres

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

Предыдущее
От: p.buongiovanni@net-international.com
Дата:
Сообщение: BUG #13513: Turning a table into a view
Следующее
От: Piergiorgio Buongiovanni
Дата:
Сообщение: Re: BUG #13513: Turning a table into a view