Get current query in a trigger function

From: Vlad Arkhipov <arhipov(at)dc(dot)baikal(dot)ru>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Get current query in a trigger function
Date: 2013-01-11 09:47:40
Message-ID: 50EFDFBC.8000006@dc.baikal.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Is there any simple way of getting a query for which a trigger was
executed? debug_query_string and ActivePortal->sourceText return the top
query when there are nested triggers.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2013-01-11 10:40:46 Re: Performance Improvement by reducing WAL for Update Operation
Previous Message Heikki Linnakangas 2013-01-11 09:36:24 Re: Possible PANIC in PostPrepare_Locks