Adrian Klaver <adrian.kla...@aklaver.com> writes:
> On 9/23/24 08:07, Dominique Devienne wrote:
>> I often resort to \conninfo, but it's less automatic and
>> harder to visually parse (IMHO) compared to a custom ad-hoc prompt.

> For me that shows the user that connected(session_user) not the 
> current_user.

Worse than that: what it reports is libpq's PQuser(), that is the
name that was used to log in with.  But if what you want is the
session_user, psql prompts already have %n for that.

                        regards, tom lane


Reply via email to