Hi Ramakrishna,
I am not following the reasoning on not separating the tables into
different publications and subscriptions. I set up logical replication all
the time in many different environments, one of the audits I perform before
deploying LR is looking at pg_stat_all_tables and WAL creation
Adrian Klaver writes:
> On 9/23/24 08:07, Dominique Devienne wrote:
>> I often resort to \conninfo, but it's less automatic and
>> harder to visually parse (IMHO) compared to a custom ad-hoc prompt.
> For me that shows the user that connected(session_user) not the
> current_user.
Worse than tha
On Mon, Sep 23, 2024 at 5:16 PM Adrian Klaver wrote:
> On 9/23/24 08:07, Dominique Devienne wrote:
> > I often resort to \conninfo, but it's less automatic and
> > harder to visually parse (IMHO) compared to a custom ad-hoc prompt.
> For me that shows the user that connected(session_user) not the
On 9/23/24 08:07, Dominique Devienne wrote:
On Mon, Sep 23, 2024 at 4:55 PM Tom Lane wrote:
Laurenz Albe 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
On Mon, Sep 23, 2024 at 4:55 PM Tom Lane wrote:
> Laurenz Albe 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-Wz
Laurenz Albe 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
On Mon, Sep 23, 2024 at 3:05 PM Laurenz Albe wrote:
> On Mon, 2024-09-23 at 14:59 +0200, Dominique Devienne wrote:
> > On Mon, Sep 23, 2024 at 2:51 PM Erik Wienhold wrote:
> > > You could instead use this:
> > >
> > > SELECT current_role \gset
> > > \set PROMPT1 '%n@%/ (%:current_role:)=%
On Mon, 2024-09-23 at 14:59 +0200, Dominique Devienne wrote:
> On Mon, Sep 23, 2024 at 2:51 PM Erik Wienhold wrote:
> > You could instead use this:
> >
> > SELECT current_role \gset
> > \set PROMPT1 '%n@%/ (%:current_role:)=%# '
> >
> > But that won't work with subsequent SET ROLE comman
On Mon, Sep 23, 2024 at 8:22 AM Asad Ali 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
On Mon, Sep 23, 2024 at 2:51 PM Erik Wienhold wrote:
> You could instead use this:
>
> SELECT current_role \gset
> \set PROMPT1 '%n@%/ (%:current_role:)=%# '
>
> But that won't work with subsequent SET ROLE commands.
Bummer... That was kinda the point, that it updates automatically.
Then
On Fri, Sep 20, 2024 at 8:49 PM Robert Haas wrote:
> On Fri, Sep 20, 2024 at 2:34 PM Tom Lane wrote:
> > I'm now inclined to add wording within the pg_has_role entry
> I don't have an opinion about the details, but +1 for documenting it
+1 as well. Especially since I now recall, in hindsight,
ab
On Fri, Sep 20, 2024 at 6:51 PM Robert Haas wrote:
> On Fri, Sep 20, 2024 at 12:37 PM Laurenz Albe
> wrote:
> > That would be a useful addition, yes.
>
> I think this already exists. The full list of modes supported by
> pg_has_role() is listed in convert_role_priv_string(). You can do
> somethi
On 2024-09-23 14:22 +0200, Asad Ali 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.
> You can use the fo
- Mail original -
> De: "Dominique Devienne"
> À: "Asad Ali"
> Cc: pgsql-gene...@postgresql.org
> Envoyé: Lundi 23 Septembre 2024 14:34:39
> Objet: Re: Customize psql prompt to show current_role
> On Mon, Sep 23, 2024 at 2:22 PM Asad Ali wrote:
>> There is no direct prompt escape sequen
On Mon, Sep 23, 2024 at 2:22 PM Asad Ali 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.
Hi Ali. Doe
Hi Dominique,
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.
You can use the following command to set your psql PROMP
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
17 matches
Mail list logo