Browse Source

Leave it up to the user to decide if to escape the sequence name or not.

PHP-5.1
Ilia Alshanetsky 21 years ago
parent
commit
10e1eecf3f
  1. 5
      ext/pdo_pgsql/pgsql_driver.c

5
ext/pdo_pgsql/pgsql_driver.c

@ -213,11 +213,6 @@ static char *pdo_pgsql_last_insert_id(pdo_dbh_t *dbh, const char *name, unsigned
char *q;
ExecStatusType status;
/* SQL injection protection */
if (strchr(name, '\'')) {
return NULL;
}
spprintf(&q, sizeof("SELECT CURRVAL('')") + strlen(name), "SELECT CURRVAL('%s')", name);
res = PQexec(H->server, q);
efree(q);

Loading…
Cancel
Save