"Nigel J. Andrews" <nandrews@investsystems.co.uk> writes:
> But how are you trying to set the trigger. You included the function
> definition, which I presume is created ok but haven't looked at, where as
> you've not included the command that is failing.
The given function is fine as a function, but is not directly usable
as a trigger. Trigger functions take no explicit arguments --- they
receive the current row as an implicit argument. See the examples
in the manual...
regards, tom lane