On Mon, Sep 23, 2024 at 2:51 PM Erik Wienhold <ewie(at)ewie(dot)name> wrote:
> You could instead use this:
>
> SELECT current_role \gset
> \set PROMPT1 '%n(at)%/ (%:current_role:)=%# '
>
> But that won't work with subsequent SET ROLE commands.
Bummer... That was kinda the point, that it updates automatically.
Then I'd like to respectfully request a small enhancement to psql
to support a new \r (or some other letter) for current_role in the prompt.
Thanks, --DD