Re: Bug in FOREIGN KEY - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bug in FOREIGN KEY
Date
Msg-id 20411.980573124@sss.pgh.pa.us
Whole thread Raw
In response to RE: Bug in FOREIGN KEY  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Responses RE: Bug in FOREIGN KEY
List pgsql-hackers
"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
> Because I don't know details about trigger stuff, I may be
> misunderstanding.  As far as I see,  KEY_CHANGED stuff
> requires to log every event about logged tuples.

I just realized that myself.  The code was still doing it the hard
way (eg, logging *both* before and after events for each tuple),
but it does seem necessary to log all events if there is either an
UPDATE or DELETE deferred trigger.

> However I'm suspicious if KEY_CHANGED check is necessary.
> Removing KEY_CHANGED stuff seems to solve the TODO 
>   FOREIGN KEY INSERT & UPDATE/DELETE in transaction "change violation"
> though it may introduce other bugs. 

I suspect it just masks the problem by preventing the trigger code
from executing ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bug in FOREIGN KEY
Next
From: Tom Lane
Date:
Subject: Re: This script will crash the connection