From: Ilia Alshanetsky Date: Thu, 12 Mar 2009 22:53:16 +0000 (+0000) Subject: Fixed bug #47639 (pg_copy_from() WARNING: nonstandard use of \\ in a string X-Git-Tag: RELEASE_1_3_5~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8610935eacfd0dc7b859417e4b8927f112b9a19c;p=php Fixed bug #47639 (pg_copy_from() WARNING: nonstandard use of \\ in a string literal) --- diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 5b6e3c881a..8a2dff0978 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -3890,7 +3890,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); }