Re: System username in pg_stat_activity

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: System username in pg_stat_activity
Дата
Msg-id 671e76bf-4a81-4da7-a208-efb6ce81d3b4@joeconway.com
обсуждение исходный текст
Ответ на Re: System username in pg_stat_activity  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers
On 1/10/24 08:59, Magnus Hagander wrote:
> On Wed, Jan 10, 2024 at 2:56 PM Bertrand Drouvot
>> I think it depends what we want the new field to reflect. If it is the exact
>> same thing as the SYSTEM_USER then I think it has to be text (as the SYSTEM_USER
>> is made of "auth_method:identity"). Now if we want it to be "only" the identity
>> part of it, then the `name` datatype would be fine. I'd vote for the exact same
>> thing as the SYSTEM_USER (means auth_method:identity).
> 
> I definitely think it should be the same. If it's not exactly the
> same, then it should be *two* columns, one with auth method and one
> with the name.
> 
> And thinking more about it maybe that's cleaner, because that makes it
> easier to do things like filter based on auth method?

+1 for the overall feature and +1 for two columns

>> > +     <row>
>> > +      <entry role="catalog_table_entry"><para role="column_definition">
>> > +       <structfield>authname</structfield> <type>name</type>
>> > +      </para>
>> > +      <para>
>> > +       The authentication method and identity (if any) that the user
>> > +       used to log in. It contains the same value as
>> > +       <xref linkend="system-user" /> returns in the backend.
>> > +      </para></entry>
>> > +     </row>
>>
>> I'm fine with auth_method:identity.
>>
>> > +            S.authname,
>>
>> What about using system_user as the field name? (because if we keep
>> auth_method:identity it's not really the authname anyway).
> 
> I was worried system_user or sysuser would both be confusing with the
> fact that we have usesysid -- which would reference a *different*
> sys...


I think if it is exactly "system_user" it would be pretty clearly a 
match for SYSTEM_USER


-- 
Joe Conway
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bertrand Drouvot
Дата:
Сообщение: Re: System username in pg_stat_activity
Следующее
От: jian he
Дата:
Сообщение: Re: add function argument names to regex* functions.