public inbox for [email protected]  
help / color / mirror / Atom feed
From: Greg Sabino Mullane <[email protected]>
To: Asad Ali <[email protected]>
Cc: Dominique Devienne <[email protected]>
Cc: [email protected]
Subject: Re: Customize psql prompt to show current_role
Date: Mon, 23 Sep 2024 09:02:57 -0400
Message-ID: <CAKAnmmLPBSErcRJmMOOdOOHUHrjopDC7Th1Un3rJtHDqH3y2nQ@mail.gmail.com> (raw)
In-Reply-To: <CAJ9xe=ttSfESR=z2YZycow8DubyfQeOgOzMDUCE95f2vN-TzFg@mail.gmail.com>
References: <CAFCRh-_VwScttZi4R8grSd-b=7qguAnSzXp_+jbdpUkp=TfxPQ@mail.gmail.com>
	<CAJ9xe=ttSfESR=z2YZycow8DubyfQeOgOzMDUCE95f2vN-TzFg@mail.gmail.com>

On Mon, Sep 23, 2024 at 8:22 AM Asad Ali <[email protected]> wrote:

> There is no direct prompt escape sequence like %n for displaying the
> current_role in the psql prompt. However, you can work around this by using
> a \set command to define a custom prompt that includes the result of
> current_role.
>

Please do not use chatgpt or other LLMs to answer questions on this mailing
list! If you had even done the bare minimum of trying your own
lazily-generated answer, you would have found it did not work.

Greg


view thread (8+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Customize psql prompt to show current_role
  In-Reply-To: <CAKAnmmLPBSErcRJmMOOdOOHUHrjopDC7Th1Un3rJtHDqH3y2nQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox