Hi. I tried to add to the PDO pgsql driver a method that, in our intention, should have returned the connection resource after registering it as zend resource. Basically, the method did the following call:
ZEND_REGISTER_RESOURCE(return_value, H->server, le_link); (H->server is the postgresql connection handler as returned by PQconnectdb in the PDO driver). If I remember correctly (it was december 2008), I got several (randomly) segmentation faults (probably dued to memory leaks). After few days I gave up and started to develop the patches I sent. I'm sorry for the delay I sent the patches (probably one year ago it would be better) but that's another story... :-) Denis ----- Messaggio originale ----- > Da: "Jonathan Wage" <jonw...@gmail.com> > A: "Denis Gasparin" <denis.gaspa...@edistar.com> > Cc: "Pierre Joye" <pierre....@gmail.com>, "Ilia Alshanetsky" > <i...@prohost.org>, "Matteo Beccati" <p...@beccati.com>, > internals@lists.php.net, "pdo" <p...@lists.php.net>, "Ferenc Kovacs" > <i...@tyrael.hu> > Inviato: Giovedì, 3 giugno 2010 21:52:10 > Oggetto: Re: [PHP-DEV] [PATCH] New PDO methods for PostgreSQL driver > Hi, > > > On Thu, Jun 3, 2010 at 3:48 PM, Denis Gasparin < > denis.gaspa...@edistar.com > 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. > > > > > What were the problems you had? > > > If anyone could give me any tip to follow, I would try to develop it. > > Thank you, > Denis > > > ----- Messaggio originale ----- > > Da: "Pierre Joye" < pierre....@gmail.com > > > A: "Ferenc Kovacs" < i...@tyrael.hu > > > Cc: "Jonathan Wage" < jonw...@gmail.com >, "Denis Gasparin" < > > denis.gaspa...@edistar.com >, "Ilia Alshanetsky" > > < i...@prohost.org >, "Matteo Beccati" < p...@beccati.com >, > > internals@lists.php.net , "pdo" < p...@lists..php.net > > > Inviato: Giovedì, 3 giugno 2010 21:14:20 > > > Oggetto: Re: [PHP-DEV] [PATCH] New PDO methods for PostgreSQL driver > > > > > > On Thu, Jun 3, 2010 at 8:47 PM, Ferenc Kovacs < i...@tyrael.hu > > > wrote: > > > > > This discussion has a long history, and it would be better to > > > actualy do > > > something about the problem, because it seems that it won't going > > > to disappear by itself. > > > I don't want to be rude, but the PDO v2 spec was last modified in > > > 2008.01.23. the problems with the current PDO architechture are > > > the same that Wez pointed out in his FAQ and spec. > > > > Nobody wanted to contribute to this pdo v2 spec as it was not open > > (CLA and all the bad things brought by such things). > > > > > > > > Agree, but currently I don't see any point in waiting, if we don't > > > do anything else beside waiting. > > > > There are discussions about that on the PDO list in the past. > > However, it is because we failed to start discussions that we should > > give up > > and continue to add bad designed features to PDO, with all respects > > to the author of the patch. > > > > Now let begin an open discussion to define what we actually need for > > PHP to continue to rock the web. > > > > Cheers, > > -- Pierre > > > > @pierrejoye | http://blog.thepimp.net | http://www.libgd.org > > > > -- Jonathan H. Wage (+1 415 992 5468) > Open Source Software Developer & Evangelist > sensiolabs.com | jwage.com | doctrine-project.org | > symfony-project.org > > You should follow me on Twitter: http://www.twitter.com/jwage > > You can contact Jonathan about Doctrine, Symfony and Open-Source or > for training, consulting, application development, or business related > questions at jonathan.w...@sensio.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php