summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Duncan <git@duncanc.co.uk>2016-11-20 20:48:21 +0000
committerAnatol Belski <ab@php.net>2016-11-22 00:42:45 +0100
commit644e290fcdc228d1990d8010c807dc39af6de4d5 (patch)
tree3512e95d7429669535c7f8cf13a63fdbeba17c34
parentd36d4c70d3df2799af5dbb150660a70ffc60fc77 (diff)
downloadphp-git-644e290fcdc228d1990d8010c807dc39af6de4d5.tar.gz
Fix bug #73498
Postgres uses the DELIMITER keyword since 7.3 And WITH is no longer required/used
-rw-r--r--ext/pgsql/pgsql.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index dfe8a7ddb2..b746595250 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);
}