X-Original-To: pgsql-interfaces@postgresql.org Received: from dorrigomedical.dyndns.org (203-109-237-239.ultrawholesale.com.au [203.109.237.239]) by postgresql.org (Postfix) with SMTP id 7F896475C15 for ; Wed, 12 Mar 2003 00:27:53 -0500 (EST) Received: (qmail 9657 invoked from network); 12 Mar 2003 05:28:41 -0000 Received: from pc-00065 (HELO gnumed.net) (192.168.0.65) by gateway.dorrigomedical.dyndns.org (192.168.0.1) with ESMTP; 12 Mar 2003 05:28:41 -0000 Message-ID: <3E6EC598.4020600@gnumed.net> Date: Wed, 12 Mar 2003 16:28:56 +1100 From: Horst Herb User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3b) Gecko/20030210 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: Re: listen/notify with python pgdb References: <20030311121644.333cdfff.gry@ll.mit.edu> In-Reply-To: <20030311121644.333cdfff.gry@ll.mit.edu> X-Enigmail-Version: 0.73.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200303/52 X-Sequence-Number: 3801 george young wrote: > [postgresql 7.3, python 2.3a1, pygresql-3.4-pre021201] > Does anyone use listen/notify with pgdb, the python DB-API > interface? I've done a crude hack, but maybe someone has a nicer one? we are doing it quite extensively in our "gnumed" project, and it works to our satisfaction. We run the "listener" in a background thread which then posts messages on receiving backend notifications. However, we are using the pyPgSql python adapter, not the pgdb one. Have a look at http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/gnumed/gnumed/gnumed/client/python-common/gmBackendListener.py?rev=HEAD&content-type=text/x-python Horst