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: 20041126213448.GB2312@phlogiston.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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.

A

--
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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Andrew Sullivan 2004-11-26 21:36:25 Re: Way to stop recursion?
Previous Message Tom Lane 2004-11-26 21:31:11 Re: Way to stop recursion?