Re: Server-side hooks for user session start and session end
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Server-side hooks for user session start and session end |
| Дата | |
| Msg-id | 3997.1443292176@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Server-side hooks for user session start and session end (Pavel Stehule <pavel.stehule@gmail.com>) |
| Ответы |
Re: Server-side hooks for user session start and session end
|
| Список | pgsql-general |
Pavel Stehule <pavel.stehule@gmail.com> writes:
> 2015-09-26 19:59 GMT+02:00 Tom Lane <tgl@sss.pgh.pa.us>:
>> A session-start hook is already possible at the C-code level, using
>> session_preload_libraries. It wouldn't be hard to write an extension
>> that exposed that in some useful way to SQL code.
> years ago I tried it, if I remember well. I had a problems with SPI calls,
> because some caches was not initialized. I am not sure, and I didn't test
> last time.
You'd have to start your own transaction if you wanted one, and any
uncaught error would effectively be FATAL because it would terminate the
session, but otherwise I don't see why that wouldn't work.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера