[HACKERS] Is it possible to get query_string value in an event trigger?

Поиск
Список
Период
Сортировка
От Jeremy Finzel
Тема [HACKERS] Is it possible to get query_string value in an event trigger?
Дата
Msg-id CAMa1XUh6ocWAokcSTHofSueEiJr03zGygs0P+m1O+W1FNZFoYA@mail.gmail.com
обсуждение исходный текст
Ответы Re: [HACKERS] Is it possible to get query_string value in an event trigger?  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hello.  Is it possible to get the currently executing query in an event trigger, for example, a create table event trigger function firing after ddl_command_end, aside from checking pg_stat_activity for the current process?

When I am debugging the source code, after executing a statement I can see the variable query_string which has the entire SQL statement, however, I would be very interested if it's possible to get this query_string value in a c function called during an event trigger, for a given process, or if by that time the memory has been freed and/or it's just not possible for some other reason to get the query string of a particular process.

Any thoughts much appreciated.

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

Предыдущее
От: Pierre-Emmanuel André
Дата:
Сообщение: Re: [HACKERS] PostgreSQL 10beta1 / OpenBSD : compilation failed withlibxml
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] plpgsql, caching, resowners and jit