LISTEN/NOTIFY and python

From: "John D(dot) Burger" <john(at)mitre(dot)org>
To: "pgsql-general postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: LISTEN/NOTIFY and python
Date: 2007-03-20 15:08:04
Message-ID: 220696A9-B535-4F9F-97E9-17D78DC3DD2F@mitre.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi -

Does anyone have any suggestions for how to write client python code
that uses LISTEN? The only thing I can find is the older PyGreSQL
module (import pg), which has getnotify(), but this seems to require
busy-waiting. Is there any way to do this that will use select() or
something under the covers, so my client doesn't spin up the cpu?
(Yes, I know I could poll-sleep-poll-sleep - that's what I'll do if
there's nothing cleaner.)

- John D. Burger
MITRE

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2007-03-20 15:24:23 Re: shell script to SQL statement: `pg_dump | psql -U`
Previous Message Tom Lane 2007-03-20 15:07:03 Re: Unable to start postgres in recovery mode.