summaryrefslogtreecommitdiff
path: root/ext/pdo_pgsql/pgsql_driver.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-06-28 14:54:44 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-06-28 14:54:44 +0000
commit8c0dc5e88757f20799395c37f9c7f3159a8e428b (patch)
tree3a85400cca3c6d0b25faf55330ccbb71ef4cdd7b /ext/pdo_pgsql/pgsql_driver.c
parentb95ec3528a8bd20b821b001515b43599baa3557b (diff)
downloadphp-git-8c0dc5e88757f20799395c37f9c7f3159a8e428b.tar.gz
Make exec() return FALSE on error as do other drivers.
Diffstat (limited to 'ext/pdo_pgsql/pgsql_driver.c')
-rw-r--r--ext/pdo_pgsql/pgsql_driver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c
index 9137d193a8..0e17aaf7a7 100644
--- a/ext/pdo_pgsql/pgsql_driver.c
+++ b/ext/pdo_pgsql/pgsql_driver.c
@@ -156,7 +156,7 @@ static long pgsql_handle_doer(pdo_dbh_t *dbh, const char *sql, long sql_len TSRM
if (!(res = PQexec(H->server, sql))) {
/* fatal error */
pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, NULL);
- return 0;
+ return -1;
} else {
ExecStatusType qs = PQresultStatus(res);
if (qs != PGRES_COMMAND_OK && qs != PGRES_TUPLES_OK) {
@@ -167,7 +167,7 @@ static long pgsql_handle_doer(pdo_dbh_t *dbh, const char *sql, long sql_len TSRM
pdo_pgsql_error(dbh, qs, NULL);
#endif
PQclear(res);
- return 0;
+ return -1;
}
H->pgoid = PQoidValue(res);
PQclear(res);