Re: rule creating infinite recursion not sure why

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: gene(at)sotech(dot)us
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: rule creating infinite recursion not sure why
Date: 2007-02-16 15:29:27
Message-ID: 20070216152927.GK13241@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Gene wrote:
> I was trying to create a rule to set a column to false whenever another
> column was changed:

Don't. Use a BEFORE trigger, and instead of issuing a new UPDATE, just
change the NEW record that you return. It's conceptually much simpler.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Erik Jones 2007-02-16 15:30:21 Re: requests / suggestions to help with backups
Previous Message Adam Rich 2007-02-16 15:23:44 Re: Problem writing sql statement....