From: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Suggestions for improving \conninfo output in v18 |
Date: | 2025-06-03 08:28:14 |
Message-ID: | 9e789ede-b56c-4a27-bb35-5b03e993a26b@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2025/06/02 21:53, David G. Johnston wrote:
> On Sunday, June 1, 2025, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com <mailto:masao(dot)fujii(at)oss(dot)nttdata(dot)com>> wrote:
>
> On 2025/06/02 14:24, David G. Johnston wrote:
>
> On Sunday, June 1, 2025, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com <mailto:masao(dot)fujii(at)oss(dot)nttdata(dot)com> <mailto:masao(dot)fujii(at)oss(dot)nttdata(dot)com <mailto:masao(dot)fujii(at)oss(dot)nttdata(dot)com>>> wrote:
>
> Also, I noticed that the "Client User" column reflects the user at
> the time of connection, while the "Superuser" column reflects whether
> the current user in the current execution context is a superuser.
> This means the users referred to in these columns can differ.
> It might be worth aligning this behavior, or at least noting the distinction
> clearly in the documentation?
>
>
> The behavior seems consistent with the reality of our protocol and libpq. What did you have in mind for documentation changes?
>
>
> How about adding a note like this?
>
> ----------------------
> Note that the "Superuser" column does not necessarily reflect the privileges of the user shown in "Client User". "Client User" shows the user at the time of connection, while "Superuser" indicates whether the current user (in the current execution context) has superuser privileges. These users are usually the same, but they can differ, for example, if the current user was changed with the SET ROLE command.
> ----------------------
>
>
> Where would you put that?
I was thinking to add a note to the \conninfo documentation, as shown
in the attached patch. I don't have a better alternative at the moment.
Regards,
--
Fujii Masao
NTT DATA Japan Corporation
Attachment | Content-Type | Size |
---|---|---|
v1-0001-doc-Add-note-about-Client-User-and-Superuser-fiel.patch | text/plain | 1.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Yugo Nagata | 2025-06-03 08:39:50 | Re: Prevent internal error at concurrent CREATE OR REPLACE FUNCTION |
Previous Message | Shinya Kato | 2025-06-03 08:25:40 | Re: Add log_autovacuum_{vacuum|analyze}_min_duration |