Skip site navigation (1) Skip section navigation (2)

Re: Get current query in a trigger function

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Vlad Arkhipov <arhipov(at)dc(dot)baikal(dot)ru>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Get current query in a trigger function
Date: 2013-01-14 16:45:38
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Fri, Jan 11, 2013 at 4:47 AM, Vlad Arkhipov <arhipov(at)dc(dot)baikal(dot)ru> wrote:
> 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.

I believe - only if the trigger is written in C.

Robert Haas
The Enterprise PostgreSQL Company

In response to


pgsql-hackers by date

Next:From: Boszormenyi ZoltanDate: 2013-01-14 16:49:49
Subject: Re: pg_ctl idempotent option
Previous:From: Robert HaasDate: 2013-01-14 16:45:01
Subject: Re: [PERFORM] Slow query: bitmap scan troubles

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group