Re: Is there any way to listen to NOTIFY in php without polling?

From: Clemens Eisserer <linuxhippy(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Is there any way to listen to NOTIFY in php without polling?
Date: 2013-03-27 21:46:14
Message-ID: CAFvQSYQdfRuZwotyVwBOOVL2V+tVtZ0_=8iXLiw-Bk9wnWdK-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 :)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Misa Simic 2013-03-27 22:11:10 Re: Is there any way to listen to NOTIFY in php without polling?
Previous Message Misa Simic 2013-03-27 21:28:23 Re: Is there any way to listen to NOTIFY in php without polling?