Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45719 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13827 invoked from network); 10 Oct 2009 17:46:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Oct 2009 17:46:50 -0000 Authentication-Results: pb1.pair.com header.from=mls@pooteeweet.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mls@pooteeweet.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pooteeweet.org from 88.198.8.16 cause and error) X-PHP-List-Original-Sender: mls@pooteeweet.org X-Host-Fingerprint: 88.198.8.16 bigtime.backendmedia.com Linux 2.6 Received: from [88.198.8.16] ([88.198.8.16:33660] helo=bigtime.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 50/90-10808-988C0DA4 for ; Sat, 10 Oct 2009 13:46:49 -0400 Received: from localhost (unknown [127.0.0.1]) by bigtime.backendmedia.com (Postfix) with ESMTP id 09A804144057; Sat, 10 Oct 2009 17:47:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at backendmedia.com Received: from bigtime.backendmedia.com ([127.0.0.1]) by localhost (bigtime.backendmedia.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id r+bi7zIFh6Yf; Sat, 10 Oct 2009 19:47:36 +0200 (CEST) Received: from [192.168.0.151] (217-162-131-234.dclient.hispeed.ch [217.162.131.234]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mls@pooteeweet.org) by bigtime.backendmedia.com (Postfix) with ESMTP id C8BA74144009; Sat, 10 Oct 2009 19:47:35 +0200 (CEST) Cc: Lester Caine , PHP internals Message-ID: <251D4EC4-3322-4478-953B-DD93F7B235E2@pooteeweet.org> To: Samuel ROZE In-Reply-To: <1255195945.3605.49.camel@samuel-laptop> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v936) Date: Sat, 10 Oct 2009 19:46:44 +0200 References: <1255038690.10759.9.camel@samuel-laptop> <1255120269.3605.14.camel@samuel-laptop> <1255122734.3605.21.camel@samuel-laptop> <4AD09F8B.1010205@lsces.co.uk> <1255195945.3605.49.camel@samuel-laptop> X-Mailer: Apple Mail (2.936) Subject: Re: [PHP-DEV] Re: Patch: Use notices in PDO From: mls@pooteeweet.org (Lukas Kahwe Smith) On 10.10.2009, at 19:32, Samuel ROZE wrote: > Le samedi 10 octobre 2009 =E0 15:51 +0100, Lester Caine a =E9crit : >> 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 =20 >>>> with >>>> it) ? >>>> >>> http://dev.mysql.com/doc/refman/5.1/en/show-warnings.html >> >> Something to consider here is that, like MySQL in this case, many of >> these types of activity ARE now available as SQL queries and so do =20= >> not >> have to be handled specially by the driver. It is only those areas =20= >> where >> the results are only available by non-SQL calls that should be =20 >> added as >> special cases. PDO has no interest in mapping SQL between different >> engines! Carrying out additional SQL calls in the background to =20 >> emulate >> functions required by other drivers just seems wrong? The Firebird >> engine has been working to move all of the 'service' facilities which >> would normally be handled directly by the driver into simple SQL =20 >> queries >> to get around this problem from the other end. > > It is the case for MySQL and Oracle...so for your mind, we don't =20 > 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 =20 > MySQL, > I can use "SHOW WARNING" but, if my apps is used on PostgreSQL, my =20 > query > will fail ! If I can use PDO::noticeInfo in MySQL and in PostgreSQL, =20= > it > will be great. :-) > > And we have to know that these additional requests will be executed =20= > only > if PDO::ATTR_LOG_NOTICES is turned to 1 ! So user want them... ;-) i do agree that we need to choose wisely, where we abstract. =20 furthermore PDO at least currently doesnt really aim to offer a =20 complete solution for portability in the sense that it leaves out a =20 lot of features that would be required to make apps portable on the =20 SQL level. however i personally think this case seems legit enough to =20= get handled. more importantly we have someone working out the =20 necessary code and there is little chance if it having adverse effects =20= on any existing stuff .. regards, Lukas Kahwe Smith mls@pooteeweet.org