Customize psql prompt to show current_role - Mailing list pgsql-general

From Dominique Devienne
Subject Customize psql prompt to show current_role
Date
Msg-id CAFCRh-_VwScttZi4R8grSd-b=7qguAnSzXp_+jbdpUkp=TfxPQ@mail.gmail.com
Whole thread Raw
Responses Re: Customize psql prompt to show current_role
List pgsql-general
Hi. I've successfully customized my psql PROMPT1,
using %n for session_user, but I'd like to see
current_role as well. And I can't seem to find a way.

I didn't find a direct \x for it.
I didn't find a %'X' variable for it.
I didn't find a command to %`X` either.
(and X = `select current_role` does not work).

Surely there's a way, no? Thanks, --DD



pgsql-general by date:

Previous
From: rob stone
Date:
Subject: Re: IO related waits
Next
From: Asad Ali
Date:
Subject: Re: Customize psql prompt to show current_role