Oliver Elphick <olly(at)lfix(dot)co(dot)uk> writes:
> A BEFORE trigger must return the NEW row after possible alterations --
> returning NULL will abort the update or insert, so this must be changed
> to be an AFTER trigger.
Or leave it as a BEFORE trigger and do "RETURN NEW" at the end.
I'd recommend BEFORE triggers over AFTER triggers anytime you have the
choice, because AFTER triggers go into a list of things-to-do-later;
if that list gets large (ie, you do many updates in one command) you
will have performance problems.
regards, tom lane
In response to
pgsql-novice by date
|Next:||From: Rick Szeto||Date: 2002-10-25 15:19:29|
|Subject: Latin1 characters in sql scripts|
|Previous:||From: Nicolas ...||Date: 2002-10-25 13:32:13|