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 CAGECzQSCiK-EgLNPFJ4XhkusDHKmhVh9JDKW9q2Wzw0kMjtVdQ@mail.gmail.com
Whole thread Raw
In response to Re: session username in default psql prompt?  (jian he <jian.universality@gmail.com>)
List pgsql-hackers
On Mon, 25 Mar 2024 at 11:40, jian he <jian.universality@gmail.com> wrote:
> transaction related information lost.

Ah yeah, it seems I somehow lost the %x
How about:
\set PROMPT1 '%n@%~\n%R%x%# '

Or maybe even this more verbose one, which closely matches the
postgresql:// connection string format:

\set PROMPT1 '%n@%M:%>/%/\n%R%x%# '

or even add in some bold/colors like this, to make the prompt stand
out from a query:

\set PROMPT1 '%[%033[1m%]%n@%M:%>/%/\n%R%x%#%[%033[0m%] '



pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Memory consumed by child SpecialJoinInfo in partitionwise join planning
Next
From: Ashutosh Bapat
Date:
Subject: Re: A problem about partitionwise join