From: kodmasin at gmail dot com Operating system: Linux - openSUSE 10.0 PHP version: 5.1.2 PHP Bug Type: PDO related Bug description: PDO_PGSQL - PDO::exec() return 1 but no row affected
Description: ------------ PDO::exec under postgresql driver returns 1 even when there are no rows affected Reproduce code: --------------- Tehre are no rows in table with index==20 <?php $db_connection = new PDO("pgsql:host=localhost port=5432 dbname=test", "test", "test", array(PDO::ATTR_PERSISTENT => true)); print var_dump($db_connection->exec("DELETE FROM test WHERE index=20")); ?> Expected result: ---------------- int(0) Actual result: -------------- int(1) -- Edit bug report at http://bugs.php.net/?id=36176&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36176&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36176&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36176&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36176&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36176&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36176&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36176&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36176&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36176&r=support Expected behavior: http://bugs.php.net/fix.php?id=36176&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36176&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36176&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36176&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36176&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36176&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36176&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36176&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36176&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36176&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36176&r=mysqlcfg