Re: PDO and PostgreSQL's LISTEN/NOTIFY
| From: | Wez Furlong | Date: | Thu, 26 Oct 2006 03:42:46 +0000 |
| Subject: | Re: PDO and PostgreSQL's LISTEN/NOTIFY | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-4285@lists.php.net to get a copy of this message | ||
Just noticed this in the docs:
After processing a PGnotify object returned by PQnotifies, be sure to
free it with free() to avoid a memory leak.
And while reading the docs, it looks like it would be really useful
(at least for my purposes) to be able to efficiently sleep until you
are notified, so I have a modified version of your patch that adds an
optional sleep_timeout parameter that specifies a timeout value in
seconds for a call to select() on the PQsocket() of the connection.
--Wez.
On 10/10/06, David J N Begley <d.begley@uws.edu.au> wrote:
On Tue, 10 Oct 2006, Wez Furlong wrote: Do we need a configure check for those functions? I don't think so - the old-style PGSQL API doesn't check for either of those two functions. Cheers.. Otherwise the patch looks fine. --Wez. On 10/6/06, David J N Begley <d.begley@uws.edu.au> wrote:On Fri, 6 Oct 2006, Edin Kadribasic wrote:We will wait until 5.2 is released and then add it to the CVS.Beautiful, thanks.This patch does not use any libpq function that are new to it, does it?The patch uses only two libpq functions: PQconsumeInput() PQnotifies() Neither were originally in the PDO_PGSQL extension (at least, the version included with PHP 5.1.6), but both are used in the old PGSQL extension. Cheers..