Re: referential integrity without trigger

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: referential integrity without trigger
Дата
Msg-id 5574.1139525609@sss.pgh.pa.us
обсуждение исходный текст
Ответ на referential integrity without trigger  (Alexander Presber <aljoscha@weisshuhn.de>)
Список pgsql-general
Alexander Presber <aljoscha@weisshuhn.de> writes:
> Is there a clever, general scheme to "recheck"  and enforce foreign
> key contraints, after the responsible triggers have been disabled and
> reenabled?

Drop the constraint (keep your fingers off the trigger, thank you ;-)).
Modify the master table.  Re-create the constraint before committing.
ALTER TABLE ADD FOREIGN KEY does this about as fast as any ad-hoc idea
you might come up with.

            regards, tom lane

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

Предыдущее
От: "Chandra Sekhar Surapaneni"
Дата:
Сообщение: Re: Update table with data from another table
Следующее
От: "Gonzalo Villegas"
Дата:
Сообщение: Insert more than one t-uple in a single sql