Re: session username in default psql prompt?

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Kori Lane <kori(dot)lane(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: session username in default psql prompt?
Date: 2024-03-25 10:40:30
Message-ID: CACJufxE50n-HceRu-B9uF3qKvETtUck-mfBRN0BKSXyWPgXo7A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 25, 2024 at 6:32 PM Jelte Fennema-Nio <postgres(at)jeltef(dot)nl> wrote:
>
> Obviously I meant to put the \n before the %:
> \set PROMPT1 '%n(at)%~%R\n%# '
>

transaction related information lost.

for example:
jian(at)src6=
# begin;
BEGIN
jian(at)src6=
# select 1/0;
2024-03-25 18:37:59.313 CST [15252] ERROR: division by zero
2024-03-25 18:37:59.313 CST [15252] STATEMENT: select 1/0;
ERROR: division by zero
jian(at)src6=
# rollback ;
ROLLBACK

master behavior:
src6=# begin ;
BEGIN
src6=*# select 1/0;
2024-03-25 18:38:31.997 CST [24688] ERROR: division by zero
2024-03-25 18:38:31.997 CST [24688] STATEMENT: select 1/0;
ERROR: division by zero
src6=!# rollback ;
ROLLBACK

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2024-03-25 10:43:10 Re: DOCS: add helpful partitioning links
Previous Message shveta malik 2024-03-25 10:38:59 Re: Introduce XID age and inactive timeout based replication slot invalidation