Dave,
A trigger function does not take variable parameters, gets its data
from the NEW or OLD records, and returns OPAQUE with the RETURN NEW
statement.
Please check out the documentation on writing PL/pgSQL triggers under
Procedural Languages in the online docs.
-Josh Berkus
--
Quoting from http://www.postgresql.org/idocs/index.php?plpgsql-trigger.html :
PL/pgSQL can be used to define trigger procedures. A trigger procedure
is created with the CREATE FUNCTION command as a function with no
arguments and a return type of OPAQUE. Note that the function must be