proposal : backend startup hook / after logon trigger

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема proposal : backend startup hook / after logon trigger
Дата
Msg-id 4EBC6852.5030605@fuzzy.cz
обсуждение исходный текст
Ответы Re: proposal : backend startup hook / after logon trigger  (Euler Taveira de Oliveira <euler@timbira.com>)
Re: proposal : backend startup hook / after logon trigger  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hi,

I occasionally need to perform some action whenever a user connects, and
there's nothing like an "AFTER LOGON" trigger (available in some other
databases).

Is there any particular reason why there's not a "backend start hook",
executed right after a backend is initialized? I've tried a very simple
PoC (basically just a new hook definition, called from PostgresMain(),
see the after-logon-hook.diff (and a simple module that uses it is in
logon.c).

This obviously is not a complete patch or something, but is there a good
reason why this is a stupid idea?

Obviously this is a bit low-level approach, as most of the time the
triggers are implemented in a PL. But who says you can't call a PL from
the C module ...

Tomas

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: proposal: psql concise mode
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Parsing output of EXPLAIN command in PostgreSQL