Re: Listen / Notify questions

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Listen / Notify questions
Дата
Msg-id 20060709165103.GB63466@winnie.fuhr.org
обсуждение исходный текст
Ответ на Listen / Notify questions  (Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>)
Список pgsql-interfaces
On Sun, Jul 09, 2006 at 11:43:15AM +0200, Joost Kraaijeveld wrote:
> 1. Is there a way to determine which sessions are listening for a
> certain notify message?

SELECT * FROM pg_listener;

http://www.postgresql.org/docs/8.1/interactive/catalog-pg-listener.html

> 2. If a session ends without "unlisten" (e.g. my listening program
> crashes), is that session automatically removed from the list of
> sessions that should be notified?

According to the LISTEN documentation, "A session's listen registrations
are automatically cleared when the session ends."  You can confirm
this by querying pg_listener.

http://www.postgresql.org/docs/8.1/interactive/sql-listen.html

-- 
Michael Fuhr


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

Предыдущее
От: Joost Kraaijeveld
Дата:
Сообщение: Listen / Notify questions
Следующее
От: wolfgang.wening@spb.de
Дата:
Сообщение: No library found for -lpq