Re: Bug in FOREIGN KEY

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
Cc: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Jan Wieck" <janwieck(at)yahoo(dot)com>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in FOREIGN KEY
Date: 2001-01-27 05:25:24
Message-ID: 20411.980573124@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-01-27 05:31:19 Re: This script will crash the connection
Previous Message Tom Lane 2001-01-27 05:20:19 Re: Bug in FOREIGN KEY