Re: Remembering bug #6123 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Remembering bug #6123
Date
Msg-id 516.1326328982@sss.pgh.pa.us
Whole thread Raw
In response to Remembering bug #6123  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Going back through the patches we had to make to 9.0 to move to
> PostgreSQL triggers, I noticed that I let the issues raised as bug
> #6123 lie untouched during the 9.2 development cycle.  In my view,
> the best suggestion for a solution was proposed by Florian here:
> http://archives.postgresql.org/pgsql-hackers/2011-08/msg00388.php

Do you mean this:
After every BEFORE trigger invocation, if the trigger returnednon-NULL, check if latest row version is still the same
aswhenthe trigger started. If not, complain.
 

While that sounds relatively safe, if possibly performance-impacting,
it's not apparent to me how it fixes the problem you complained of.
The triggers you were using were modifying rows other than the one
being targeted by the triggering action, so a test like the above would
not notice that they'd done anything.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: WIP -- renaming implicit sequences
Next
From: Andrew Dunstan
Date:
Subject: Re: JSON for PG 9.2