回复:How to show current schema of running queries in postgresql 13 - Mailing list pgsql-general

From 陈锡汉
Subject 回复:How to show current schema of running queries in postgresql 13
Date
Msg-id 66b3ebd1.90e4.188f73a621c.Coremail.cavonchen@163.com
Whole thread Raw
In response to Re: How to show current schema of running queries in postgresql 13  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: How to show current schema of running queries in postgresql 13
List pgsql-general
I have no way to force users doing this…


---- 回复的原邮件 ----
发件人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 by date:

Previous
From: "Oduba, Ernest"
Date:
Subject: PostgreSQL Commercial Support
Next
From: Pavel Stehule
Date:
Subject: Re: How to show current schema of running queries in postgresql 13