RE: [HACKERS] Bug in FOREIGN KEY

2001-01-27 Thread Hiroshi Inoue
-Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED]] > > > 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 othe

Re: [HACKERS] Bug in FOREIGN KEY

2001-01-26 Thread Tom Lane
"Hiroshi Inoue" <[EMAIL PROTECTED]> 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

Re: [HACKERS] Bug in FOREIGN KEY

2001-01-26 Thread Tom Lane
I wrote: > Are there cases where we must log an event anyway, and if so what are > they? It didn't look to me like the deferred event executor would do > anything with a logged event that has no triggers ... Oops, I missed the uses of deferredTriggerGetPreviousEvent(). Fixed now.

RE: [HACKERS] Bug in FOREIGN KEY

2001-01-26 Thread Hiroshi Inoue
> -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED]] > > "Hiroshi Inoue" <[EMAIL PROTECTED]> writes: > > ISTM commands/trigger.c is broken. > > The behabior seems to be changed by recent changes made by Tom. > > Hm. I changed the code to not log an AFTER event unless there is

Re: [HACKERS] Bug in FOREIGN KEY

2001-01-26 Thread Tom Lane
"Hiroshi Inoue" <[EMAIL PROTECTED]> writes: > ISTM commands/trigger.c is broken. > The behabior seems to be changed by recent changes made by Tom. Hm. I changed the code to not log an AFTER event unless there is actually a trigger of the relevant type, thus suppressing what I considered a very s

RE: [HACKERS] Bug in FOREIGN KEY

2001-01-26 Thread Hiroshi Inoue
> -Original Message- > From: Bruce Momjian > > > Bruce Momjian wrote: > > > Here is another bug: > > > ISTM commands/trigger.c is broken. The behabior seems to be changed by recent changes made by Tom. * Check if we're interested in this row at all * --

Re: [HACKERS] Bug in FOREIGN KEY

2001-01-26 Thread Bruce Momjian
> Bruce Momjian wrote: > > Here is another bug: > > > > test=> begin; > > BEGIN > > test=> INSERT INTO primarytest2 VALUES (5,5); > > INSERT 18757 1 > > test=> UPDATE primarytest2 SET col2=1 WHERE col1 = 5 AND col2 = 5; > > ERROR: deferredTriggerGetPreviousEvent: event for tuple (0,10) not > > fo

Re: [HACKERS] Bug in FOREIGN KEY

2001-01-26 Thread Jan Wieck
Bruce Momjian wrote: > Here is another bug: > > test=> begin; > BEGIN > test=> INSERT INTO primarytest2 VALUES (5,5); > INSERT 18757 1 > test=> UPDATE primarytest2 SET col2=1 WHERE col1 = 5 AND col2 = 5; > ERROR: deferredTriggerGetPreviousEvent: event for tuple (0,10) not > found Schema? J

Re: [HACKERS] Bug in FOREIGN KEY

2001-01-26 Thread Bruce Momjian
Here is another bug: test=> begin; BEGIN test=> INSERT INTO primarytest2 VALUES (5,5); INSERT 18757 1 test=> UPDATE primarytest2 SET col2=1 WHERE col1 = 5 AND col2 = 5; ERROR: deferredTriggerGetPreviousEvent: event for tuple (0,10) not found > Bruce Momjian wrote: > > > Bruce Momjian writes: >

Re: [HACKERS] Bug in FOREIGN KEY

2001-01-24 Thread Bruce Momjian
We have to decide how to address this, perhaps with a clearer error message and a TODO item. > Bruce Momjian wrote: > > > Bruce Momjian writes: > > > > > > > ERROR: triggered data change violation on relation "primarytest2" > > > > > > We're getting this report about once every 48 hours, which

Re: [HACKERS] Bug in FOREIGN KEY

2001-01-23 Thread Stephan Szabo
> > Think I misinterpreted the SQL3 specs WR to this detail. The > > checks must be made per statement, not at the transaction > > level. I'll try to fix it, but we need to define what will > > happen with referential actions in the case of conflicting > > actions o

Re: [HACKERS] Bug in FOREIGN KEY

2001-01-23 Thread Max Khon
hi, there! On Mon, 22 Jan 2001, Bruce Momjian wrote: > > > This problem with foreign keys has been reported to me, and I have confirmed > > the bug exists in current sources. The DELETE should succeed: > > > > --- > > >

Re: [HACKERS] Bug in FOREIGN KEY

2001-01-22 Thread Bruce Momjian
This is Jan's reply to the issue. > Bruce Momjian wrote: > > > Bruce Momjian writes: > > > > > > > ERROR: triggered data change violation on relation "primarytest2" > > > > > > We're getting this report about once every 48 hours, which would make it a > > > FAQ. (hint, hint) > > > > > > > > >

Re: [HACKERS] Bug in FOREIGN KEY

2001-01-22 Thread Bruce Momjian
Can someone tell me where we are on this? > This problem with foreign keys has been reported to me, and I have confirmed > the bug exists in current sources. The DELETE should succeed: > > --- > > CREATE TABLE primarytest

Re: [HACKERS] Bug in FOREIGN KEY

2000-12-14 Thread Jan Wieck
Bruce Momjian wrote: > > Bruce Momjian writes: > > > > > ERROR: triggered data change violation on relation "primarytest2" > > > > We're getting this report about once every 48 hours, which would make it a > > FAQ. (hint, hint) > > > > > First time I heard of it. Does anyone know more details?

Re: [HACKERS] Bug in FOREIGN KEY

2000-12-13 Thread Bruce Momjian
> Bruce Momjian writes: > > > ERROR: triggered data change violation on relation "primarytest2" > > We're getting this report about once every 48 hours, which would make it a > FAQ. (hint, hint) > First time I heard of it. Does anyone know more details? -- Bruce Momjian

Re: [HACKERS] Bug in FOREIGN KEY

2000-12-13 Thread Peter Eisentraut
Bruce Momjian writes: > ERROR: triggered data change violation on relation "primarytest2" We're getting this report about once every 48 hours, which would make it a FAQ. (hint, hint) -- Peter Eisentraut [EMAIL PROTECTED] http://yi.org/peter-e/