Re: Psql meta-command conninfo+

From: Hunaid Sohail <hunaidpgml(at)gmail(dot)com>
To: Maiquel Grassi <grassi(at)hotmail(dot)com(dot)br>
Cc: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, "Imseih (AWS), Sami" <simseih(at)amazon(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>, Erik Wienhold <ewie(at)ewie(dot)name>
Subject: Re: Psql meta-command conninfo+
Date: 2024-10-04 06:08:53
Message-ID: CAMWA6yY2UpavEzbEbsFw3ie4S6Q2m_CsJyHfLS9i99XzJFxtAQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Thu, Oct 3, 2024 at 1:39 PM Maiquel Grassi <grassi(at)hotmail(dot)com(dot)br> wrote:

> >I thought it would be nice to have a description that tells how both
> >Session and Authenticated users differ. IMHO *only* a reference to
> >PQuser() doesn't say much, but others might be ok with it. So let's see
> >what the other reviewers say.
>
> Hi everyone,
> I believe the difference between Session and Authenticated
> users should indeed be made clearer, while still keeping
> PQuser() in the description.
>

Based on my readings from the documentation [1] and [2], we can update user
descriptions as follows:

Authenticated User: The name of the user returned by PQuser(), indicating
the user who initiated or authenticated the current database connection.
Session User: The session user's name, which is initially the same as the
authenticated user but can be changed with SET SESSION AUTHORIZATION. See
the session_user() function in <xref
linkend="functions-info-session-table"/> for more details.

Let me know if this is fine, then I can provide a new patch.

[1] https://www.postgresql.org/docs/current/functions-info.html
[2]
https://www.postgresql.org/docs/current/sql-set-session-authorization.html

Regards,
Hunaid Sohail

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2024-10-04 06:56:53 Re: Psql meta-command conninfo+
Previous Message Peter Smith 2024-10-04 04:12:55 Re: Pgoutput not capturing the generated columns