Bug #63657 [Asn->Csd]: pgsqlCopyFromFile, pgsqlCopyToArray use Postgres < 7.3 syntax
| From: | mbeccati@php.net | Date: | Fri, 07 Jun 2013 07:41:38 +0000 |
| Subject: | Bug #63657 [Asn->Csd]: pgsqlCopyFromFile, pgsqlCopyToArray use Postgres < 7.3 syntax | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-179386@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=63657&edit=1
ID: 63657
Updated by: mbeccati@php.net
Reported by: ch@php.net
Summary: pgsqlCopyFromFile, pgsqlCopyToArray use Postgres <
7.3 syntax
-Status: Assigned
+Status: Closed
Type: Bug
Package: PDO related
PHP Version: 5.4.9
Assigned To: mbeccati
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of mbeccati
Revision: http://git.php.net/?p=php-src.git;a=commit;h=19ead23e8ec1e09bce080139a92d372ff1a8416b
Log: Fixed bug #63657 (pgsqlCopyFrom/To methods use Postgres < 7.3 syntax)
Previous Comments:
------------------------------------------------------------------------
[2013-06-07 07:19:18] mbeccati@php.net
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).
------------------------------------------------------------------------
[2012-11-30 12:28:34] ch@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