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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jozef Behran" <jozef(dot)behran(at)krs(dot)sk>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2087: Bogus error message on CREATE TRIGGER with a SQL function
Date: 2005-12-02 05:29:10
Message-ID: 28463.1133501350@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Jozef Behran" <jozef(dot)behran(at)krs(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2005-12-02 05:30:17 Re: BUG #2088: logfiles only readable by instance owner
Previous Message Tom Lane 2005-12-02 04:06:50 Re: BUG #2056: to_char no long takes time as input?