Re: Pull the Trigger and Where's the SQL? - Mailing list pgsql-general

From John R Pierce
Subject Re: Pull the Trigger and Where's the SQL?
Date
Msg-id 4F482479.4030707@hogranch.com
Whole thread Raw
In response to Pull the Trigger and Where's the SQL?  ("Ched Cheatham" <ched.cheatham@mindrally.com>)
List pgsql-general
On 02/24/12 2:05 PM, Ched Cheatham wrote:
> I have a trigger on a table which fires ON update...the solution I am
> working requires that I get the actual SQL statement (the text) that
> has been executed by postgreSQL that caused the trigger to fire.
> Currently the trigger solution is pljava because I am eventually
> planning on throwing the SQL statement on a JMS queue.  Anyway, at
> this point I have not been able to get access to the SQL statement
> text from the PLJava class so, I am hoping somebody will have an idea
> of how I may be able to get to the executed SQL string from PLSQL
> within my trigger...or any other way.

a trigger only has access to the OLD and NEW values of the field(s)
being modified, not the entire statement, which could be part of a
complex nested operation..

--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast


pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: Behavior of subselects in target lists and order by
Next
From: Naoko Reeves
Date:
Subject: Re: invalid memory alloc request size 1765277700 Error Question