mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
- Fixed bug #51607 (pg_copy_from does not allow schema in the tablename argument)
Patch by: cbandy at jbandy dot com
This commit is contained in:
parent
336e957951
commit
1efc049863
2
NEWS
2
NEWS
@ -22,6 +22,8 @@ PHP NEWS
|
||||
(Felipe)
|
||||
- Fixed bug #51608 (pg_copy_to: WARNING: nonstandard use of \\ in a string
|
||||
literal). (cbandy at jbandy dot com)
|
||||
- Fixed bug #51607 (pg_copy_from does not allow schema in the tablename
|
||||
argument). (cbandy at jbandy dot com)
|
||||
- Fixed bug #51590 (JSON_ERROR_UTF8 is undefined). (Felipe)
|
||||
- Fixed bug #51577 (Uninitialized memory reference with oci_bind_array_by_name)
|
||||
(Oracle Corp.)
|
||||
|
@ -3765,11 +3765,7 @@ PHP_FUNCTION(pg_copy_to)
|
||||
free_pg_null = 1;
|
||||
}
|
||||
|
||||
if (memchr(table_name, '.', table_name_len)) {
|
||||
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 E'%c' WITH NULL AS E'%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))) {
|
||||
PQclear(pgsql_result);
|
||||
@ -3901,7 +3897,7 @@ PHP_FUNCTION(pg_copy_from)
|
||||
|
||||
ZEND_FETCH_RESOURCE2(pgsql, PGconn *, &pgsql_link, id, "PostgreSQL link", le_link, le_plink);
|
||||
|
||||
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 DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, *pg_delim, pg_null_as);
|
||||
while ((pgsql_result = PQgetResult(pgsql))) {
|
||||
PQclear(pgsql_result);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user