Re: Error Message

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Error Message
Дата
Msg-id 20051027011553.GA60091@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: Error Message  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
On Wed, Oct 26, 2005 at 07:00:06PM -0600, Michael Fuhr wrote:
> You *can* pass arguments to trigger functions but it's done a little
> differently than with non-trigger functions.  The function must be
> defined to take no arguments; it reads the arguments from a context
> structure instead of in the normal way.  PL/pgSQL trigger functions,
> for example, read their arguments from the TG_ARGV array.
>
> http://www.postgresql.org/docs/8.0/interactive/plpgsql-trigger.html
> http://www.postgresql.org/docs/8.0/interactive/trigger-interface.html

Also

http://www.postgresql.org/docs/8.0/interactive/sql-createtrigger.html

where the documentation says

CREATE TRIGGER name { BEFORE | AFTER } { event [ OR ... ] }
    ON table [ FOR [ EACH ] { ROW | STATEMENT } ]
    EXECUTE PROCEDURE funcname ( arguments )

...

arguments

  An optional comma-separated list of arguments to be provided to the
  function when the trigger is executed.  The arguments are literal
  string constants.  Simple names and numeric constants may be written
  here, too, but they will all be converted to strings.  Please check
  the description of the implementation language of the trigger function
  about how the trigger arguments are accessible within the function; it
  may be different from normal function arguments.

--
Michael Fuhr

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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: Error Message
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: Variable return type...