Re: Error Message

Поиск
Список
Период
Сортировка
От Terry Lee Tucker
Тема Re: Error Message
Дата
Msg-id 200510261945.19824.terry@esc1.com
обсуждение исходный текст
Ответ на Re: Error Message  (Bob Pawley <rjpawley@shaw.ca>)
Ответы Re: Error Message  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
Bob,

You cannot pass argments to trigger functions. You can to other types of
functions, but not functions used as triggers. Arguments are passed regarding
the old and new records and other built in variables regarding what kind of
operation is going on, but all of that is "unseen".

They must be created as in:
CREATE TRIGGER trig1 AFTER INSERT
   ON process FOR EACH ROW
   EXECUTE PROCEDURE base();
                                                 ^^^^^^
Note: no argument.

On Wednesday 26 October 2005 07:24 pm, Bob Pawley saith:
> I'm not sure what you mean.
>
> base(int4) is the name of the function that I want to call. It follows the
> format of an example in a Postgresql book I use (or perhaps misuse).
>
> Are you saying that I need to redo the function???
>
> Bob
> ----- Original Message -----
> From: "Tom Lane" <tgl@sss.pgh.pa.us>
> To: "Bob Pawley" <rjpawley@shaw.ca>
> Cc: "Postgre General" <pgsql-general@postgresql.org>
> Sent: Wednesday, October 26, 2005 2:23 PM
> Subject: Re: [GENERAL] Error Message
>
> > Bob Pawley <rjpawley@shaw.ca> writes:
> >> The function name is listed under Functions as - base(int4)
> >
> > Trigger functions cannot take any explicit parameters.
> >
> > regards, tom lane
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 5: don't forget to increase your free space map settings
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly


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

Предыдущее
От: Bob Pawley
Дата:
Сообщение: Re: Error Message
Следующее
От: Douglas McNaught
Дата:
Сообщение: Re: Error Message