From: | Kori Lane <kori(dot)lane(at)enterprisedb(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: session username in default psql prompt? |
Date: | 2024-02-28 00:19:48 |
Message-ID: | E1015464-8941-4AE2-A771-431FF1B58607@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Here’s a patch for this.
- Kori

> On May 27, 2023, at 8:52 AM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
> I don't recall if this has come up before.
>
> I'm sometimes mildly annoyed when I get on a new system and find the username missing in my psql prompt. Or if a customer shows me a screen and I have to ask "which user is this". If we're dealing with several roles it can get confusing. My usual .psqlrc has
>
> \set PROMPT1 '%n(at)%~%R%x%# '
>
> So my suggestion is that we prepend '%n@' to the default psql PROMPT1 (and maybe PROMPT2).
>
> I realize it's not exactly earth-shattering, but I think it's a bit more user-friendly.
>
> (Would be a good beginner project, the code change would be tiny but there are lots of docs / examples that we might want to change if we did it.)
>
>
>
> cheers
>
>
>
> andrew
>
> --
> Andrew Dunstan
> EDB: https://www.enterprisedb.com <https://www.enterprisedb.com/>
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2024-02-28 00:22:34 | Re: MAINTAIN privilege -- what do we need to un-revert it? |
Previous Message | Michael Paquier | 2024-02-27 23:14:52 | Re: Potential issue in ecpg-informix decimal converting functions |