[patch] pgsql async query
| From: | Yasuo Ohgaki | Date: | Sun, 25 Nov 2001 07:21:23 +0000 |
| Subject: | [patch] pgsql async query | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-71581@lists.php.net to get a copy of this message | ||
Since I didn't get much comment/request, so I changed it the way I
like. (I'll use zend_parse_parameter() later, since existing
functions are not using it yet)
- get rid of some functions and made easier to use async query
- garbage collection at request shutdown
- pg_send_query() changes mode to nonblocking internally
- pg_is_busy() calls PQconsumeInput() internally
It's much easier to use now.
Aync Query Functions:
- pg_send_query() - send query
- pg_get_result() - get async query result
- pg_is_busy() - executing async query or not
- pg_request_cancel() - candel currently executing query
Misc Functions:
- pg_reset() - reconnect to server. Useful when backend is died.
- pg_status() - current connection status.
README, patch and test script is attached. (Make sure you use CGI
bin, set output_buffering=Off and edit database connection
parameter. There are some limitations in libpq. You may not be
able to execute query asyncronously)
Comments are welcome.
--
Yasuo Ohgaki