"Jozef Behran" <jozef.behran@krs.sk> writes:
> CREATE FUNCTION tpokus(pokus) RETURNS pokus as $$
> SELECT $1.id,$1.sval,translate($1.sval,'abc','ABC');
> $$ LANGUAGE SQL IMMUTABLE;
> CREATE TRIGGER trigger_pokus
> BEFORE INSERT OR UPDATE
> ON pokus FOR EACH ROW
> EXECUTE PROCEDURE tpokus()
> ;
> The buggy error message is the line before `ROLLBACK' (the one saying that
> `tpokus' does not exist). The problem is that there *is* a function named
> `tpokus'
But it has the wrong parameter list. Read the trigger documentation:
trigger functions never take parameters.
regards, tom lane