Re: Add %x to PROMPT1 and PROMPT2

From: Ian Barwick <ian(dot)barwick(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add %x to PROMPT1 and PROMPT2
Date: 2020-02-04 01:31:43
Message-ID: 79ac1ca0-2bab-bbe4-126a-01966f812075@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020/02/03 23:40, Tom Lane wrote:
> Daniel Gustafsson <daniel(at)yesql(dot)se> writes:
>> On 3 Feb 2020, at 08:08, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>>> FWIW, I am not really in favor of changing a default old enough that
>>> it could vote (a45195a).
>
>> That by itself doesn't seem a good reason to not change things.
>
>> My concern would be that users who have never ever considered that the prompt
>> can be changed, all of sudden wonder why the prompt is showing characters it
>> normally isn't, thus causing confusion. That being said, I agree that this is
>> a better default long-term.
>
> I've got the same misgivings as Michael. In a green field this'd likely
> be a good idea, but after so many years I'm afraid it will make fewer
> people happy than unhappy.
>
> Now on the other hand, we did change the server's default log_line_prefix
> not so long ago (7d323to se5ba4), and the feared storm of complaints was pretty
> much undetectable. So maybe this'd go down the same way. Worth noting
> also is that this shouldn't be able to break any applications, since the
> prompt is an interactive-only behavior.

The last change I recall affecting default psql behaviour was the addition
of COMP_KEYWORD_CASE in 9.2 (db84ba65), which personally I (and no doubt others)
found annoying, but the world still turns.

+1 one for this change, it's something I also add to every .psqlrc I setup.

Moreover, some of my work involves logging in at short notice to other people's
systems where I don't have control over the .psqlrc setup - while I can of
course set the prompt manually it's an extra step, and it would be really
nice to see the transaction status by default when working on critical
systems in a time-critical situation. (Obviously it'll take a few years
for this change to filter into production...).

Regards

Ian Barwick

--
Ian Barwick https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2020-02-04 01:34:09 Re: pg_stat_progress_basebackup - progress reporting for pg_basebackup, in the server side
Previous Message Andres Freund 2020-02-04 01:31:27 Re: Experimenting with hash join prefetch