php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #51608
Patch pgsql_copy_to_escape.patch revision 2010-04-20 00:16 UTC by cbandy at jbandy dot com

Patch pgsql_copy_to_escape.patch for PostgreSQL related Bug #51608

Patch version 2010-04-20 00:16 UTC

Return to Bug #51608 | Download this patch
Patch Revisions:

Developer: cbandy@jbandy.com

--- php-5.3.2/ext/pgsql/pgsql.c.orig	2010-01-03 03:23:27.000000000 -0600
+++ php-5.3.2/ext/pgsql/pgsql.c	2010-04-19 18:26:53.000000000 -0500
@@ -3765,9 +3765,9 @@
 	}
 
 	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))) {
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 07:01:29 2024 UTC