Re: What hook would you recommend for "one time, post authentication"?
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: What hook would you recommend for "one time, post authentication"? |
| Дата | |
| Msg-id | 18144.1383010032@sss.pgh.pa.us обсуждение |
| Ответ на | What hook would you recommend for "one time, post authentication"? (Daniel Farina <daniel@heroku.com>) |
| Ответы |
Re: What hook would you recommend for "one time, post authentication"?
|
| Список | pgsql-hackers |
Daniel Farina <daniel@heroku.com> writes:
> What hook would you recommend that matches this criteria:
> * Runs post-authentication
> * ..Once
ClientAuthentication_hook
> My general approach has been to try to use
> GetUserNameFromId(GetSessionUserId()), but this requires
> InitializeSessionUserId be called first, and that has been causing me
> some trouble.
So don't do that. The HBA code uses
roleid = get_role_oid(port->user_name, true);
and actually if you just want the string form you could use
port->user_name without any extra pushups (bearing in mind that
it might or might not be a valid user name).
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера