Re: Passing arguments to a function called by a trigger

Поиск
Список
Период
Сортировка
От Luca Ferrari
Тема Re: Passing arguments to a function called by a trigger
Дата
Msg-id CAKoxK+7zCq1WAr2DtkD2WG5waSK1M_HsJkQqPufjJPx_vhxQRQ@mail.gmail.com
обсуждение исходный текст
Ответ на Passing arguments to a function called by a trigger  (Some Developer <someukdeveloper@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Luca Ferrari
Дата:
Сообщение: Re: Using wildcard for table name ?
Следующее
От: James David Smith
Дата:
Сообщение: Re: Fwd: Tricky join and update with same table