Re: Foreign keys

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Foreign keys
Дата
Msg-id 6967.1157900971@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Foreign keys  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Ответы Re: Foreign keys  (Gregory Stark <gsstark@mit.edu>)
Список pgsql-hackers
Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> I think if we were going to do this that all the constraint violations for
> unique, not null, check and foreign keys should be handled similarly, so
> we'd probably want something more general than just a way for the ri
> triggers to do this. I don't have a good idea of the right solution for
> that though.

It seems pretty unwieldy to me: it's not hard to imagine a long INSERT
throwing millions of separate foreign-key errors before it's done, for
instance.  And then there's the cascading-errors problem, ie, bogus
reports that happen because some prior step failed ... not least being
your client crashing and failing to tell you anything about what
happened because it ran out of memory for the error list.

My advice is to rethink the client code that wants such a behavior.
        regards, tom lane


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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Foreign keys
Следующее
От: "Jeremy Kronuz"
Дата:
Сообщение: Re: ISBN/ISSN/ISMN/EAN13 module