Re: LISTEN / NOTIFY - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: LISTEN / NOTIFY
Date
Msg-id 20061208144800.GI25912@svana.org
Whole thread Raw
In response to LISTEN / NOTIFY  (Hannes Dorbath <light@theendofthetunnel.de>)
List 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.

Attachment

pgsql-general by date:

Previous
From: Hannes Dorbath
Date:
Subject: LISTEN / NOTIFY
Next
From: Marc Evans
Date:
Subject: creating functions with variable argument lists