Edit report at https://bugs.php.net/bug.php?id=42614&edit=1

 ID:                 42614
 Updated by:         mbecc...@php.net
 Reported by:        b...@php.net
 Summary:            PDO_pgsql: add  pg_get_notify support
-Status:             Open
+Status:             Closed
 Type:               Feature/Change Request
 Package:            PostgreSQL related
 PHP Version:        5.2.4
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of mbeccati
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=b62b8b45286e7e8a69b04fc6aaf28f838c9a5951
Log: Fixed Bug #42614 (PDO_pgsql: add pg_get_notify support)


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] b...@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 https://bugs.php.net/bug.php?id=42614&edit=1

Reply via email to