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 1830823.1680702995@sss.pgh.pa.us
Whole thread Raw
In response to Re: proposal: psql: show current user in prompt  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: proposal: psql: show current user in prompt
Re: proposal: psql: show current user in prompt
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Apr 4, 2023 at 12:42 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> 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.

> I agree with that. I think we need some method for optionally
> reporting values, so that stuff like this can be handled without
> adding it to the wire protocol for everyone.

It could probably be possible to provide some mechanism for setting
GUC_REPORT on specific variables locally within sessions.  I don't
think this'd be much of a protocol-break problem, because clients
should already be coded to deal gracefully with ParameterStatus messages
for variables they don't know.  However, connecting that up to something
like a psql prompt feature would still be annoying.  I doubt I'd want
to go as far as having psql try to turn on GUC_REPORT automatically
if it sees %N in the prompt ...

            regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: monitoring usage count distribution
Next
From: Tom Lane
Date:
Subject: Re: psql: Add role's membership options to the \du+ command