Re: Error Message - Mailing list pgsql-general

From Michael Fuhr
Subject Re: Error Message
Date
Msg-id 20051027011553.GA60091@winnie.fuhr.org
Whole thread Raw
In response to Re: Error Message  (Michael Fuhr <mike@fuhr.org>)
List 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 by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: Error Message
Next
From: Michael Fuhr
Date:
Subject: Re: Variable return type...