pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedHow to get the row that start a trigger
2+ messages / 2 participants
[nested] [flat]
* How to get the row that start a trigger
@ 2006-08-31 18:43 Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2006-09-03 23:17 ` Re: How to get the row that start a trigger Aaron Bono <postgresql@aranya.com>
0 siblings, 1 reply; 2+ messages in thread
From: Ezequias Rodrigues da Rocha @ 2006-08-31 18:43 UTC (permalink / raw)
To: pgsql-sql
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.
Please I need this answare.
Regards
Ezequias
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Atenciosamente (Sincerely)
Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: How to get the row that start a trigger
2006-08-31 18:43 How to get the row that start a trigger Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
@ 2006-09-03 23:17 ` Aaron Bono <postgresql@aranya.com>
0 siblings, 0 replies; 2+ messages in thread
From: Aaron Bono @ 2006-09-03 23:17 UTC (permalink / raw)
To: Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>; +Cc: pgsql-sql
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.com
http://codeelixir.com
==================================================================
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2006-09-03 23:17 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-08-31 18:43 How to get the row that start a trigger Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2006-09-03 23:17 ` Aaron Bono <postgresql@aranya.com>
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