Re: [PATCH] New PDO methods for PostgreSQL driver
| From: | Christopher Jones | Date: | Mon, 07 Jun 2010 17:34:26 +0000 |
| Subject: | Re: [PATCH] New PDO methods for PostgreSQL driver | ||
| References: | 1 | Groups: | php.pdo |
| Request: | Send a blank email to pdo+get-428@lists.php.net to get a copy of this message | ||
Denis Gasparin wrote:
Now I understand. I had thought you meant "you will need" in any future implementation. Chris -- Email: christopher.jones@oracle.com Tel: +1 650 506 8630 Blog: http://blogs.oracle.com/opal/ Free PHP Book: http://tinyurl.com/ugpomhomeSome test or doc would help educate us on the new functionality.I'll provide the tests as soon as possible.Also I haven't seen anything to explain your earlier comment to Lester that "In particular you'll need two database connections (one with the original driver and one with PDO) in order to use the native copy* functions.".The old pgsql driver makes a db connection using pg_connect(). After a call to this function a resource handle to the database connection is returned Passing this handle to pg_copy_from() and pg_copy_to() functions, it is possible to issue the copy from/to commands to PostgreSQL. Now, if I would like to use pg_copy_from() and pg_copy_to() in a script that is already using a PDO connection i need two database connections: - one made with PDO ($c = new PDO("...")) - one made with pg_connect (to use pg_copy_from() and pg_copy_to()).