com php-src: Fix bug #73498: ext/pgsql/pgsql.c

From: Date: Mon, 21 Nov 2016 23:42:45 +0000
Subject: com php-src: Fix bug #73498: ext/pgsql/pgsql.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-95953@lists.php.net to get a copy of this message
Commit: 644e290fcdc228d1990d8010c807dc39af6de4d5 Author: Craig Duncan <git@duncanc.co.uk> Sun, 20 Nov 2016 20:48:21 +0000 Committer: Anatol Belski <ab@php.net> Tue, 22 Nov 2016 00:42:45 +0100 Parents: d36d4c70d3df2799af5dbb150660a70ffc60fc77 Branches: PHP-5.6 PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=644e290fcdc228d1990d8010c807dc39af6de4d5 Log: Fix bug #73498 Postgres uses the DELIMITER keyword since 7.3 And WITH is no longer required/used Bugs: https://bugs.php.net/73498 Changed paths: M ext/pgsql/pgsql.c Diff: diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index dfe8a7d..b746595 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -4054,7 +4054,7 @@ PHP_FUNCTION(pg_copy_to) free_pg_null = 1; } - spprintf(&query, 0, "COPY %s TO STDOUT DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, *pg_delim, pg_null_as); + spprintf(&query, 0, "COPY %s TO STDOUT DELIMITER E'%c' NULL AS E'%s'", table_name, *pg_delim, pg_null_as); while ((pgsql_result = PQgetResult(pgsql))) { PQclear(pgsql_result); @@ -4187,7 +4187,7 @@ PHP_FUNCTION(pg_copy_from) pg_null_as_free = 1; } - spprintf(&query, 0, "COPY %s FROM STDIN DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, *pg_delim, pg_null_as); + spprintf(&query, 0, "COPY %s FROM STDIN DELIMITER E'%c' NULL AS E'%s'", table_name, *pg_delim, pg_null_as); while ((pgsql_result = PQgetResult(pgsql))) { PQclear(pgsql_result); }

« previous php.cvs (#95953) next »