Re: session username in default psql prompt? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: session username in default psql prompt?
Date
Msg-id 1211456.1711150455@sss.pgh.pa.us
Whole thread Raw
In response to Re: session username in default psql prompt?  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: session username in default psql prompt?
Re: session username in default psql prompt?
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On Fri, Mar 22, 2024 at 4:04 PM Robert Haas <robertmhaas@gmail.com> wrote:
>> I'm not really a fan of this. Right now my prompt looks like this:
>> robert.haas=#
>> If we did this, it would say:
>> robert.haas@robert.haas=#

There would be similar duplication for, eg, the postgres user
connected to the postgres database.  However, I'm more worried
about the case where they don't match, because then the %~
suggestion doesn't help shorten it.

> Of course, people can put this in their .psqlrc, and I do. The suggestion
> came about because I had a couple of instances where people using the
> default prompt showed me stuff and the problem arose from confusion about
> which user they were connected as.

On the whole, I think we'd get more complaints about the default
prompt having more-or-less doubled in length than we'd get kudos
about this being a great usability improvement.  Prompt space is
expensive and precious, at least for people who aren't in the
habit of working in very wide windows.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Combine Prune and Freeze records emitted by vacuum
Next
From: Andres Freund
Date:
Subject: Re: Trying to build x86 version on windows using meson