Re: Trigger and function not on speaking terms

Поиск
Список
Период
Сортировка
От Kevin Davis
Тема Re: Trigger and function not on speaking terms
Дата
Msg-id 1091499079.28663.14.camel@spacecybernetics.com
обсуждение исходный текст
Ответ на Trigger and function not on speaking terms  (Jeff Boes <jboes@qtm.net>)
Список pgsql-sql
You need to define fn_foo w/o params per Doc Section 19.9.
Your intent as expressed in the trigger def (args) can then be fulfilled
through special top level vars.

On Mon, 2004-08-02 at 16:20, Jeff Boes wrote:
> Hmm, this is puzzling me:
> 
> create or replace function fn_foo(text) returns trigger as '
> begin
>    # Do some stuff with $1
> end;
> ' language 'plpgsql';
> 
> CREATE FUNCTION
> 
> create table bar (aaa text);
> 
> CREATE TABLE
> 
> create trigger trg_bar
> after insert or update on bar
> execute procedure fn_foo('string');
> 
> ERROR:  function fn_foo() does not exist
> 
> It would seem my trigger definition is trying to find fn_foo(), when I 
> mean for it to call fn_foo(TEXT).



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

Предыдущее
От: Michalis Kabrianis
Дата:
Сообщение: Sum and count weird results
Следующее
От: "Ram Nathaniel"
Дата:
Сообщение: SQL syntax extentions - to put postgres ahead in the race