Home » Database » MDB2_Driver_pgsql » Bug #6807
PgSQL Async Query
Details
| Request #6807 | PgSQL Async Query |
|---|---|
| Submitted | 2006-02-17 10:22 UTC |
| From | thomas at ecommerce dot com |
| Status | Closed |
| Package | MDB2_Driver_pgsql |
| PHP Version | Irrelevant |
| OS | SuSE 10.0 |
| Roadmaps | (Not assigned) |
Comments
[2006-02-17 10:22 UTC] thomas at ecommerce dot com
Description:
------------
PostgreSQL is Supporting Asyncron Query execution.
http://de.php.net/manual/en/function.pg-send-query.php
Please implement such methods, to send querys async as thay can be very usfull.
Test script:
---------------
/*
Example script how it can looks like
*/
$db = ( connected DB::PgSQL object )
//-- run query NOW ( with pg_Send_query() )
$db->queryAsync("SELECT * FROM TABLE");
while(1 != 2)
{
//-- do somthing here that will take some time
//-- during this run, also PgSQL query gets executed
}
//-- enshure query is done ( using pg_connection_busy function )
if($db->isQueryRunning())
{
//-- query still running, kill it
$db->canelQuery();
}
else
{
//-- query done, get results now
$result = $db->getAllAsync(DB_FETCHMODE_ASSOC);
/*
there can be functions like getAssocAsync(), getColAsync(), ...
Each function returning the last runned Async query.
*/
}