Re: How to show current schema of running queries in postgresql 13

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: How to show current schema of running queries in postgresql 13
Дата
Msg-id CAFj8pRA=RvOqe9Wptc69pc0cn2GUp2_3yTdo1Hz_WN2iRfZdXg@mail.gmail.com
обсуждение исходный текст
Ответ на 回复:How to show current schema of running queries in postgresql 13  (陈锡汉 <cavonchen@163.com>)
Список pgsql-general


po 26. 6. 2023 v 12:23 odesílatel 陈锡汉 <cavonchen@163.com> napsal:
I have no way to force users doing this…

Then there is only one possible way - via custom extension you can catch the SET SEARCH_PATH statement, and you can do this. If you cannot use own extension, then there is not any way.


 


---- 回复的原邮件 ----
发件人Pavel Stehule<pavel.stehule@gmail.com>
日期2023年06月26日 17:51
收件人陈锡汉<cavonchen@163.com>
抄送至pgsql-general@lists.postgresql.org
主题Re: How to show current schema of running queries in postgresql 13


po 26. 6. 2023 v 9:19 odesílatel Pavel Stehule <pavel.stehule@gmail.com> napsal:
Hi



no, there is nothing for this purpose.

you can use application_name

so user can do

SET search_path=MySchema;
SET application_name = 'MySchema';
SELECT * FROM ...


and application name is visible from pg_stat_activity

regards

Pavel Stehule
 


 

Thank you!
Best regards,
CavonChen



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

Предыдущее
От: 陈锡汉
Дата:
Сообщение: 回复:How to show current schema of running queries in postgresql 13
Следующее
От: Joe Conway
Дата:
Сообщение: Re: PostgreSQL Commercial Support