New function: pg_get_socket
| From: | Charles | Date: | Sun, 25 Jan 2009 00:05:10 +0000 |
| Subject: | New function: pg_get_socket | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-42817@lists.php.net to get a copy of this message | ||
This is a patch for 5.2.x to return a select()-able variable for a given
PostgreSQL connection.
PG allows ASync queries, pg_send_query, and notifications,
pg_get_notify. Currently (afaik), there is no way to add a PostgreSQL
socket to the event notification array in used with stream_select();
usage:
$db=pg_connect(...);
$db_socket = pg_get_socket($db);
pg_send_query("select 1,pg_sleep(3)");
stream_select($db_socket, ...);
pg_get_result($db);
feature was requested Jan 2005 on
the pg_get_result page of the main English manual.
-Charles