Re: ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED
Дата
Msg-id 1295820643.1803.20556.camel@ebony
обсуждение исходный текст
Ответ на Re: ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sun, 2011-01-23 at 16:13 -0500, Tom Lane wrote:
> Simon Riggs <simon@2ndQuadrant.com> writes:
> > You can add an FK without an initial check, but the FK is enforced for
> > all further DML changes.
> 
> I seem to recall pointing out upthread that the FK check triggers are
> designed on the assumption that the constraint does hold currently.
> Has any analysis been done on exactly how badly they'll fail when it
> doesn't hold?  I remain unconvinced that this behavior is desirable.

If you mean RESTRICT relationships, then yes.

I haven't foreseen other problems myself. What other ideas or risks
would you like me to confirm or deny for you? 

-- Simon Riggs           http://www.2ndQuadrant.com/books/PostgreSQL Development, 24x7 Support, Training and Services



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

Предыдущее
От: Daniel Farina
Дата:
Сообщение: Re: One Role, Two Passwords
Следующее
От: Jan Urbański
Дата:
Сообщение: wildcard search support for pg_trgm