Re: Is there any way to listen to NOTIFY in php without polling? - Mailing list pgsql-general

From Clemens Eisserer
Subject Re: Is there any way to listen to NOTIFY in php without polling?
Date
Msg-id CAFvQSYQdfRuZwotyVwBOOVL2V+tVtZ0_=8iXLiw-Bk9wnWdK-g@mail.gmail.com
Whole thread Raw
In response to Re: Is there any way to listen to NOTIFY in php without polling?  (Misa Simic <misa.simic@gmail.com>)
Responses Re: Is there any way to listen to NOTIFY in php without polling?
List pgsql-general
Hi Misa

> What is the main goal?

The main goal is to perform some inter-system communication in the
case some rows in one table are updated (very seldom event).

> even using libpg - you need to call pg notify... Doc says, just using
> libpgtcl would be possible to get Notify event - without checking from time
> to time...

I found example 27-2 at
http://www.postgresql.org/docs/8.0/static/libpq-example.html , that
does exactly what I was looking for using low-level socket functions.
It seems to me this solution works without polling.

Regards, Clemens

PS: Compared to the libpq and php interfaces, the jdbc driver does a
really good job providing a useable interface for listen/notify to the
developers. Thanks :)


pgsql-general by date:

Previous
From: Misa Simic
Date:
Subject: Re: Is there any way to listen to NOTIFY in php without polling?
Next
From: Misa Simic
Date:
Subject: Re: Is there any way to listen to NOTIFY in php without polling?