update rule loops - Mailing list pgsql-sql

From Poul L. Christiansen
Subject update rule loops
Date
Msg-id 399D4FD0.11A258FB@faroenet.fo
Whole thread Raw
Responses Re: update rule loops
List 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



pgsql-sql by date:

Previous
From: Yury Don
Date:
Subject: Re: sequences in functions
Next
From: Stephan Szabo
Date:
Subject: Re: Continuous inserts...