Repair problems occurring when multiple RI updates have to be done to the same

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 9cb84097623e5efe32b7289ca3c403f70ee152d8
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2007-08-15T19:15:47Z
Releases: 8.3.0
Repair problems occurring when multiple RI updates have to be done to the same
row within one query: we were firing check triggers before all the updates
were done, leading to bogus failures.  Fix by making the triggers queued by
an RI update go at the end of the outer query's trigger event list, thereby
effectively making the processing "breadth-first".  This was indeed how it
worked pre-8.0, so the bug does not occur in the 7.x branches.
Per report from Pavel Stehule.

Files