Re: LISTEN / NOTIFY

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: LISTEN / NOTIFY
Дата
Msg-id 20061208144800.GI25912@svana.org
обсуждение исходный текст
Ответ на LISTEN / NOTIFY  (Hannes Dorbath <light@theendofthetunnel.de>)
Список pgsql-general
On Fri, Dec 08, 2006 at 03:38:49PM +0100, Hannes Dorbath wrote:
> Is there a way I can have notifications to be streamed to the listener,
> so I don't need to poll with LISTEN?
>
> LISTEN foo;
> LISTEN
> NOTIFY foo;
> NOTIFY
> Asynchronous notification "foo" received from server process with PID 3593.
>
> This does work for the same backend, but not for notifications issued
> from another one.

AIUI they are, it's just that the client needs to be looking for
incoming data. If you're using psql for example, I don't beleive it
checks for incoming data until you send a command.

How you actually acheive that in your code is a seperate question and
depends on the language you're using.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: Hannes Dorbath
Дата:
Сообщение: LISTEN / NOTIFY
Следующее
От: Marc Evans
Дата:
Сообщение: creating functions with variable argument lists