Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98733 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16520 invoked from network); 5 Apr 2017 15:30:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Apr 2017 15:30:21 -0000 Authentication-Results: pb1.pair.com smtp.mail=adam.baratz@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=adam.baratz@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.182 as permitted sender) X-PHP-List-Original-Sender: adam.baratz@gmail.com X-Host-Fingerprint: 209.85.220.182 mail-qk0-f182.google.com Received: from [209.85.220.182] ([209.85.220.182:34948] helo=mail-qk0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 69/41-08240-98D05E85 for ; Wed, 05 Apr 2017 11:30:19 -0400 Received: by mail-qk0-f182.google.com with SMTP id g195so14073381qke.2 for ; Wed, 05 Apr 2017 08:30:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=rxtAytBTW/iTpGhtI5XhejxoifYNOKMo6zMvcYos5/s=; b=PBgaSrLemExRRuZ+TFB9chB14rrOYDlMUW42S2mxJFKE6yzoDdgG6hNAbHYUe//r/n 3nhTQu5YPP9RoHZykqIUBq5A+oMjc11afffurWVKxwu5L0WJ2bycjjX0aaTWS4CYhR0g GQPgdWq623xqcG8dVlpJCzJVmceeVWgYLisranq04srXe/AYYJKJmW9VO3zbMTY3FCDs viT1/Ya5IYF9r85ASizHoVTqN8/gfwcxndc2jgyycwfUqrDx+0GdTDG+csExj+q3VHEv H/YuAi3MQ0XpSB/uiNbOeBpgSSojyaUHG+aagLBRoMFFLjv1W3eyJdA7bosa/buBBrJ7 0jqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=rxtAytBTW/iTpGhtI5XhejxoifYNOKMo6zMvcYos5/s=; b=FKM4ou2wZv4xvONJQZbss25TvvZHAGlSQYOB5Kc090z2hQzzTlmVcYNFI4nFPatfqT hLEtKybfTTqBmKZydUA4HxUi9c1f3tUF5s/r9bFlAnzteIh2ArrOj3xBKB9qtWQ3t2aD 9vkyGP5zxuyRbIQQRvJ8S6W7eB6835ab6I5Q0cuPO1/dZdEo7YXuVfbbsFqV+CeGksoy YaFx18jHexKYQsuqCVBCtY57ygeUuH84oThfjFt8YKo85L9HlPrd7um/NOW3E68MSW7D vyamSUtUIRt3cbhrzrVkfD4reaE6dNsgfRIEOU3bepxHlPLYJ0bjhB+RK5mC+skpH7Yw 0wfg== X-Gm-Message-State: AFeK/H3TTE4f4L8xQpq8RlN4Y3hJdaCJOK4RofQrCyXTDfwCscMKkSJFyQITa9vDBBF/KFchH0LDHyl2XoexiA== X-Received: by 10.55.147.129 with SMTP id v123mr27758434qkd.230.1491406214612; Wed, 05 Apr 2017 08:30:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.145.164 with HTTP; Wed, 5 Apr 2017 08:30:14 -0700 (PDT) Date: Wed, 5 Apr 2017 11:30:14 -0400 Message-ID: To: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=94eb2c08bb62a34f3a054c6d1186 Subject: [RFC] PDO Float Type From: adam.baratz@gmail.com (Adam Baratz) --94eb2c08bb62a34f3a054c6d1186 Content-Type: text/plain; charset=UTF-8 Hi, The PDO extension does not have a type to represent floating point values. The current recommended practice is to use PDO::PARAM_STR. I had poked at this topic in an earlier thread: https://externals.io/thread/551 There was some hesitation about how complicated this would be to implement. After looking through each of the supported drivers, it seems like it would actually be a fairly light lift. In some cases, switching PDO::PARAM_STR for a new float type constant will save a type cast and have the same results. I wrote up a proposal here: https://wiki.php.net/rfc/pdo_float_type I tried to be as thorough as possible in understanding the impact on each supported driver. I'd appreciate any feedback on this concept as well as its impact on drivers. Thanks, Adam --94eb2c08bb62a34f3a054c6d1186--