Re: [PHP-DEV] [PATCH] New PDO methods for PostgreSQL driver

[email protected] (Christopher Jones) Mon, 07 Jun 2010 10:34:26 -0700
Newsgroups php.pdo
Message-ID <[email protected]>

Denis Gasparin wrote:
>> Some 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()).

Now I understand.  I had thought you meant "you will need" in any future
implementation.


Chris

-- 
Email: [email protected]
Tel:  +1 650 506 8630
Blog:  http://blogs.oracle.com/opal/
Free PHP Book: http://tinyurl.com/ugpomhome