Re: Auto-update a field when record is changed
| От | Stephan Szabo |
|---|---|
| Тема | Re: Auto-update a field when record is changed |
| Дата | |
| Msg-id | 20030822215217.L6822-100000@megazone.bigpanda.com обсуждение исходный текст |
| Ответ на | Auto-update a field when record is changed (Stuart <sfbarbee@yahoo.com>) |
| Ответы |
Re: Auto-update a field when record is changed
|
| Список | pgsql-sql |
On Fri, 22 Aug 2003, Stuart wrote: > Folks, > > I was wandering if there was a feasible way to automatically update a field > in a table, say 'revision_date' in a record whenever any other field in the > record is changed. My attempts to use a trigger caused repeating loops and > bombed with error. I would like to be able to update such a field > automatically anytime a record was updated. Any help would be appreciated. That seems like a job for a before trigger and changing the to be update/inerted record before the action occurs in general. Don't use an update statement but change the record variables given as the NEW row.
В списке pgsql-sql по дате отправления: