|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36176 PDO_PGSQL - PDO::exec() return 1 but no row affected
Submitted: 2006-01-27 00:55 UTC Modified: 2006-01-29 18:36 UTC
From: kodmasin at gmail dot com Assigned:
Status: Closed Package: PDO related
PHP Version: 5.1.2 OS: Linux - openSUSE 10.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: kodmasin at gmail dot com
New email:
PHP Version: OS:


 [2006-01-27 00:55 UTC] kodmasin at gmail dot com
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

$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:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-29 18:36 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Dec 02 17:03:35 2021 UTC