Re: proposal: psql: show current user in prompt - Mailing list pgsql-hackers

From Tom Lane
Subject Re: proposal: psql: show current user in prompt
Date
Msg-id 1521909.1680626553@sss.pgh.pa.us
Whole thread Raw
In response to Re: proposal: psql: show current user in prompt  (Kirk Wolak <wolakk@gmail.com>)
Responses Re: proposal: psql: show current user in prompt  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: proposal: psql: show current user in prompt  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Kirk Wolak <wolakk@gmail.com> writes:
> Changed status to Ready for Committer. (100% Guessing here...)

Basically, I want to reject this on the grounds that it's not
useful enough to justify the overhead of marking the "role" GUC
as GUC_REPORT.  The problems with it not going to work properly
with old servers are an additional reason not to like it.

But, if I lose the argument and we do commit this, I think it
should just print an empty string when dealing with an old server.
"ERR02000" is an awful idea, not least because it could be a
real role name.

BTW, we should probably get rid of the PQuser() fallback in
%n (session_username()) as well.  It's unlikely that there are
still servers in the wild that don't report "session_authorization",
but if we did find one then the output is potentially misleading.
I'd rather print nothing than something that might not be your
actual session authorization setting.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: psql: Add role's membership options to the \du+ command
Next
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: [Proposal] Add foreign-server health checks infrastructure