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

From Some Developer
Subject Re: Passing arguments to a function called by a trigger
Date
Msg-id 51F3B9F3.9070405@googlemail.com
Whole thread Raw
In response to Re: Passing arguments to a function called by a trigger  (Andreas Kretschmer <akretschmer@spamfence.net>)
Responses Re: Passing arguments to a function called by a trigger  (amulsul <sul_amul@yahoo.co.in>)
List pgsql-novice
On 27/07/2013 14:05, Andreas Kretschmer wrote:
> 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?
>
> NEW.<colum_name> is your friend ;-)
>
>
> Andreas
>

Thanks for the tip. So I can just use NEW.<whatever> to get the values
inserted into the table from inside the function that is called by the
trigger?

Is there a corresponding OLD as well if I ever want to do a trigger on
an UPDATE?


pgsql-novice by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: Passing arguments to a function called by a trigger
Next
From: amulsul
Date:
Subject: Re: Passing arguments to a function called by a trigger