Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uMN0S-009fN9-Nh for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Jun 2025 08:28:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uMN0R-000lvO-F7 for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Jun 2025 08:28:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uMN0R-000lvG-5g for pgsql-hackers@lists.postgresql.org; Tue, 03 Jun 2025 08:28:23 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uMN0N-000AsF-1O for pgsql-hackers@postgresql.org; Tue, 03 Jun 2025 08:28:22 +0000 Received: from [192.168.11.2] (p1696134-ipoe.ipoe.ocn.ne.jp [118.0.93.133]) by oss.nttdata.com (Postfix) with ESMTPSA id DEA8A61B7A; Tue, 3 Jun 2025 17:28:14 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com Content-Type: multipart/mixed; boundary="------------7sWwraKe6Rk5A5PZ7F4GX0Pz" Message-ID: <9e789ede-b56c-4a27-bb35-5b03e993a26b@oss.nttdata.com> Date: Tue, 3 Jun 2025 17:28:14 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Suggestions for improving \conninfo output in v18 To: "David G. Johnston" Cc: "pgsql-hackers@postgresql.org" References: <685961b8-b6ce-40bb-b2d5-c2ff135d3388@oss.nttdata.com> Content-Language: en-US From: Fujii Masao In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------7sWwraKe6Rk5A5PZ7F4GX0Pz Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2025/06/02 21:53, David G. Johnston wrote: > On Sunday, June 1, 2025, Fujii Masao > wrote: > > On 2025/06/02 14:24, David G. Johnston wrote: > > On Sunday, June 1, 2025, Fujii Masao >> 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 --------------7sWwraKe6Rk5A5PZ7F4GX0Pz Content-Type: text/plain; charset=UTF-8; name="v1-0001-doc-Add-note-about-Client-User-and-Superuser-fiel.patch" Content-Disposition: attachment; filename*0="v1-0001-doc-Add-note-about-Client-User-and-Superuser-fiel.pa"; filename*1="tch" Content-Transfer-Encoding: base64 RnJvbSA4OWFhOTVlZDlkMmNjMTk5NTBkMzczYjNkZGUzMDg5N2FjODVmMWIxIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBGdWppaSBNYXNhbyA8ZnVqaWlAcG9zdGdyZXNxbC5v cmc+CkRhdGU6IFR1ZSwgMyBKdW4gMjAyNSAxNjozOTo1MCArMDkwMApTdWJqZWN0OiBbUEFU Q0ggdjFdIGR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