Re: Customize psql prompt to show current_role

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Dominique Devienne <ddevienne(at)gmail(dot)com>, Erik Wienhold <ewie(at)ewie(dot)name>, Asad Ali <asadalinagri(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Customize psql prompt to show current_role
Date: 2024-09-23 14:54:55
Message-ID: 3079980.1727103295@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> writes:
> To get the current role, psql would have to query the database whenever
> it displays the prompt. That would be rather expensive...

See previous discussion:

https://www.postgresql.org/message-id/flat/CAFj8pRBFU-WzzQhNrwRHn67N0Ug8a9-0-9BOo69PPtcHiBDQMA%40mail.gmail.com

At the time I didn't like the idea too much, but now that we've seen
a second independent request, maybe our opinion of its value should
go up a notch.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dominique Devienne 2024-09-23 15:07:47 Re: Customize psql prompt to show current_role
Previous Message Dominique Devienne 2024-09-23 13:08:47 Re: Customize psql prompt to show current_role