Re: How to fire triggers just on "top" level DML - Mailing list pgsql-general

From Tom Lane
Subject Re: How to fire triggers just on "top" level DML
Date
Msg-id 28828.1295477614@sss.pgh.pa.us
Whole thread Raw
In response to Re: How to fire triggers just on "top" level DML  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: How to fire triggers just on "top" level DML  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-general
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> "A.M." <agentm@themactionfaction.com> wrote:
>> Most PLs include some session-specific storage. In PL/Perl, it is
>> %_SHARED.  Setting a flag there should do the trick. If you are
>> using a PL which does not have such a notion (like plpgsql), you
>> can add a call in your triggers to a function written in a PL
>> which does support this. Alternatively, a C function which
>> sets/checks a global flag would work as well.

> I thought it might come to that.

Correctly resetting such a value after a transaction/subtransaction
abort might be a bit problematic.

            regards, tom lane

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: How to fire triggers just on "top" level DML
Next
From: Bill Moran
Date:
Subject: Re: ERROR: index row requires 9984 bytes, maximum size is 8191