PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » MDB2_Driver_pgsql » Bug #6807

PgSQL Async Query

Details

Request #6807PgSQL Async Query
Submitted2006-02-17 10:22 UTC
Fromthomas at ecommerce dot com
StatusClosed
PackageMDB2_Driver_pgsql
PHP VersionIrrelevant
OSSuSE 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.
*/
}