From: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
---|---|
To: | Jeff Boes <jboes(at)qtm(dot)net> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Trigger and function not on speaking terms |
Date: | 2004-08-02 21:21:24 |
Message-ID: | 20040802141931.W62987@megazone.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Mon, 2 Aug 2004, 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).
I don't remember why, but the arguments from the create trigger statement
are passed differently from standard arguments (I think it's like TGARGS
in plpgsql).
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Davis | 2004-08-03 02:11:19 | Re: Trigger and function not on speaking terms |
Previous Message | Richard Poole | 2004-08-02 21:20:31 | Re: Trigger and function not on speaking terms |