Recursion in triggers?

From: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Recursion in triggers?
Date: 2010-01-24 04:36:19
Message-ID: 482E80323A35A54498B8B70FF2B87980043AE80ABA@azsmsx504.amr.corp.intel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi:

I'm dealing with a hierarchical design where changes in one record can and should cause changes in other records lower inthe hierarchy. I'm trying to use update triggers to do this. And recursion would be a real nice way to do this.

What I need to know is if, in the "after" update trigger I make the subsequent updates to other records in the same table, with the OLD/NEW record ponters be set properly in those subsequent update trigger invocations? Will the current and modified NEW.* values be passed down into the next update trigger "before" call as OLD.* values? Or is recursion like this not allowed?

Thanks !

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oleg Bartunov 2010-01-24 07:11:41 Re: FTS uses "tsquery" directly in the query
Previous Message Craig Ringer 2010-01-24 01:58:05 Re: [LibPQ] Trying PQconnectStart: it doesn't seem to connect