>
> CREATE TRIGGER formatname BEFORE update OR insert ON mytable FOR EACH row
> EXECUTE PROCEDURE lower(name);
The way I understand it, you can't just use any function as a trigger. It has
to have a return type of opaque. I see that you are basically trying to
convert to lowercase before inserting, but I'm pretty sure you'd have to define
your own pgplsql function for the trigger which uses the special variable 'new'
to access the incoming row. Your function can call lower() of course.
Others here can probably give you more details.
-Fran