Re: proposal: psql: show current user in prompt

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: proposal: psql: show current user in prompt
Дата
Msg-id 1577394.1680630917@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: proposal: psql: show current user in prompt  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal: psql: show current user in prompt  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> út 4. 4. 2023 v 18:42 odesílatel Tom Lane <tgl@sss.pgh.pa.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Minimal logical decoding on standbys
Следующее
От: "Gregory Stark (as CFM)"
Дата:
Сообщение: Re: Remove dead macro exec_subplan_get_plan