Skip site navigation (1) Skip section navigation (2)

Re: Way to stop recursion?

From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Way to stop recursion?
Date: 2004-11-26 21:34:48
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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.


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

In response to


pgsql-sql by date

Next:From: Andrew SullivanDate: 2004-11-26 21:36:25
Subject: Re: Way to stop recursion?
Previous:From: Tom LaneDate: 2004-11-26 21:31:11
Subject: Re: Way to stop recursion?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group