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

From Jelte Fennema-Nio
Subject Re: session username in default psql prompt?
Date
Msg-id CAGECzQQQtykjGBLV8OP+ZBBNT+1Ys2k8B6R8qKtYQOBXcJ1p6w@mail.gmail.com
Whole thread Raw
In response to Re: session username in default psql prompt?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: session username in default psql prompt?
Re: session username in default psql prompt?
List pgsql-hackers
On Sat, 23 Mar 2024 at 00:34, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Prompt space is
> expensive and precious, at least for people who aren't in the
> habit of working in very wide windows.

That problem seems easy to address by adding a newline into the
default prompt. Something like this:

\set PROMPT1 '%n@%~%R%\n# '

I myself use:
\set PROMPT1 '%[%033[1m%]%M %n@%/:%>-%p%R%[%033[0m%]%\n> '



pgsql-hackers by date:

Previous
From: Corey Huinker
Date:
Subject: Re: Statistics Import and Export
Next
From: shveta malik
Date:
Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation