Re: Add support for logging the current role

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Add support for logging the current role
Дата
Msg-id 20110217155811.GZ4116@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: Add support for logging the current role  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Add support for logging the current role  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> > Ugg, wait a minute.  This not only adds %U; it also changes the
> > behavior of %u, which I don't think we've agreed on.  Also, emitting
> > 'none' when not SET ROLE has been done is pretty ugly.  I'm back to
> > thinking we need to push this out to 9.2 and take more time to think
> > about this.
>
> Yeah, I thought what was supposed to be emitted was the value of
> current_user, not SQL's weird definition of what SET ROLE means.

current_user uses GetUserNameFromId() and goes through the cache lookups
to get there.  I was using what show_role() returns (which is also what
'show role;' returns).  I'd be happy to make it emit an empty string
when 'none' is returned though.
Thanks,
    Stephen

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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: Add support for logging the current role
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ALTER EXTENSION UPGRADE, v3