Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50098 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61167 invoked from network); 4 Nov 2010 03:25:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Nov 2010 03:25:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=kingwez@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kingwez@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: kingwez@gmail.com X-Host-Fingerprint: 209.85.216.42 mail-qw0-f42.google.com Received: from [209.85.216.42] ([209.85.216.42:57990] helo=mail-qw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 19/A1-46367-1B722DC4 for ; Wed, 03 Nov 2010 22:25:38 -0500 Received: by qwj8 with SMTP id 8so802387qwj.29 for ; Wed, 03 Nov 2010 20:25:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:in-reply-to:subject :references:message-id:content-type:content-transfer-encoding :mime-version:date:cc:x-mailer; bh=f7zdFwlY9ZAbf0suoKkKmhkJMN6P9n7VQRz7eU07JHg=; b=U+NFVG1oIlcvhdyDOsGm4DxS2V++3FsACwpVCL20uICc2mMDVtORy3dQCVFhoY20Ec pU0ePlHzUsuGRfSKVKTz7UZxzdyPiV76ontX9DLijCkmBdcIGSF75M5hiKGBD3BK6QlQ 3hQli1DvTMNaBQHOd4uPybcWnyBcFhwQ8Iww4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:in-reply-to:subject:references:message-id:content-type :content-transfer-encoding:mime-version:date:cc:x-mailer; b=uA5+GUabV3gGGL4qIlssWRiXd+C3NogoFbhd0ClXAk4Vh4ZEM590ZeveoXSvxOR3/6 SteskeBWOscSGgVqInHPX0gOw9Dk8KAQnX9xg0fITkAwV9CGwI3ryuHBhjy0L3VHKzGi FzcFaKyT/oRpCqqV4As7GFT54lhSK+7G0Ocw0= Received: by 10.229.14.143 with SMTP id g15mr98510qca.208.1288841134708; Wed, 03 Nov 2010 20:25:34 -0700 (PDT) Received: from [192.168.50.15] (c-68-54-255-27.hsd1.md.comcast.net [68.54.255.27]) by mx.google.com with ESMTPS id t35sm7770828qco.18.2010.11.03.20.25.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 03 Nov 2010 20:25:33 -0700 (PDT) To: Stanley Sufficool In-Reply-To: References: Message-ID: <96B72336-79FE-4243-99F7-86A5815208F6@gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Wed, 3 Nov 2010 23:25:30 -0400 Cc: PHP Developers Mailing List , pdo X-Mailer: Apple Mail (2.936) Subject: Re: [PDO] PDO_DBLIB Native PHP Type binding From: kingwez@gmail.com (Wez Furlong) On Nov 3, 2010, at 9:52 PM, Stanley Sufficool wrote: > Before I gut PDO_DBLIB one more time to implement native parameter > binding for stored procedures, what are the thoughts on returning the > column values from the database as the native PHP type when possible? > Currently everything is returned as a string, incurring overhead for > conversion The design philosophy was to pull the data out as strings as this gives the highest data fidelity (especially with the various numeric types) and is a pragmatic choice for the majority of web apps which are largely in text land anyway, and typically are not bottlenecked on the performance of converting database column values. Some drivers, particularly postgres, are unable to request string data and therefore return their results in the type that most closely matches the C datatype forced on it by the API. This has been a source of complaints from some about the consistency of the returned data for apps that are designed to run against multiple database backends. I would advise against changing the behavior of the driver if possible, and against changing it away from the established stringiness of PDO without good reason. > and creating problems hinting at the desired binding type > for BLOBS and numeric data types. Can you elaborate on this? You can explicitly set the desired binding via bindColumn. --Wez.