From: Ilia Alshanetsky Date: Thu, 12 Mar 2009 22:54:15 +0000 (+0000) Subject: MFB: Fixed bug #47639 (pg_copy_from() WARNING: nonstandard use of \\ in a string X-Git-Tag: php-5.2.10RC1~304 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=32027f5944244ff9dfc2f25bd7b875148517d0f4;p=php MFB: Fixed bug #47639 (pg_copy_from() WARNING: nonstandard use of \\ in a string literal) --- diff --git a/NEWS b/NEWS index 1c1464016c..4e01019917 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ PHP NEWS ?? ??? 2009, PHP 5.2.10 - Fixed memory corruptions while reading properties of zip files. (Ilia) +- Fixed bug #47639 (pg_copy_from() WARNING: nonstandard use of \\ in a string + literal). (Ilia) - Fixed bug #47598 (FILTER_VALIDATE_EMAIL is locale aware). (Ilia) - Fixed bug #47546 (Default value for limit parameter in explode is 0, not -1). (Kalle) diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index e8518f6510..ad470dd7ea 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -3469,7 +3469,7 @@ PHP_FUNCTION(pg_copy_from) ZEND_FETCH_RESOURCE2(pgsql, PGconn *, &pgsql_link, id, "PostgreSQL link", le_link, le_plink); - spprintf(&query, 0, "COPY \"%s\" FROM STDIN DELIMITERS '%c' WITH NULL AS '%s'", table_name, *pg_delim, pg_null_as); + spprintf(&query, 0, "COPY \"%s\" FROM STDIN DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, *pg_delim, pg_null_as); while ((pgsql_result = PQgetResult(pgsql))) { PQclear(pgsql_result); }