Re: trigger self recursion - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: trigger self recursion
Date
Msg-id 20050928110539.GE2436@svana.org
Whole thread Raw
In response to trigger self recursion  ("Sim Zacks" <sim@compulab.co.il>)
Responses Re: trigger self recursion
List pgsql-general
On Wed, Sep 28, 2005 at 01:41:29PM +0200, Sim Zacks wrote:
> Is there a way to avoid trigger self-recursion?
> In other words, update a table and have the trigger update another row in
> the same table without calling the same trigger?

No, although generally it's a sign of a coding problem. If you're
trying to change values being updated, you should be assigning to NEW,
not executing another UPDATE. If you're really recursing, there should
be an obvious way to know where you're done...
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-general by date:

Previous
From: "Sim Zacks"
Date:
Subject: trigger self recursion
Next
From: Martijn van Oosterhout
Date:
Subject: Re: SQL command to dump the contents of table failed: PQendcopy()