Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 4BF3E9FB3BC for ; Mon, 9 Oct 2006 22:57:28 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 76252-02 for ; Mon, 9 Oct 2006 22:57:24 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from n007.sc1.cp.net (smtpout1462.sc1.he.tucows.com [64.97.157.162]) by postgresql.org (Postfix) with ESMTP id 3903B9FB2F9 for ; Mon, 9 Oct 2006 22:57:22 -0300 (ADT) Received: from [192.168.0.12] (68.34.49.125) by n007.sc1.cp.net (7.2.069.1) (authenticated as rob@treat.com) id 452428650015522F; Tue, 10 Oct 2006 01:57:16 +0000 From: Robert Treat To: pgsql-php@postgresql.org, David J N Begley Subject: Re: PDO and PostgreSQL's LISTEN/NOTIFY Date: Mon, 9 Oct 2006 22:57:07 -0400 User-Agent: KMail/1.9.1 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610092257.07826.xzilla@users.sourceforge.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.693 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, RCVD_IN_BL_SPAMCOP_NET X-Spam-Level: * X-Archive-Number: 200610/12 X-Sequence-Number: 3612 On Tuesday 03 October 2006 21:25, David J N Begley wrote: > Is anyone aware of any effort currently underway to add support for > PostgreSQL's LISTEN/NOTIFY (async notification) feature to PDO? > > At present the notification mechanism: > > http://www.postgresql.org/docs/8.1/interactive/libpq-notify.html > > is only available within PHP whilst using the old-style API: > > http://www.php.net/manual/en/function.pg-get-notify.php > > Unfortunately this means that applications ordinarily using PDO have to > include a mixture of old/new APIs (and separate connections/sessions) if > they want to receive notification messages. I was thinking of putting some > time into proposing an addition to the PDO_PGSQL driver: > > http://www.php.net/manual/en/ref.pdo-pgsql.php > > but didn't want to duplicate effort if someone has already written the code > to handle this feature. > I talked to Wez about this and he generally didn't know what listen/notify was so he was pretty sure no one had gotten to the point of sending in a PDO patch his way. He's certainly up for looking at a patch but had concern that this might be something with too much of a postgresql specific tone, and recommending investigating something like microsofts service broker functionality to see if some common ground could be found. HTH. -- Robert Treat Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL