Re: PostgreSQL 7.4.2 allows foreign key violation

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: PostgreSQL 7.4.2 allows foreign key violation
Дата
Msg-id 4116F00F.6070104@Yahoo.com
обсуждение исходный текст
Ответ на Re: PostgreSQL 7.4.2 allows foreign key violation  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: PostgreSQL 7.4.2 allows foreign key violation  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-general
On 8/6/2004 1:23 PM, Tom Lane wrote:
> Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
>> On Fri, 6 Aug 2004, Tom Lane wrote:
>>> Already does what?  I see nothing in there that would override either
>>> triggers or rules...
>
>> It's not for overriding the triggers or rules, but instead checking that
>> the post action state is valid (by running the no action code which
>> makes sure that either another row now has the pk value or that there are
>> no longer any matching rows).
>
> Oh, I see.  Seems an awfully expensive solution though :-(

IMHO it is one of the cases that are on the line of "doctor, when I ...
then don't do it". As you said, there is no perfect solution. Triggers
and rules can conflict in several ways, but we don't want to sacrifice
one for making the other failsafe.


Jan

>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html


--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #

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

Предыдущее
От: Alvaro Herrera Munoz
Дата:
Сообщение: Re: Losing records when server hang
Следующее
От: CSN
Дата:
Сообщение: COPY, \copy with defaults