From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Lauren Matheson <lmatheson@ivcf.ca>
Cc: pgsql-sql@postgresql.org
Subject: Re: changing an update via rules
Date: Sat, 19 Jul 2003 23:15:01 -0700 (PDT)
Message-ID: <20030719231214.Y55138-100000@megazone.bigpanda.com> (raw)
In-Reply-To: <1058307247.26006.8.camel@nicoll>
On 15 Jul 2003, Lauren Matheson wrote:
> Hello,
>
> I am having difficulty setting an on update rule which seems to be
> caught in a recursive loop.
>
> Context is a table with three columns assigning users to groups with the
> third column being boolean to flag the primary group. I would like to
> set an update rule to enforce one primary group. Any suggestions on how
> to do this, or exactly how the code is getting trapped? My code is
Rules are like macro rewrites and the WHERE clauses will not help to break
the recursive loop. I think you may need to either use a trigger or
something like a view so that the actual action happens on a different
table.
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: sszabo@megazone.bigpanda.com, lmatheson@ivcf.ca
Subject: Re: changing an update via rules
In-Reply-To: <20030719231214.Y55138-100000@megazone.bigpanda.com>
* 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