ID: 48188 Updated by: mbecc...@php.net Reported By: mbecc...@php.net -Status: Open +Status: Closed Bug Type: PDO related Operating System: * PHP Version: 5.3CVS-2009-05-08 (CVS) Assigned To: mbeccati New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2009-05-08 08:52:50] mbecc...@php.net Description: ------------ Scrollable cursor support for PDO_PGSQL was introduced in PHP 5.3 (see bug #44861). Some small issues need to be ironed out, e.g. I found out that it's impossible to execute a pdo statement using a cursor twice. The current code fails as the cursor is already existing. Reproduce code: --------------- $pdo = new PDO("pgsql:dbname=test", 'user', 'pass', array( PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION )); $res = $pdo->prepare("SELECT (?)::int AS x", array( PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL )); try { var_dump($res->execute(array(1))); var_dump($res->execute(array(2))); } catch (Exception $e) { var_dump($e->getMessage()); } Expected result: ---------------- bool(true) bool(true) Actual result: -------------- bool(true) string(94) "SQLSTATE[42P03]: Duplicate cursor: 7 ERROR: cursor "pdo_crsr_000000000104fee8" already exists" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48188&edit=1