Skip site navigation (1) Skip section navigation (2)

Re: BUG #6123: DELETE fails if before trigger causes another trigger to UPDATE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6123: DELETE fails if before trigger causes another trigger to UPDATE
Date: 2011-07-19 21:30:47
Message-ID: 5769.1311111047@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> [ circular trigger relationships ]
 
> I expect the DELETE from a to delete related b record(s) and then succeed. 
> Instead the UPDATE in b_del_trig causes delete of a to silently fail.

The update causes the already-selected target row version of the DELETE
to be obsoleted, so heap_delete finds it has nothing to do.  I'm
disinclined to mess with that logic.

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Kevin GrittnerDate: 2011-07-19 21:45:16
Subject: Re: BUG #6123: DELETE fails if before trigger causes another trigger to UPDATE
Previous:From: Kevin GrittnerDate: 2011-07-19 18:31:39
Subject: BUG #6123: DELETE fails if before trigger causes another trigger to UPDATE

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group