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

From Andrew Dunstan
Subject Re: session username in default psql prompt?
Date
Msg-id CAD5tBcL+OMiUHx0UMcLFaKVsk3c-sSY186Tdmiay87+n6rBY-A@mail.gmail.com
Whole thread Raw
In response to Re: session username in default psql prompt?  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: session username in default psql prompt?
List pgsql-hackers


On Fri, Mar 22, 2024 at 4:04 PM Robert Haas <robertmhaas@gmail.com> wrote:
On Wed, Mar 13, 2024 at 4:56 AM Andrew Dunstan <andrew@dunslane.net> wrote:
> Reposting as the archive mail processor doesn't seem to like the Apple
> mail attachment.

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=#



Hmm. Perhaps we should change the default to "%n@%~%R%x%# "

Then when connected to your eponymous database you would see

robert.haas@~=#

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.



I have yet to meet anyone who doesn't think that one Robert Haas is
quite enough already, and perhaps too much by half.



perish the thought.

cheers

andrew

pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation
Next
From: Heikki Linnakangas
Date:
Subject: Re: Combine Prune and Freeze records emitted by vacuum