Re: Way to stop recursion? - Mailing list pgsql-sql

From Andrew Sullivan
Subject Re: Way to stop recursion?
Date
Msg-id 20041126213448.GB2312@phlogiston.dyndns.org
Whole thread Raw
In response to Way to stop recursion?  (Jonathan Knopp <pgsql@delegated.net>)
Responses Re: Way to stop recursion?
List pgsql-sql
On Fri, Nov 26, 2004 at 01:03:38PM -0800, Jonathan Knopp wrote:
> UPDATE rules work perfectly for what I need to do except I need them to 
> only run once, not try and recurse (which of course isn't allowedby 
> postgresql anyway). Triggers seem a less efficient way to do the same 
> thing, though I understand they would run recursively too. Here's the 
> table structure in question:

You have to do this with a trigger.  The problem is that the rule is
expanded inline like a macro, so you can't prevent the behaviour
you're seeing.

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca
The fact that technology doesn't work is no bar to success in the marketplace.    --Philip Greenspun


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Way to stop recursion?
Next
From: Andrew Sullivan
Date:
Subject: Re: Way to stop recursion?