Re: proposal: psql: show current user in prompt

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Kirk Wolak <wolakk(at)gmail(dot)com>, Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: proposal: psql: show current user in prompt
Date: 2023-04-04 17:55:17
Message-ID: 1577394.1680630917@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> út 4. 4. 2023 v 18:42 odesílatel Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napsal:
>> 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.

> If I understand to next comment correctly, the overhead should not be too
> big

Yeah, but how big is the use-case? The reason I'm skeptical is that
half the time what you're going to get is "none":

$ psql
psql (16devel)
Type "help" for help.

regression=# show role;
role
------
none
(1 row)

That's required by SQL spec I believe, but that doesn't make it useful
data to keep in one's prompt.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark (as CFM) 2023-04-04 18:03:45 Re: Remove dead macro exec_subplan_get_plan
Previous Message Andres Freund 2023-04-04 17:53:38 Re: Minimal logical decoding on standbys