Skip to content

Commit 644e290

Browse files
duncan3dcweltling
authored andcommitted
Fix bug #73498
Postgres uses the DELIMITER keyword since 7.3 And WITH is no longer required/used
1 parent d36d4c7 commit 644e290

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/pgsql/pgsql.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4054,7 +4054,7 @@ PHP_FUNCTION(pg_copy_to)
40544054
free_pg_null = 1;
40554055
}
40564056

4057-
spprintf(&query, 0, "COPY %s TO STDOUT DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, *pg_delim, pg_null_as);
4057+
spprintf(&query, 0, "COPY %s TO STDOUT DELIMITER E'%c' NULL AS E'%s'", table_name, *pg_delim, pg_null_as);
40584058

40594059
while ((pgsql_result = PQgetResult(pgsql))) {
40604060
PQclear(pgsql_result);
@@ -4187,7 +4187,7 @@ PHP_FUNCTION(pg_copy_from)
41874187
pg_null_as_free = 1;
41884188
}
41894189

4190-
spprintf(&query, 0, "COPY %s FROM STDIN DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, *pg_delim, pg_null_as);
4190+
spprintf(&query, 0, "COPY %s FROM STDIN DELIMITER E'%c' NULL AS E'%s'", table_name, *pg_delim, pg_null_as);
41914191
while ((pgsql_result = PQgetResult(pgsql))) {
41924192
PQclear(pgsql_result);
41934193
}

0 commit comments

Comments
 (0)