Edit report at https://bugs.php.net/bug.php?id=63657&edit=1
ID: 63657 Updated by: mbecc...@php.net Reported by: c...@php.net -Summary: pgsqlCopyFromFile, pgsqlCopyToArray have syntax errors +Summary: pgsqlCopyFromFile, pgsqlCopyToArray use Postgres < 7.3 syntax Status: Assigned Type: Bug Package: PDO related PHP Version: 5.4.9 Assigned To: mbeccati Block user comment: N Private report: N New Comment: That's simply not true. If you were receiving an error, it must have been something else. See: http://www.postgresql.org/docs/9.2/static/sql-copy.html#AEN66829 At some point compatibility with <7.3 syntax might be dropped though, so I'm going to follow the suggestion anyway (using pre-9.0 syntax). Previous Comments: ------------------------------------------------------------------------ [2012-11-30 12:28:34] c...@php.net Description: ------------ In ext/pdo_pgsql/pgsql_driver.c the methods pgsqlCopyToArray, pgsqlCopyFromArray etc. all use the following syntax: COPY %s FROM STDIN DELIMITERS E'%c' WITH NULL AS E'%s' In at least PostgreSQL 9.2 this is a syntax error though. The correct syntax is: COPY %s FROM STDIN WITH DELIMITER E'%c', NULL AS E'%s' a) the "WITH" is optional but must come immediately after the STDIN if given b) it's a singular "DELIMITER", not plural (btw, these method are undocumented anyway, see my other bug report about that) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63657&edit=1