Re: Patch: Use notices in PDO

From: Date: Fri, 09 Oct 2009 10:04:15 +0000
Subject: Re: Patch: Use notices in PDO
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-45705@lists.php.net to get a copy of this message
Christopher Jones ha scritto: > > 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: > > {%6 > Ç壅IAPö젍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? How about: PDO::NOTICES_DISABLED PDO::NOTICES_ARRAY to allow space for different formats (e.g. PDO::NOTICES_RESULTSET)? > PL/SQL also has compile time warnings and errors that are handled > differently, see "PL/SQL Success With Information Warnings" on p167. However, having read the above chapter, it seems to me that error code 24344 with its warnings is more similar to MySQL warnings and PgSQL notices. Which one should be automatically handled by PDO? I'd vote for this one, leaving DBMS_OUTPUT still available by manually sending the queries highligthed in your book. Cheers -- Matteo Beccati

« previous php.internals (#45705) next »