Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Trigger on Insert to Update only newly inserted fields?



I have a On Insert Trigger that updates one of the columns in that same table.

Is there a way for the trigger to run only for the newly inserted records?
Instead of all records in the database?

E.g.:
ID      Start_Date     End_Date
001   08-01-2006   
002   08-02-2006


On Insert/Update, Update End_Date=now().
I want that to run only on new records.or the updated
record. How can I do this?

Thank you so much.


Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group