Re: Determining weather a query fired a trigger

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Determining weather a query fired a trigger
Дата
Msg-id 47FBB8FC.5050006@postnewspapers.com.au
обсуждение исходный текст
Ответ на Determining weather a query fired a trigger  (Gordon <gordon.mcvey@ntlworld.com>)
Список pgsql-general
Gordon wrote:
>
> So what I want to know is, is there a way to tell if executing a query
> caused a trigger to fire?   I don't need anything fancy like notify
> and listen, I just want to see what the database is doing for testing
> purposes.  For example by looking at the logs and seeing what activity
> was caused by a given query.  Does this stuff get logged?
>

If you can modify the trigger and it's written in PL/PgSQL you can use a
`RAISE NOTICE' statement to log some information when the trigger fires.
Those are several big "if"s though.

--
Craig Ringer


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

Предыдущее
От: Shane Ambler
Дата:
Сообщение: Re: High Availability / Replication with Sequoia
Следующее
От: Tom Lane
Дата:
Сообщение: Re: "too many trigger records found for relation xyz"