debugging triggers - get original statement?

From: gmb <gmbouwer(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: debugging triggers - get original statement?
Date: 2014-01-15 08:52:05
Message-ID: 1389775925366-5787181.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Luca Vernini 2014-01-15 11:22:15 Re: debugging triggers - get original statement?
Previous Message Herouth Maoz 2014-01-14 14:34:58 Re: An archiving query - is it safe?