Re: Passing arguments to a function called by a trigger - Mailing list pgsql-novice

From Luca Ferrari
Subject Re: Passing arguments to a function called by a trigger
Date
Msg-id CAKoxK+7zCq1WAr2DtkD2WG5waSK1M_HsJkQqPufjJPx_vhxQRQ@mail.gmail.com
Whole thread Raw
In response to Passing arguments to a function called by a trigger  (Some Developer <someukdeveloper@gmail.com>)
List pgsql-novice
On Sat, Jul 27, 2013 at 1:55 PM, Some Developer
<someukdeveloper@gmail.com> wrote:
> I have an INSERT AFTER trigger that runs on inserts into a specific table.
> I'm not sure if the function automatically gets all the information that was
> inserted into the table or whether you have to manually pass it in?


You have to read the trigger documentation, as already suggested.
Moreover here
(https://github.com/fluca1978/fluca1978-pg-utils/blob/master/bsdmag/03-server-side-programming/03-trigger-download_path-improved.sql)
you can find an example of triggers using also parameters passed at
the creation of the trigger (TG_NARGS, TG_ARGV).

Luca


pgsql-novice by date:

Previous
From: Luca Ferrari
Date:
Subject: Re: Using wildcard for table name ?
Next
From: James David Smith
Date:
Subject: Re: Fwd: Tricky join and update with same table