Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45705 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92461 invoked from network); 9 Oct 2009 10:04:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Oct 2009 10:04:36 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@beccati.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=php@beccati.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain beccati.com designates 213.92.90.60 as permitted sender) X-PHP-List-Original-Sender: php@beccati.com X-Host-Fingerprint: 213.92.90.60 ispeed-srv6.housing.tomato.it Received: from [213.92.90.60] ([213.92.90.60:60177] helo=mail.beccati.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6C/91-19113-FAA0FCA4 for ; Fri, 09 Oct 2009 06:04:33 -0400 Received: (qmail 16397 invoked from network); 9 Oct 2009 12:04:28 +0200 Received: from unknown (HELO ?192.168.1.201?) (matteo@beccati.com@88.149.176.119) by mail.beccati.com with SMTP; 9 Oct 2009 10:04:28 -0000 Message-ID: <4ACF0A9F.3000804@beccati.com> Date: Fri, 09 Oct 2009 12:04:15 +0200 User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Christopher Jones CC: Samuel ROZE , internals@lists.php.net References: <1255038690.10759.9.camel@samuel-laptop> <4ACE6613.808@oracle.com> <1255067917.4144.4.camel@samuel-laptop> <4ACED592.7070807@oracle.com> In-Reply-To: <4ACED592.7070807@oracle.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Patch: Use notices in PDO From: php@beccati.com (Matteo Beccati) 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: > > 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