Re: SYSTEM_USER reserved word implementation

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: SYSTEM_USER reserved word implementation
Дата
Msg-id 075c68a2-72a6-1be4-34da-25e73e60016d@joeconway.com
обсуждение исходный текст
Ответ на Re: SYSTEM_USER reserved word implementation  (Jacob Champion <jchampion@timescale.com>)
Ответы Re: SYSTEM_USER reserved word implementation  (Jacob Champion <jchampion@timescale.com>)
Список pgsql-hackers
On 6/22/22 11:35, Jacob Champion wrote:
> On Wed, Jun 22, 2022 at 8:10 AM Joe Conway <mail@joeconway.com> wrote:
>> --- a/src/backend/utils/init/miscinit.c
>> +++ b/src/backend/utils/init/miscinit.c
>> @@ -473,6 +473,7 @@ static Oid    AuthenticatedUserId = InvalidOid;
>>  static Oid    SessionUserId = InvalidOid;
>>  static Oid    OuterUserId = InvalidOid;
>>  static Oid    CurrentUserId = InvalidOid;
>> +static const char *SystemUser = NULL;
>>
>>  /* We also have to remember the superuser state of some of these levels */
>>  static bool AuthenticatedUserIsSuperuser = false;
> 
> What's the rationale for introducing a new global for this? A downside
> is that now there are two sources of truth, for a security-critical
> attribute of the connection.

Why would you want to do it differently than 
SessionUserId/OuterUserId/CurrentUserId? It is analogous, no?

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



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

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: SYSTEM_USER reserved word implementation
Следующее
От: Tom Lane
Дата:
Сообщение: Re: SYSTEM_USER reserved word implementation