update rule loops

Poul L. Christiansen <plc@faroenet.fo>

From: "Poul L. Christiansen" <plc@faroenet.fo>
To: pgsql-sql <pgsql-sql@postgresql.org>
Date: 2000-08-18T15:01:36Z
Lists: pgsql-sql
Hi

I'm trying to make a field in my table (datechanged) to automatically be
updated with the value 'now()' when an update on the table occurs.

plc=# create rule datechanged_radius AS ON update to radius do update
radius set datechanged ='now()';
CREATE 22025360 1
plc=# update radius set destinationip = '212.055.059.001';
ERROR:  query rewritten 10 times, may contain cycles

This means that it's going in a loop, because the rule triggers itself.

Is there another way to do this?

Thanks,
Poul L. Christiansen