Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83438 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8680 invoked from network); 21 Feb 2015 22:12:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Feb 2015 22:12:52 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.54 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.192.54 mail-qg0-f54.google.com Received: from [209.85.192.54] ([209.85.192.54:50279] helo=mail-qg0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 15/C7-08895-1E209E45 for ; Sat, 21 Feb 2015 17:12:51 -0500 Received: by mail-qg0-f54.google.com with SMTP id z60so19380873qgd.13 for ; Sat, 21 Feb 2015 14:12:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=RpE47PCSv8E29tQXtSMHAIEINZaLPIHwED0WhxJUXII=; b=QKTWtQFFpw3Hh9H+wqiwIowPQJODApaMH3EiyYfhutZSnJpIq75ZbokeHmTbziCddt D3edi3s0E44uBLkCfSSpMJsLTsp8bfx90wUfi0O8p4pk9PJ35xvT7V6DS7edC37iPui5 aKVuRk0MFCRgUibw91XOJSgsmuFiK3ow/Wu0RuZH0MTDYRMjyHtYcWDd0uPsr88H9Uox FFg4ims65iyy+hw9hatq5tTcjo7YM8TpVHAUbZOG76w78Dkk2J1WxA5krU7A3+Qa/YjY nXrvMxtMtLTqW9lfSmtZEUBfEOLV3oNhij74WlIqyKyQO9/4yiCMfb6tDBgNzAq89O3E 0WlA== X-Received: by 10.140.152.2 with SMTP id 2mr9654545qhy.16.1424556766586; Sat, 21 Feb 2015 14:12:46 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.198.8 with HTTP; Sat, 21 Feb 2015 14:12:06 -0800 (PST) In-Reply-To: References: Date: Sun, 22 Feb 2015 07:12:06 +0900 X-Google-Sender-Auth: qKvqlOsQJ8VneCD4IoeCeXj2DYk Message-ID: To: Adam Baratz Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a1135a3dc08f074050fa078e0 Subject: Re: [PHP-DEV] PDO_DBLIB type handling From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a1135a3dc08f074050fa078e0 Content-Type: text/plain; charset=UTF-8 Hi Adam, On Sat, Feb 21, 2015 at 2:22 AM, Adam Baratz wrote: > This driver returns all column data as a string, regardless of how it's > represented in the DB. I created a patch for my own use that syncs up the > type handling with the behavior of the MSSQL extension. This seems like it > would be of general use. Does anyone have any feedback before I put > together an RFC? My main question would be whether people would rather have > this be the default/only behavior, or whether it should be opted into > via PDO::ATTR_STRINGIFY_FETCHES. > Databases return "string" data to return correct data in DB. Most obvious is "NUMERIC" data type. NUMERIC has any precision. We may have 128 bit INT in near future also. So it should return string by default, PHP may convert types into PHP native types optionally. Not the other way around. IMHO. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a1135a3dc08f074050fa078e0--