Pull the Trigger and Where's the SQL?

Поиск
Список
Период
Сортировка
Искать

Pull the Trigger and Where's the SQL?

От:
"Ched Cheatham" <ched.cheatham@mindrally.com>
Дата:
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.

Kind Regards,
Ched Cheatham

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

От:
John R Pierce <pierce@hogranch.com>
Дата:
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

FAQ