Re: System username in pg_stat_activity - Mailing list pgsql-hackers

From Dagfinn Ilmari Mannsåker
Subject Re: System username in pg_stat_activity
Date
Msg-id 874jflmi7d.fsf@wibble.ilmari.org
Whole thread Raw
In response to System username in pg_stat_activity  (Magnus Hagander <magnus@hagander.net>)
Responses Re: System username in pg_stat_activity
List pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:

> On Wed, Jan 10, 2024 at 1:44 PM Aleksander Alekseev
> <aleksander@timescale.com> wrote:
>>
>> It hurts my sense of beauty that usename and authname are of different
>> types. But if I'm the only one, maybe we can close our eyes on this.
>> Also I suspect that placing usename and authname in a close proximity
>> can be somewhat confusing. Perhaps adding authname as the last column
>> of the view will solve both nitpicks?
>
> But it should probably actually be name, given that's the underlying
> datatype. I kept changing it around and ended up half way in
> between...

https://www.postgresql.org/docs/current/functions-info.html#FUNCTIONS-INFO-SESSION-TABLE
(and pg_typeof(system_user)) says it's text.  Which makes sense, since
it can easily be longer than 63 bytes, e.g. in the case of a TLS client
certificate DN.

- ilmari



pgsql-hackers by date:

Previous
From: Konstantin Knizhnik
Date:
Subject: Re: Custom explain options
Next
From: Konstantin Knizhnik
Date:
Subject: Re: Custom explain options