Re: Patch: Use notices in PDO
| From: | Christopher Jones | Date: | Fri, 09 Oct 2009 06:17:54 +0000 |
| Subject: | Re: Patch: Use notices in PDO | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-45704@lists.php.net to get a copy of this message | ||
Samuel ROZE wrote:
It's a good idea. - PDO::NOTICES_FETCH -> PDO::NOTICES_ENABLED - PDO::NOTICES_NONE -> PDO::NOTICES_DISABLED That's better ?That works.
I see that you are from the Oracle team. Can you explain me how oracle works to raise notices like PostgreSQL ? Or can you build a proof of concept to get notices from Oracle ?I'm equating your NOTICES to Oracle's DBMS_OUTPUT. See "Getting Output with DBMS_OUTPUT" on p 181 of: http://www.oracle.com/technology/tech/php/underground-php-oracle-manual.html Something similar could be coded in the PDO driver. The amount of text output could be quite large, depending on the user's coding style. Is your design extensible enough to allow for streaming/chunking if the interface needs to be enhanced? PL/SQL also has compile time warnings and errors that are handled differently, see "PL/SQL Success With Information Warnings" on p167. Chris
Thanks. Samuel. Le jeudi 08 octobre 2009 à 15:22 -0700, Christopher Jones a écrit :-- Blog: http://blogs.oracle.com/opal Twitter: http://twitter.com/ghrdSamuel ROZE wrote:Hi, I've make a patch which insert notices concepts to PDO. It create: - PDO::noticeInfo() - to be like errorInfo - PDO::ATTR_LOG_NOTICES, the name of the PDO parameter - PDO::NOTICES_FETCH - fetch noticesI initially took "FETCH" to mean it was related to a query; this wouldn't always be the case. What about calling it NOTICES_ENABLE? Chris