Re: Pull the Trigger and Where's the SQL?

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Pull the Trigger and Where's the SQL?
Date: 2012-02-24 23:59:53
Message-ID: 4F482479.4030707@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Naoko Reeves 2012-02-25 07:34:10 Re: invalid memory alloc request size 1765277700 Error Question
Previous Message John R Pierce 2012-02-24 23:58:35 Re: Behavior of subselects in target lists and order by