> Any suggestions?
you might find this approach useful:
http://www.depesz.com/index.php/2008/01/18/how-to-check-if-given-update-is-from-trigger-or-why-i-hate-orms/
Best regards,
depesz
--
Linkedin: http://www.linkedin.com/in/depesz / blog: http://www.depesz.com/
jid/gtalk: dep...@depesz.com
Tom Lane wrote:
> Correctly resetting such a value after a
> transaction/subtransaction abort might be a bit problematic.
Good point. Definitely an area to pay particularly close attention.
Thanks,
-Kevin
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make chan
"A.M." wrote:
> If you do implement TG_DEPTH, I am curious as to what the
> difference between TG_DEPTH==34 and TG_DEPTH==35 could mean. I
> think it might cause poor coding practice in making decisions
> based off assumed trigger order execution. Since you only care to
> distinguish between dep
"Kevin Grittner" writes:
> "A.M." 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 wri
On Wednesday 19 January 2011 2:20:35 pm Kevin Grittner wrote:
> Adrian Klaver wrote:
> > TG_ARGV[]
> >
> > Data type array of text; the arguments from the CREATE
> > TRIGGER statement.
>
> Thanks for the suggestion, but I don't think this does what I need.
> I need to know whether the trig
On Jan 19, 2011, at 5:36 PM, Kevin Grittner wrote:
> "A.M." 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 y
"A.M." 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 supp
On Jan 19, 2011, at 4:59 PM, Kevin Grittner wrote:
> We've been running for about ten years on a framework which fires
> triggers similar to database triggers in a Java tier close to the
> database, and we're now trying to convert these to actual PostgreSQL
> database triggers. Our biggest hitch
Adrian Klaver wrote:
> TG_ARGV[]
>
> Data type array of text; the arguments from the CREATE
> TRIGGER statement.
Thanks for the suggestion, but I don't think this does what I need.
I need to know whether the trigger was *fired* from inside another
trigger, not something about the cr
On Wednesday 19 January 2011 1:59:48 pm Kevin Grittner wrote:
> We've been running for about ten years on a framework which fires
> triggers similar to database triggers in a Java tier close to the
> database, and we're now trying to convert these to actual PostgreSQL
> database triggers. Our bigg
We've been running for about ten years on a framework which fires
triggers similar to database triggers in a Java tier close to the
database, and we're now trying to convert these to actual PostgreSQL
database triggers. Our biggest hitch at the moment is that we
defined a class of triggers we call
11 matches
Mail list logo