From: Edin Kadribasic Date: Thu, 20 May 2004 19:09:36 +0000 (+0000) Subject: We quote with ' in real databases X-Git-Tag: RELEASE_0_1~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9cfeb256670926c9ff9873be52de6a069f5e3a1a;p=php We quote with ' in real databases --- diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c index 336f3a9f81..cca7084458 100644 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@ -131,9 +131,9 @@ static int pgsql_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, int unquote { pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh->driver_data; *quoted = emalloc(2*unquotedlen + 3); - (*quoted)[0] = '"'; + (*quoted)[0] = '\''; *quotedlen = PQescapeString(*quoted + 1, unquoted, unquotedlen); - (*quoted)[*quotedlen + 1] = '"'; + (*quoted)[*quotedlen + 1] = '\''; (*quoted)[*quotedlen + 2] = '\0'; *quotedlen += 2; return 1;