From 89aa95ed9d2cc19950d373b3dde30897ac85f1b1 Mon Sep 17 00:00:00 2001 From: Fujii Masao Date: Tue, 3 Jun 2025 16:39:50 +0900 Subject: [PATCH v1] doc: Add note about "Client User" and "Superuser" fields in \conninfo output. In the \conninfo psql command, the "Client User" column shows the user who established the 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, for example, if the current user was changed with the SET ROLE command. This commit adds a note to the \conninfo documentation to clarify this behavior and avoid potential confusion. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 8f7d8758ca0..473883752a4 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -1103,6 +1103,17 @@ SELECT $1 \parse stmt1 Outputs information about the current database connection, including TLS-related information if TLS is in use. + + 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. + -- 2.49.0