Re: PostgreSQL 7.4.2 allows foreign key violation - Mailing list pgsql-general

From Jan Wieck
Subject Re: PostgreSQL 7.4.2 allows foreign key violation
Date
Msg-id 4116F00F.6070104@Yahoo.com
Whole thread Raw
In response to Re: PostgreSQL 7.4.2 allows foreign key violation  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PostgreSQL 7.4.2 allows foreign key violation
List 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 by date:

Previous
From: Alvaro Herrera Munoz
Date:
Subject: Re: Losing records when server hang
Next
From: CSN
Date:
Subject: COPY, \copy with defaults