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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #2087: Bogus error message on CREATE TRIGGER with a SQL function
Дата
Msg-id 28463.1133501350@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #2087: Bogus error message on CREATE TRIGGER with a SQL function  ("Jozef Behran" <jozef.behran@krs.sk>)
Список pgsql-bugs
"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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Jozef Behran"
Дата:
Сообщение: BUG #2089: Documentation bug: Triggers in plpythonu
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #2088: logfiles only readable by instance owner