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: CA+TgmoZsvazMdN64O5yAnUM-3OAYp3RuBEKMjtB_1w_2LuwZSw@mail.gmail.com (view raw or flat)
Thread:
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
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


In response to

Responses

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-2014 The PostgreSQL Global Development Group