Re: Get Query in Statement Level Trigger?

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Get Query in Statement Level Trigger?
Дата
Msg-id 20050702030457.GB16560@winnie.fuhr.org
обсуждение исходный текст
Ответ на Get Query in Statement Level Trigger?  (Derry Bryson <derry_bryson@yahoo.com>)
Ответы Re: Get Query in Statement Level Trigger?  (Derry Bryson <derry_bryson@yahoo.com>)
Список pgsql-general
On Thu, Jun 30, 2005 at 10:56:21AM -0700, Derry Bryson wrote:
>
> Is it possible to get the text of the query that
> caused the trigger within a statement level trigger?

Not as far as I know -- somebody please correct me if I'm mistaken.
Querying pg_stat_activity or calling pg_stat_get_backend_activity()
don't work because of the lag in the statistics collector.

> It looks to me like all you can get is whether it is a
> an UPDATE, DELETE, or INSERT and not much in the way
> of details about the what caused the trigger.

You can get a little more information than that, but probably not
what you're after:

http://www.postgresql.org/docs/8.0/static/plpgsql-trigger.html

What information are you looking for and why?  What problem are you
trying to solve?

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

В списке pgsql-general по дате отправления:

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: cross references queries
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Transparent i18n?