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

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

Denis Gasparin wrote:
 > As I pointed out last week, we needed these functions for several reasons:
 >
 > - the same features are not available directly via sql commands.
 > - we needed PDO in order to use the doctrine framework but we needed to verify the transaction status and use the pgsql copyFrom/To functions
 > - for performance and optimization, we needed to avoid to open two connections (one with the old driver and one with the PDO one).
 >
 > When I developed the functions, I patched the specific pgsql PDO driver (not the global one) and I did it following the convention used for other pgsql PDO functions (or for other DBMS specific PDO functions: for example pgsqlLOBCreate or 
sqliteCreateAggregate).
 >
 >
 > As I wrote last week, according to me too the best solution would be to share the PDO opened connection between the old pgsql driver and the PDO one
 > That was the original way we tried to develop the patch without success.

I would prefer to see PDO extended to add copy functionality and not
have complexity added for connection sharing.  There is a huge
maintenance cost of connection sharing - even if it's at all feasible.
I've dealt with it in another (non PHP) project and it wasn't pretty.
The very last thing PDO needs now is an increased maintenance burden.

Chris

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