Re: [BUGS] BUG #2087: Bogus error message on CREATE TRIGGER with a SQL function

2005-12-02 Thread Jim C. Nasby
>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

Re: [BUGS] BUG #2087: Bogus error message on CREATE TRIGGER with a SQL function

2005-12-01 Thread Tom Lane
"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() >