Re: Suggestions for improving \conninfo output in v18

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Robert Treat <rob(at)xzilla(dot)net>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Suggestions for improving \conninfo output in v18
Date: 2025-06-04 11:18:13
Message-ID: 3e2e6f04-0a85-41a8-bf81-0ff727d23f0c@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2025/06/03 20:22, Robert Treat wrote:
> +1 on the idea to put it there; if someone gets confused about the
> behavior, that seems like the place they'd go to look it up. Though I
> would wordsmith the patch a little:
>
> + Note that the <structfield>Client User</structfield> field
> shows the user at the time
> + of connection, while the
> <structfield>Superuser</structfield> field 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
> + <command>SET ROLE</command> command.

This looks good to me, thanks for the review! I've updated the patch (0002)
as you suggested and attached it.

I've also re-attached the 0001 patch that makes \conninfo report the full
protocol version, it's the same as the one I posted earlier in the thread.

Regards,

--
Fujii Masao
NTT DATA Japan Corporation

Attachment Content-Type Size
v2-0001-psql-Report-full-protocol-version-in-conninfo-out.patch text/plain 1.6 KB
v2-0002-doc-Add-note-about-Client-User-and-Superuser-fiel.patch text/plain 1.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2025-06-04 11:29:04 Re: postgres_fdw could deparse ArrayCoerceExpr
Previous Message jian he 2025-06-04 10:45:32 Re: Add SPLIT PARTITION/MERGE PARTITIONS commands