Connection/closedown triggers for backends?

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Connection/closedown triggers for backends?
Дата
Msg-id 000f01c0a404$79057880$1001a8c0@archonet.com
обсуждение исходный текст
Список pgsql-general
Does such a thing exist (I'm guessing not)

What I'd like is to be able to call a function when someone connects to a
database and another when they disconnect.

Obviously my application can call a function when it first connects, but
might not be able to do so on disconnect (e.g. user pulls plug)

Ideally there'd be a "pg_connections" table with a PID and a time and I
could add triggers to the insert and delete actions.

If there's no way of doing this internally, I've got ways to work around it
but they're not nearly as pleasant.

- Richard Huxton


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

Предыдущее
От: brichard@cafod.org.uk (Bruce Richardson)
Дата:
Сообщение: Re: can a trigger on insert -> update other tables?
Следующее
От: Ben
Дата:
Сообщение: Why is explain horribly optimistic for sorts?