Skip site navigation (1) Skip section navigation (2)

Re: Server->Client notification (without polling)?

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Wolfgang Keller <wolfgang(dot)keller(dot)nospam(at)gmx(dot)de>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Server->Client notification (without polling)?
Date: 2006-09-21 03:08:07
Message-ID: 20060921030807.GA74201@winnie.fuhr.org (view raw or flat)
Thread:
Lists: pgsql-novice
On Wed, Sep 20, 2006 at 09:54:03PM +0200, Wolfgang Keller wrote:
> I read the manual again and now I understand that it's the libpq client 
> library which requires polling a function to retrieve the notifications 
> received from the server. Is there no way to tell the library "please call me 
> when a notification arrives"?
> 
> P.S.: I'm accessing PostgreSQL from Python if this matters, any of the Python 
> modules for PostgreSQL access is ok for me instead of libpq.

Psycopg2 supports LISTEN/NOTIFY; see examples/notify.py in the psycopg2
source code.

http://www.initd.org/projects/psycopg2

-- 
Michael Fuhr

In response to

Responses

pgsql-novice by date

Next:From: kmiDate: 2006-09-21 07:06:58
Subject: Group By problem
Previous:From: Tom LaneDate: 2006-09-20 20:15:43
Subject: Re: Server->Client notification (without polling)?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group