Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice

2009-10-07 Thread Matteo Beccati
Hi, Well, i've show the patch this morning... It's great ! The allocation of the HashTable when use setAttribute might not be really a good job but other, in my mind, is ! Yeah, I'm not very happy about it either. It was just a proof of concept after all ;) Cheers -- Matteo Beccati --

Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice

2009-10-07 Thread Matteo Beccati
Hi Christopher, What are notices? Do they relate anything in other Databases? I.e. can a generic interface be implemented instead of a postgres specific one? I'm not sure. Notices are non-error messages that can be triggered during a query for informative purposes. For example CREATE TABLE

Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice

2009-10-07 Thread Matteo Beccati
Christopher Jones ha scritto: Could you use the new PG specific attribute to enable them but make them output/handled by the existing error/exception interface? That's what I originally thought. But there can be multiple notices triggered by a single query and they shouldn't make the query

Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice

2009-10-07 Thread Samuel ROZE
Ok, it is possible with Oracle.. Do you think that if it is for only both of PDO's supported databases is a reason to make that generaly ? For other drivers it must just burdening PDO. It's what I think... Le mardi 06 octobre 2009 à 23:08 -0700, Christopher Jones a écrit : Samuel ROZE wrote:

Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice

2009-10-07 Thread Christopher Jones
Lukas Kahwe Smith wrote: On 07.10.2009, at 08:09, Matteo Beccati wrote: Christopher Jones ha scritto: Could you use the new PG specific attribute to enable them but make them output/handled by the existing error/exception interface? That's what I originally thought. But there can be

Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice

2009-10-07 Thread Matteo Beccati
Christopher Jones wrote: Lukas Kahwe Smith wrote: On 07.10.2009, at 08:09, Matteo Beccati wrote: Christopher Jones ha scritto: Could you use the new PG specific attribute to enable them but make them output/handled by the existing error/exception interface? That's what I originally

Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice

2009-10-07 Thread Lukas Kahwe Smith
On 07.10.2009, at 08:09, Matteo Beccati wrote: Christopher Jones ha scritto: Could you use the new PG specific attribute to enable them but make them output/handled by the existing error/exception interface? That's what I originally thought. But there can be multiple notices triggered by a

Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice

2009-10-07 Thread Matteo Beccati
Pierre Joye ha scritto: Having them part of the PHP errors is counter intuitive and add extra work for little gain. Mysql being the most cleaner way to do it at this stage as it does not interfer with php code at all. Yes. That's exactly why I added a new method, although driver specific.

Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice

2009-10-07 Thread Pierre Joye
hi, On Wed, Oct 7, 2009 at 9:06 AM, Matteo Beccati p...@beccati.com wrote: Christopher Jones wrote: Lukas Kahwe Smith wrote: On 07.10.2009, at 08:09, Matteo Beccati wrote: Christopher Jones ha scritto: Could you use the new PG specific attribute to enable them but make them

Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice

2009-10-07 Thread Samuel ROZE
Le mercredi 07 octobre 2009 à 09:06 +0200, Matteo Beccati a écrit : From what I could see, things get a bit more complicate on the code side: PgSQL: 1. Set a notice processor callback 2. Clear the notice buffer before a query 3. Asynchronously buffer notices inside the callback 4. Set a

Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice

2009-10-07 Thread Pierre Joye
On Wed, Oct 7, 2009 at 1:27 PM, Samuel ROZE samuel.r...@aliceadsl.fr wrote: Le mercredi 07 octobre 2009 à 09:06 +0200, Matteo Beccati a écrit : From what I could see, things get a bit more complicate on the code side: PgSQL: 1. Set a notice processor callback 2. Clear the notice buffer

Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice

2009-10-07 Thread Samuel ROZE
Le mercredi 07 octobre 2009 à 13:30 +0200, Pierre Joye a écrit : [...] This is a bit complicated and very different ! Actually, each database works as it want and it may be better to use different functions for each driver. That defeats the whole purpose of PDO. The meaning of each

Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice

2009-10-07 Thread Samuel ROZE
Le mercredi 07 octobre 2009 à 07:57 +0200, Samuel ROZE a écrit : Well, i've show the patch this morning... It's great ! The allocation of the HashTable when use setAttribute might not be really a good job but other, in my mind, is ! See you afternoon for PHP 5.2 path. :-) Well, I've done a

Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice

2009-10-07 Thread Lukas Kahwe Smith
On 07.10.2009, at 15:49, Matteo Beccati wrote: Pierre Joye ha scritto: On Wed, Oct 7, 2009 at 1:27 PM, Samuel ROZE samuel.r...@aliceadsl.fr wrote: This is a bit complicated and very different ! Actually, each database works as it want and it may be better to use different functions for

Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice

2009-10-07 Thread Samuel ROZE
Le mercredi 07 octobre 2009 à 15:47 +0200, Pierre Joye a écrit : The idea is good and matches my thoughts on this topic. Some comments: - no driver specific API, so getNotices instaed of getdriverNotices It was discuss, it need hours to implement this method to all drivers... - common

Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice

2009-10-07 Thread Pierre Joye
hi, On Wed, Oct 7, 2009 at 3:49 PM, Matteo Beccati p...@beccati.com wrote: By all means, I like the idea of a unified message API, but do we really need the syntactic sugar (and development effort)? MySQL and Oracle drivers can already access them with a standard PDO::query() call. Only

Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice

2009-10-07 Thread Matteo Beccati
Samuel ROZE ha scritto: Le mercredi 07 octobre 2009 à 15:47 +0200, Pierre Joye a écrit : 5.2 is also only for security fixes. Can you try to produce a patch against 5.3 and trunk please? There's the patch of Matteo Beccati at this address for PHP 5.3:

Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice

2009-10-07 Thread Samuel ROZE
Actually, PDO want to abstract the communication between the Database and PHP. In the communication there are the connection and the querying of tables which raise errors and notices (for many Databases drivers). So, in my mind, it will be a great job to standardise recuperation of

Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice

2009-10-07 Thread Pierre Joye
hi, The idea is good and matches my thoughts on this topic. Some comments: - no driver specific API, so getNotices instaed of getdriverNotices - common attribute name as well and maybe a better naming ATTR_LOG_NOTICES? 5.2 is also only for security fixes. Can you try to produce a patch against

Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice

2009-10-07 Thread Matteo Beccati
Pierre Joye ha scritto: On Wed, Oct 7, 2009 at 1:27 PM, Samuel ROZE samuel.r...@aliceadsl.fr wrote: This is a bit complicated and very different ! Actually, each database works as it want and it may be better to use different functions for each driver. That defeats the whole purpose of PDO.

[PHP-DEV] php-src in Eclipse CDT

2009-10-07 Thread Samuel ROZE
Hi, Now, i'm using Eclipse CDT (C/C++ Development Tools) and Subclipse. I have a Project (no C Project) from the checkout of the PHP SVN. I modify files, I can create/apply path easly, i'm happy. But, to build, i'm using the console, make sudo make install. Is it possible that when I save into

Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice

2009-10-07 Thread Lester Caine
( Having stripped 6 people from the reply list ... ) Matteo Beccati wrote: Pierre Joye ha scritto: Having them part of the PHP errors is counter intuitive and add extra work for little gain. Mysql being the most cleaner way to do it at this stage as it does not interfer with php code at all.