I have a column called updated
which is intended to show the last time that column was altered.
My first attempt at this was to create a trigger that changed the updated
column to the value returned by now()
. But because this trigger happens on an update event, it caused an infinite loop (updating the updated column causes the trigger to fire).
I also tried implementing a rule to do this with similar effects.
I can't imagine that this is something I am forced to do on the application layer when ever I call and update function. So how can I update that row's updated column without causing infinite loops?