Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-20 Thread Samuel ROZE
Hi Christopher, 2009/10/19 Christopher Jones christopher.jo...@oracle.com: The new interface combines system generated error messages with user generated messages. I think you're talking about Oracle. The original PostgreSQL example I saw seemed to use arbitrary text messages, similar to

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-19 Thread Christopher Jones
Samuel ROZE wrote: http://wiki.php.net/rfc/pdonotices Samuel. The new interface combines system generated error messages with user generated messages. The original PostgreSQL example I saw seemed to use arbitrary text messages, similar to Oracle's DBMS_OUTPUT (page 181 of

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-19 Thread Daniel Convissor
Folks: http://tinyurl.com/UGPOM The actual URI for that is http://www.oracle.com/technology/tech/php/pdf /underground-php-oracle-manual.pdf. I encourage people to reconsider widespread use of URI shortening services. They lose any clues readers may want as to what the resource is and

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-15 Thread Lukas Kahwe Smith
On 13.10.2009, at 10:34, Samuel ROZE wrote: http://wiki.php.net/rfc/pdonotices I assume that calling noticeInfo() will also purge all currently stored notices (maybe controllable via some parameter)? For MySQL we would have to throw an error/exception in case there is a result set

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-15 Thread Samuel ROZE
Le jeudi 15 octobre 2009 à 11:08 +0200, Lukas Kahwe Smith a écrit : On 13.10.2009, at 10:34, Samuel ROZE wrote: http://wiki.php.net/rfc/pdonotices I assume that calling noticeInfo() will also purge all currently stored notices (maybe controllable via some parameter)? If purge all

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-15 Thread Lukas Kahwe Smith
On 15.10.2009, at 19:40, Samuel ROZE wrote: Le jeudi 15 octobre 2009 à 11:08 +0200, Lukas Kahwe Smith a écrit : On 13.10.2009, at 10:34, Samuel ROZE wrote: http://wiki.php.net/rfc/pdonotices I assume that calling noticeInfo() will also purge all currently stored notices (maybe

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-13 Thread Samuel ROZE
http://wiki.php.net/rfc/pdonotices Samuel. 2009/10/12 Samuel ROZE samuel.r...@gmail.com: Here is what I expect for the notices fetching in PDO: http://www.d-sites.com/wp-content/uploads/2009/10/RFC-PDO-Notices.pdf Samuel. Le lundi 12 octobre 2009 à 19:11 +0200, Lukas Kahwe Smith a écrit :

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-12 Thread Matteo Beccati
Hi, hmm why do you think that PDO would need to take special care about this? seems like this is the job of the PDO using code .. Depending on how PDO's code is written, it could inadvertently blow away metadata without a user knowing it. but it does raise one concern that i did not

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-12 Thread Pierre Joye
hi, On Mon, Oct 12, 2009 at 11:58 AM, Matteo Beccati p...@beccati.com wrote: Given the recent posts, I'd vote to only add whatever is needed for the drivers to access the extra data. That means to only add the specific pgsql code to gather notices as the mysql and oracle drivers are already

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-12 Thread Lukas Kahwe Smith
On 12.10.2009, at 12:07, Pierre Joye wrote: hi, On Mon, Oct 12, 2009 at 11:58 AM, Matteo Beccati p...@beccati.com wrote: Given the recent posts, I'd vote to only add whatever is needed for the drivers to access the extra data. That means to only add the specific pgsql code to gather

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-12 Thread Lukas Kahwe Smith
On 12.10.2009, at 19:00, Samuel ROZE wrote: Hi, I'm writing here to take a point about the discussion. On one side, you want to turn this functionality to a global function, like it is describe into this patch and on the other side, you said that on MySQL and Oracle we can get this notices

[PHP-DEV] Re: Patch: Use notices in PDO

2009-10-12 Thread Samuel ROZE
Hi, I'm writing here to take a point about the discussion. On one side, you want to turn this functionality to a global function, like it is describe into this patch and on the other side, you said that on MySQL and Oracle we can get this notices with queries so it is not needed for them but only

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-12 Thread Samuel ROZE
Here is what I expect for the notices fetching in PDO: http://www.d-sites.com/wp-content/uploads/2009/10/RFC-PDO-Notices.pdf Samuel. Le lundi 12 octobre 2009 à 19:11 +0200, Lukas Kahwe Smith a écrit : [...] well .. what Pierre (and me supporting him) was asking for is to create an RFC page

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-12 Thread Pierre Joye
hi Samuel, May I ask you to do it in the wiki? We have a dedicated section there: http://wiki.php.net/RFC Cheers, On Mon, Oct 12, 2009 at 10:13 PM, Samuel ROZE samuel.r...@gmail.com wrote: Here is what I expect for the notices fetching in PDO:

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-11 Thread Samuel ROZE
Le samedi 10 octobre 2009 à 19:43 +0100, Lester Caine a écrit : [...] It is the case for MySQL and Oracle...so for your mind, we don't have to make this option available ? I disagree because PDO want make that PHP codes support many Databases and if I want to get this notices on MySQL, I

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-11 Thread Daniel Convissor
Hi: If the notice/warning gathering abstraction is going to be sending queries to the DBMS in the background, one needs to be careful about maintaining both the results and metadata from the original query that caused the warnings. --Dan -- T H E A N A L Y S I S A N D S O L U T I O N

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-11 Thread Samuel ROZE
Hi, Le dimanche 11 octobre 2009 à 11:55 -0400, Daniel Convissor a écrit : Hi: If the notice/warning gathering abstraction is going to be sending queries to the DBMS in the background, one needs to be careful about maintaining both the results and metadata from the original query that

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-11 Thread Lukas Kahwe Smith
On 11.10.2009, at 17:55, Daniel Convissor wrote: If the notice/warning gathering abstraction is going to be sending queries to the DBMS in the background, one needs to be careful about maintaining both the results and metadata from the original query that caused the warnings. hmm why do you

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-11 Thread Lester Caine
Lukas Kahwe Smith wrote: On 11.10.2009, at 17:55, Daniel Convissor wrote: If the notice/warning gathering abstraction is going to be sending queries to the DBMS in the background, one needs to be careful about maintaining both the results and metadata from the original query that caused the

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-11 Thread Daniel Convissor
Hi Lukas: hmm why do you think that PDO would need to take special care about this? seems like this is the job of the PDO using code .. Depending on how PDO's code is written, it could inadvertently blow away metadata without a user knowing it. but it does raise one concern that i did

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-10 Thread Ferenc Kovacs
On Fri, Oct 9, 2009 at 11:12 PM, Samuel ROZE samuel.r...@gmail.com wrote: Le vendredi 09 octobre 2009 à 23:05 +0200, Pierre Joye a écrit : About applying it, we should wait a bit more until we get more feedbacks (say until the middle of next week). Oh yeah of course ! It was just a question

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-10 Thread Lester Caine
Ferenc Kovacs wrote: Then see how we can do it for the other drivers at the same time. I'm looking for Oracle. Is somebody know how we can do for MySQL (and how raise notices with it) ? http://dev.mysql.com/doc/refman/5.1/en/show-warnings.html Something to consider here is that, like MySQL

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-10 Thread Samuel ROZE
Le samedi 10 octobre 2009 à 15:51 +0100, Lester Caine a écrit : Ferenc Kovacs wrote: Then see how we can do it for the other drivers at the same time. I'm looking for Oracle. Is somebody know how we can do for MySQL (and how raise notices with it) ?

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-10 Thread Lukas Kahwe Smith
On 10.10.2009, at 19:32, Samuel ROZE wrote: Le samedi 10 octobre 2009 à 15:51 +0100, Lester Caine a écrit : Ferenc Kovacs wrote: Then see how we can do it for the other drivers at the same time. I'm looking for Oracle. Is somebody know how we can do for MySQL (and how raise notices with

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-10 Thread Lester Caine
Samuel ROZE wrote: Le samedi 10 octobre 2009 à 15:51 +0100, Lester Caine a écrit : Ferenc Kovacs wrote: Then see how we can do it for the other drivers at the same time. I'm looking for Oracle. Is somebody know how we can do for MySQL (and how raise notices with it) ?

[PHP-DEV] Re: Patch: Use notices in PDO

2009-10-09 Thread Samuel ROZE
Just a little question: - How I can propose my patch to be merged to PHP ? Rather suggest.. :-) Le jeudi 08 octobre 2009 à 23:51 +0200, Samuel ROZE a écrit : Hi, I've make a patch which insert notices concepts to PDO. It create: - PDO::noticeInfo() - to be like errorInfo -

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-09 Thread Pierre Joye
Hi, First thanks to have updated the patch according to our last feedback :) About applying it, we should wait a bit more until we get more feedbacks (say until the middle of next week). Then see how we can do it for the other drivers at the same time. Cheers, -- Pierre On Fri, Oct 9, 2009 at

Re: [PHP-DEV] Re: Patch: Use notices in PDO

2009-10-09 Thread Samuel ROZE
Le vendredi 09 octobre 2009 à 23:05 +0200, Pierre Joye a écrit : About applying it, we should wait a bit more until we get more feedbacks (say until the middle of next week). Oh yeah of course ! It was just a question to know how it happened. ;-) Then see how we can do it for the other

[PHP-DEV] Re: Patch: Use notices in PDO

2009-10-08 Thread Samuel ROZE
There's an example, using PostgreSQL driver: ?php $sql = new PDO('pgsql:host=localhost;dbname=postgres', 'postgres', '', array( PDO::ATTR_LOG_NOTICES = PDO::NOTICES_FETCH )); var_dump($sql); echo getAttribute: ;