cvs: php-src /ext/pdo_pgsql config.w32 pgsql_driver.c
| From: | Matteo Beccati | Date: | Thu, 30 Apr 2009 12:55:43 +0000 |
| Subject: | cvs: php-src /ext/pdo_pgsql config.w32 pgsql_driver.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-57403@lists.php.net to get a copy of this message | ||
mbeccati Thu Apr 30 12:55:43 2009 UTC
Modified files:
/php-src/ext/pdo_pgsql config.w32 pgsql_driver.c
Log:
- Removed HAVE_PQEXECPARAMS which was left out during the previous commit
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_pgsql/config.w32?r1=1.11&r2=1.12&diff_format=u
Index: php-src/ext/pdo_pgsql/config.w32
diff -u php-src/ext/pdo_pgsql/config.w32:1.11 php-src/ext/pdo_pgsql/config.w32:1.12
--- php-src/ext/pdo_pgsql/config.w32:1.11 Thu Apr 30 12:35:36 2009
+++ php-src/ext/pdo_pgsql/config.w32 Thu Apr 30 12:55:43 2009
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.11 2009/04/30 12:35:36 mbeccati Exp $
+// $Id: config.w32,v 1.12 2009/04/30 12:55:43 mbeccati Exp $
// vim:ft=javascript
ARG_WITH("pdo-pgsql", "PostgreSQL support for PDO", "no");
@@ -15,7 +15,6 @@
AC_DEFINE('HAVE_PDO_PGSQL', 1, 'Have PostgreSQL library');
AC_DEFINE('HAVE_PQESCAPE_BYTEA_CONN', 1, 'Have PQescapeByteaConn');
AC_DEFINE('HAVE_PQESCAPE_CONN', 1, 'Have PQescapeConn');
- AC_DEFINE('HAVE_PQEXECPARAMS', 1, 'Have PQexecParams');
AC_DEFINE('HAVE_PQPREPARE', 1, 'Have PQprepare');
ADD_FLAG('CFLAGS_PDO_PGSQL', "/D HAVE_PQPARAMETERSTATUS=1 /D
HAVE_PQPROTOCOLVERSION=1 /D HAVE_PGTRANSACTIONSTATUS=1 /D HAVE_PQUNESCAPEBYTEA=1 /D
HAVE_PQRESULTERRORFIELD=1 /D HAVE_PQESCAPE_CONN=1 /D HAVE_PQESCAPE_BYTEA_CONN=1");
ADD_EXTENSION_DEP('pdo_pgsql', 'pdo');
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_pgsql/pgsql_driver.c?r1=1.74&r2=1.75&diff_format=u
Index: php-src/ext/pdo_pgsql/pgsql_driver.c
diff -u php-src/ext/pdo_pgsql/pgsql_driver.c:1.74 php-src/ext/pdo_pgsql/pgsql_driver.c:1.75
--- php-src/ext/pdo_pgsql/pgsql_driver.c:1.74 Thu Apr 30 12:35:36 2009
+++ php-src/ext/pdo_pgsql/pgsql_driver.c Thu Apr 30 12:55:43 2009
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql_driver.c,v 1.74 2009/04/30 12:35:36 mbeccati Exp $ */
+/* $Id: pgsql_driver.c,v 1.75 2009/04/30 12:55:43 mbeccati Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -356,25 +356,9 @@
} else {
PGresult *res;
ExecStatusType status;
-#ifdef HAVE_PQEXECPARAMS
const char *q[1];
q[0] = name;
res = PQexecParams(H->server, "SELECT CURRVAL($1)", 1, NULL, q, NULL, NULL, 0);
-#else
- char *name_escaped, *q;
- size_t l = strlen(name);
-
- name_escaped = safe_emalloc(l, 2, 1);
-#ifndef HAVE_PQESCAPE_CONN
- PQescapeString(name_escaped, name, l);
-#else
- PQescapeStringConn(H->server, name_escaped, name, l, NULL);
-#endif
- spprintf(&q, 0, "SELECT CURRVAL('%s')", name_escaped);
- res = PQexec(H->server, q);
- efree(name_escaped);
- efree(q);
-#endif
status = PQresultStatus(res);
if (res && (status == PGRES_TUPLES_OK)) {