#42614 [Com]: (feature request) pg_get_notify in pdo_pgsql
| From: | bruno at ioda dot net | Date: | Wed, 01 Apr 2009 09:58:58 +0000 |
| Subject: | #42614 [Com]: (feature request) pg_get_notify in pdo_pgsql | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-135419@lists.php.net to get a copy of this message | ||
ID: 42614
Comment by: bruno at ioda dot net
Reported By: bs@php.net
Status: Open
Bug Type: Feature/Change Request
PHP Version: 5.2.4
New Comment:
Is there a way to get the new pdo
(like a pecl update ) for 5.2.9 php version ?
Previous Comments:
------------------------------------------------------------------------
[2009-01-30 19:12:20] matteo at beccati dot com
Following a post on php-dev and a catch-up with Lukas K. Smith, here's
an updated patch for PHP 5.3 HEAD that mimics the behaviour of
David/Wez's patch, that unfortunately was lost:
http://www.beccati.com/misc/pdo_pgsql_getnotify_php5_3.patch
The patch adds two methods:
int PDO::pgsqlGetPid()
Returns the PID of the connected backend
mixed PDO::pgsqlGetNotify( [ $result_type = PDO::FETCH_USE_DEFAULT [,
[int $ms_timeout = 0 ]])
Returns an array or false, just like pg_get_notify()
$result_type can either be:
- PDO::FETCH_USE_DEFAULT
- PDO::FETCH_BOTH
- PDO::FETCH_NUM
- PDO::FETCH_ASSOC
$ms_timeout is the timeout in milliseconds that the function will wait
before returning if no NOTIFY was received
Thanks go to:
Lukas Kahwe Smith for the support
Wez Fufrlong for the feedback and suggestions
David Begley who is the author of a similar patch
------------------------------------------------------------------------
[2008-02-02 08:25:04] d dot begley at uws dot edu dot au
Support for PostgreSQL's LISTEN/NOTIFY in PDO has been written since
PHP 5.1, it just needs to be integrated with the latest code by one of
the core developers - see:
http://netevil.org/blog/2006/oct/background-batch-workflow-processing-with-pdo-pgsql
------------------------------------------------------------------------
[2007-09-10 17:12:04] bs@php.net
Description:
------------
Hi,
sorry that i post this as a bug, there is no other way to specify a
feature request per extension.
Support for PGnotifies() would be great in PDO. ext/pgsql has it
already with pg_get_notify().
Docs are at
http://www.postgresql.org/docs/8.2/interactive/libpq-notify.html
and a
sample at
http://www.postgresql.org/docs/8.2/interactive/libpq-example.html#LIBPQ-EXAMPLE-2
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42614&edit=1