pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Sullivan <ajs@crankycanuck.ca>
To: pgsql-sql@postgresql.org
Subject: Re: Way to stop recursion?
Date: Fri, 26 Nov 2004 16:34:48 -0500
Message-ID: <20041126213448.GB2312@phlogiston.dyndns.org> (raw)
In-Reply-To: <41A79A2A.6070606@delegated.net>
References: <41A79A2A.6070606@delegated.net>

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



view thread (8+ messages)  latest in thread

Message-ID: <20041126213448.GB2312@phlogiston.dyndns.org>
Permalink:  ../20041126213448.GB2312@phlogiston.dyndns.org/
Also on:    postgresql.org/message-id/20041126213448.GB2312@phlogiston.dyndns.org

 · 

reply

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: ajs@crankycanuck.ca
  Subject: Re: Way to stop recursion?
  In-Reply-To: <20041126213448.GB2312@phlogiston.dyndns.org>

* 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