debugging triggers - get original statement? - Mailing list pgsql-sql

From gmb
Subject debugging triggers - get original statement?
Date
Msg-id 1389775925366-5787181.post@n5.nabble.com
Whole thread Raw
Responses Re: debugging triggers - get original statement?
List pgsql-sql
Hi
I have a situation where a summary table is updated via triggers on multiple
tables.
E.g. an insert is done on table1; a trigger (trigger_func_1) then causes an
update on table2 , which in turn update table3 using another trigger
(trigger_func_2).

I'm encountering invalid data on table3 and I suspect a bug in
trigger_func_2.

I now want to add debugging to trigger_func_2 where I log the original
statement (transaction?).
I.e. I'm interested in something like "INSERT INTO table1.... " 
Anybody have any ideas on how I can get this original statement ?

Thanks 
GMB



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/debugging-triggers-get-original-statement-tp5787181.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.



pgsql-sql by date:

Previous
From: Herouth Maoz
Date:
Subject: Re: An archiving query - is it safe?
Next
From: Luca Vernini
Date:
Subject: Re: debugging triggers - get original statement?