From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, Hunaid Sohail <hunaidpgml(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Maiquel Grassi <grassi(at)hotmail(dot)com(dot)br>, 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-09-16 15:30:58 |
Message-ID: | 1158656.1726500658@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> On 2024-Sep-16, Jim Jones wrote:
>> * The value of "Current User" does not match the function current_user()
>> --- as one might expcect. It is a little confusing, as there is no
>> mention of "Current User" in the docs. In case this is the intended
>> behaviour, could you please add it to the docs?
> It is intended. As Peter said[1], what we wanted was to display
> client-side info, so PQuser() is the right thing to do. Now maybe
> "Current User" is not the perfect column header, but at least the
> definition seems consistent with the desired end result.
Seems like "Session User" would be closer to being accurate, since
PQuser()'s result does not change when you do SET ROLE etc.
> Now, I think
> the current docs saying to look at session_user() are wrong, they should
> point to the libpq docs for the function instead; something like "The
> name of the current user, as returned by PQuser()" and so on.
Sure, but this does not excuse choosing a misleading column name
when there are better choices readily available.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Noah Misch | 2024-09-16 16:24:30 | Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation |
Previous Message | Tom Lane | 2024-09-16 15:19:42 | Re: Regression tests fail with tzdata 2024b |