Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45686 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49916 invoked from network); 7 Oct 2009 11:27:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Oct 2009 11:27:14 -0000 Authentication-Results: pb1.pair.com header.from=samuel.roze@aliceadsl.fr; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=samuel.roze@aliceadsl.fr; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain aliceadsl.fr from 212.27.42.3 cause and error) X-PHP-List-Original-Sender: samuel.roze@aliceadsl.fr X-Host-Fingerprint: 212.27.42.3 smtp3-g21.free.fr Linux 2.6 Received: from [212.27.42.3] ([212.27.42.3:45160] helo=smtp3-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1B/B7-13083-F0B7CCA4 for ; Wed, 07 Oct 2009 07:27:14 -0400 Received: from smtp3-g21.free.fr (localhost [127.0.0.1]) by smtp3-g21.free.fr (Postfix) with ESMTP id E5D8F818040; Wed, 7 Oct 2009 13:27:04 +0200 (CEST) Received: from [192.168.0.10] (lns-bzn-46-82-253-200-55.adsl.proxad.net [82.253.200.55]) by smtp3-g21.free.fr (Postfix) with ESMTP id 90D70818192; Wed, 7 Oct 2009 13:27:01 +0200 (CEST) To: Matteo Beccati Cc: Christopher Jones , Lukas Kahwe Smith , PHP Internals In-Reply-To: <4ACC3DDE.8020905@beccati.com> References: <1254806557.19561.3.camel@samuel-laptop> <1254807735.19561.5.camel@samuel-laptop> <4ACAF18B.5080803@beccati.com> <1254846564.876.1.camel@samuel-laptop> <4ACBC540.4090308@beccati.com> <1254894205.7418.32.camel@samuel-laptop> <4ACC2B8F.2040302@oracle.com> <4ACC2E8F.8040903@beccati.com> <4ACC2F62.4050601@oracle.com> <4ACC30A3.8030205@beccati.com> <4ACC32E1.6070909@oracle.com> <4ACC3DDE.8020905@beccati.com> Content-Type: text/plain; charset="UTF-8" Date: Wed, 07 Oct 2009 13:27:16 +0200 Message-ID: <1254914836.7418.52.camel@samuel-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice From: samuel.roze@aliceadsl.fr (Samuel ROZE) Le mercredi 07 octobre 2009 à 09:06 +0200, Matteo Beccati a écrit : > From what I could see, things get a bit more complicate on the code side: > > PgSQL: > 1. Set a notice processor callback > 2. Clear the notice buffer before a query > 3. Asynchronously buffer notices inside the callback > 4. Set a no-op processor callback > > MySQL: > 1. Call mysql_warning_count() after a succesful query > 2. if the result is non-zero, execute "SHOW WARNINGS" and fetch the results > > Oracle: > 1. Enable output buffering > 2. Fetch the buffer after a successful query > 3. Clear the buffer > 4. Disable output buffering > > Adding generic hooks/functions will also require a PDO API version bump. This is a bit complicated and very different ! Actually, each database works as it want and it may be better to use different functions for each driver.