Re: BUG #18516: Foreign key data integrity is not validated when reenabled the trigger on tables

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #18516: Foreign key data integrity is not validated when reenabled the trigger on tables
Дата
Msg-id 354613.1718898657@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #18516: Foreign key data integrity is not validated when reenabled the trigger on tables  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-bugs
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> I think it's not a bad idea to suggest that we could have a new command
> ALTER TABLE .. DISABLE CONSTRAINT, which can be run by the table owner
> and paired with a later ALTER TABLE ENABLE CONSTRAINT, which verifies
> the constraint.

The existing, supported way to do this is to drop the foreign key
constraint and then later re-create it.

As noted, if you mess with the triggers directly then any subsequent
breakage is your responsibility.

            regards, tom lane



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

Предыдущее
От: Melanie Plageman
Дата:
Сообщение: Re: relfrozenxid may disagree with row XIDs after 1ccc1e05ae
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #18517: Dropping a table referenced by an initially deferred foreign key fails with an error