From: Poul L. Christiansen <plc@faroenet.fo>
To: pgsql-sql <pgsql-sql@postgresql.org>
Subject: update rule loops
Date: Fri, 18 Aug 2000 16:01:36 +0100
Message-ID: <399D4FD0.11A258FB@faroenet.fo> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: plc@faroenet.fo
Subject: Re: update rule loops
In-Reply-To: <399D4FD0.11A258FB@faroenet.fo>
References: <399D4FD0.11A258FB@faroenet.fo>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox