Tom Lane schrieb:
> Torsten Zühlsdorff <foo@meisterderspiele.de> writes:
>> I have defined an BEFORE UPDATE trigger. The trigger catch every update,
>> change some columns of the new row, make an insert of the new row and
>> returns null to abort the update.
>
> Why in the world would you do that? Just return the modified row from
> the trigger and let the update proceed normally.
Because of content-revision. I have a lot of text which is modified and
created from multiple persons. The requierment is, that i need every
version of every content (+ their meta-data).
And i don't need just a log, which lists the changes. The different
revisions of *one* content are used at the *same* time at *different*
parts of the website. Therefore i rewrite every UPDATE to an INSERT. And
except of the missing returning everything works fine and fast. :)
Greetings,
Torsten
--
http://www.dddbl.de - ein Datenbank-Layer, der die Arbeit mit 8
verschiedenen Datenbanksystemen abstrahiert,
Queries von Applikationen trennt und automatisch die Query-Ergebnisse
auswerten kann.