]> granicus.if.org Git - php/commitdiff
MFB: Fixed bug #47639 (pg_copy_from() WARNING: nonstandard use of \\ in a string
authorIlia Alshanetsky <iliaa@php.net>
Thu, 12 Mar 2009 22:54:15 +0000 (22:54 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 12 Mar 2009 22:54:15 +0000 (22:54 +0000)
literal)

NEWS
ext/pgsql/pgsql.c

diff --git a/NEWS b/NEWS
index 1c1464016c5f936b8b159f332839ee5635807eb9..4e010199177fee6188e1c16aacdf92321753b734 100644 (file)
--- 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)
index e8518f651095600b7bef417c9754feeb1d74a485..ad470dd7ead1b29d10292cf3986558c8b6482a88 100644 (file)
@@ -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);
        }