From: Felipe Pena Date: Tue, 20 Apr 2010 11:49:23 +0000 (+0000) Subject: - Fixed bug #51608 (pg_copy_to: WARNING: nonstandard use of \\ in a string literal) X-Git-Tag: php-5.4.0alpha1~191^2~1741 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f507cc9cf692f01428555adb280049f73a8ae573;p=php - Fixed bug #51608 (pg_copy_to: WARNING: nonstandard use of \\ in a string literal) Patch by: cbandy at jbandy dot com --- diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 43bd32b8f5..92725ee996 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -3765,9 +3765,9 @@ PHP_FUNCTION(pg_copy_to) } if (memchr(table_name, '.', table_name_len)) { - spprintf(&query, 0, "COPY %s TO STDOUT DELIMITERS '%c' WITH NULL AS '%s'", table_name, *pg_delim, pg_null_as); + spprintf(&query, 0, "COPY %s TO STDOUT DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, *pg_delim, pg_null_as); } else { - spprintf(&query, 0, "COPY \"%s\" TO STDOUT DELIMITERS '%c' WITH NULL AS '%s'", table_name, *pg_delim, pg_null_as); + spprintf(&query, 0, "COPY \"%s\" TO STDOUT DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, *pg_delim, pg_null_as); } while ((pgsql_result = PQgetResult(pgsql))) {