From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Hannes Dorbath <light(at)theendofthetunnel(dot)de> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: LISTEN / NOTIFY |
Date: | 2006-12-08 14:48:00 |
Message-ID: | 20061208144800.GI25912@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
From | Date | Subject | |
---|---|---|---|
Next Message | Edoardo Panfili | 2006-12-08 15:16:03 | strange (maybe) behaviour of table lock |
Previous Message | Angva | 2006-12-08 14:47:37 | Re: loading data, creating indexes, clustering, vacuum... |