Chris Mair <chrisnospam@1006.org> writes:
>> Why you should write a function first and then the trigger, which must
>> call that function?
> ... there's not just PL/PGSQL: you might want
> to define a function in C or Perl and then have a trigger call it.
Right, that's the real reason: this approach doesn't constrain which
PL you can write your triggers in.
regards, tom lane