>From http://www.postgresql.org/docs/8.1/interactive/triggers.html:
The trigger function must be defined before the trigger itself can be
created. The trigger function must be declared as a function taking no
arguments and returning type trigger. (The trigger function receives its
input through a s
"Jozef Behran" <[EMAIL PROTECTED]> 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()
>