Trigger on Insert to Update only newly inserted fields?

Поиск
Список
Период
Сортировка
От Henry Ortega
Тема Trigger on Insert to Update only newly inserted fields?
Дата
Msg-id 2bffcc330608280702y16c25090i816589e20163e7e8@mail.gmail.com
обсуждение исходный текст
Ответы Re: Trigger on Insert to Update only newly inserted fields?  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-sql
I have a On Insert Trigger that updates one of the columns in that same table.<br /><br />Is there a way for the
triggerto run only for the newly inserted records? <br />Instead of all records in the database?<br /><br />E.g.:<br
/>ID     Start_Date     End_Date <br />001   08-01-2006    <br />002   08-02-2006<br /><br /><br />On Insert/Update,
UpdateEnd_Date=now().<br />I want that to run only on new records.or the updated<br />record. How can I do this?<br
/><br/>Thank you so much.<br /> 

В списке pgsql-sql по дате отправления:

Предыдущее
От: "D'Arcy J.M. Cain"
Дата:
Сообщение: Re: double precision vs. numeric
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Create Assertion -- Question from a newbie