From: Aaron Bono <postgresql@aranya.com>
To: Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: How to get the row that start a trigger
Date: Sun, 3 Sep 2006 18:17:46 -0500
Message-ID: <bf05e51c0609031617l491ddaddnb91ccb322ff2c3bf@mail.gmail.com> (raw)
In-Reply-To: <55c095e90608311143q677946by7aa55da061dbbd5a@mail.gmail.com>
References: <55c095e90608311143q677946by7aa55da061dbbd5a@mail.gmail.com>
On 8/31/06, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com> wrote:
>
> Hi,
>
> I need make a trigger that update a table each time another table has a
> insert. but this insert has on this row all the items to pass to my function
> on the trigger.
>
> How to retrieve this information.
>
See the example at the end of the page
http://www.postgresql.org/docs/8.1/interactive/triggers.html - how it uses
the OLD and NEW implicit variable. You can use NEW.column_name to access
the data being inserted into the table.
Does this help?
==================================================================
Aaron Bono
Aranya Software Technologies, Inc.
http://www.aranya.comhttp://codeelixir.com
==================================================================
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: postgresql@aranya.com, ezequias.rocha@gmail.com
Subject: Re: How to get the row that start a trigger
In-Reply-To: <bf05e51c0609031617l491ddaddnb91ccb322ff2c3bf@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox