Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45687 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51492 invoked from network); 7 Oct 2009 11:30:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Oct 2009 11:30:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.225 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.220.225 mail-fx0-f225.google.com Received: from [209.85.220.225] ([209.85.220.225:43487] helo=mail-fx0-f225.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 91/28-13083-6EB7CCA4 for ; Wed, 07 Oct 2009 07:30:47 -0400 Received: by fxm25 with SMTP id 25so4671853fxm.24 for ; Wed, 07 Oct 2009 04:30:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=tnZhyUgzw1yQyupZjLWDVR8ACF4VNEz/tIRK75mzbsc=; b=CwUrSHoySOv1Vd7RnpWu7OhhJKiGMzgM9Rx/ftwhLs4ZNVD9PCRz/JDwXaZhoVUsKE OIApPP2pxqnMpHpgkQgnw2rHkchjAox+L+PJcxXF6nQjI+nJPQN0S5ZgZPy1Sr8LqJFJ 8T4shkkVl1IC5xHbf9NQxoJ/SEBDReLr7Sitk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=QBFumUyhl404LfyGOruGux+MBE2H6QWSSsFZKjtLyT/HxhguNgzTMyMmveQJ5FDlZO /nuBvl2m/b7EeT1+5K1x5TBTcycZHXITjdXmP6QxXx1d/7GAtpApuWyaYix7s5fGy98c ZRDoy0j0KeCGItBjLzt8tLbcgbW6oZt5SS/no= MIME-Version: 1.0 Received: by 10.204.9.1 with SMTP id j1mr6171862bkj.185.1254915043520; Wed, 07 Oct 2009 04:30:43 -0700 (PDT) In-Reply-To: <1254914836.7418.52.camel@samuel-laptop> References: <1254806557.19561.3.camel@samuel-laptop> <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> <1254914836.7418.52.camel@samuel-laptop> Date: Wed, 7 Oct 2009 13:30:43 +0200 Message-ID: To: Samuel ROZE Cc: Matteo Beccati , Christopher Jones , Lukas Kahwe Smith , PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice From: pierre.php@gmail.com (Pierre Joye) On Wed, Oct 7, 2009 at 1:27 PM, Samuel ROZE wrot= e: > Le mercredi 07 octobre 2009 =E0 09:06 +0200, Matteo Beccati a =E9crit : >> 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 resu= lts >> >> 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. That defeats the whole purpose of PDO. The meaning of each message will indeed different, but if one needs to call different APIs for each driver, I doubt anyone will ever use them. Cheers, --=20 Pierre http://blog.thepimp.net | http://www.libgd.org