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

2011-07-19 Thread Kevin Grittner
Tom Lane wrote: > "Kevin Grittner" writes: >> Tom Lane wrote: >>> 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. > >> It's pretty astonishing behavior for appli

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

2011-07-19 Thread Tom Lane
"Kevin Grittner" writes: > Tom Lane wrote: >> 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. > It's pretty astonishing behavior for application programmers. It's

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

2011-07-19 Thread Kevin Grittner
Tom Lane wrote: > "Kevin Grittner" 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 ve

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

2011-07-19 Thread Tom Lane
"Kevin Grittner" 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 obsol

[BUGS] BUG #6123: DELETE fails if before trigger causes another trigger to UPDATE

2011-07-19 Thread Kevin Grittner
The following bug has been logged online: Bug reference: 6123 Logged by: Kevin Grittner Email address: kevin.gritt...@wicourts.gov PostgreSQL version: HEAD and 9.0.4 Operating system: Linux (probably doesn't matter) Description:DELETE fails if before trigger causes an