Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98759 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61897 invoked from network); 10 Apr 2017 15:42:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Apr 2017 15:42:32 -0000 Authentication-Results: pb1.pair.com header.from=adam.baratz@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=adam.baratz@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.181 as permitted sender) X-PHP-List-Original-Sender: adam.baratz@gmail.com X-Host-Fingerprint: 209.85.220.181 mail-qk0-f181.google.com Received: from [209.85.220.181] ([209.85.220.181:34408] helo=mail-qk0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 96/84-22499-7E7ABE85 for ; Mon, 10 Apr 2017 11:42:32 -0400 Received: by mail-qk0-f181.google.com with SMTP id p68so91299974qke.1 for ; Mon, 10 Apr 2017 08:42:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=QVo/lHGQF8D924ct4Pb3ii5uIhzVvScY6/ZQOoz8p8M=; b=TT/ONq0TthlFPWLwekVYphJlqiL6fYEtDh/uB0PZs6Dy4zHjL8fvOsMYftcsju4Teg gZzhxVf05rjwYTzKClMNh1U4sUfCrifgPw8tfVhV5qgzFDiTLqpUWb2f7dannDwc99Im MHMVTy6F0q2bHoQhkIX8ccAsT6kEe20AX7Nm7Avmg7kYlgCgwpMvu+TmzZQ6whs6M1Sp 8uV8wccu7ipfasWtMgCWQN8UUyNBRwO5RDEYplGHLJE/h69D4cemCsgyECe8y9qgjAZn c6u45IuH3uuwvcRQVVZwVPr5FACAkylqW5b3uMdcBGhk+xQh5kFILTo1YWZ5HtWWDUJ9 dKSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=QVo/lHGQF8D924ct4Pb3ii5uIhzVvScY6/ZQOoz8p8M=; b=TbztZ33yObqISmC4DPANeTyzM2BQqEuDiWp019f/B0VSzsdvEOJ7maDWHY0JKzMnXi c1TCBHffsr5tCnTDVBjg0E8GrDr/W/r6woY7ISgFUYJdWmoEtkoiFYZPkZ58ZO4UvHSh cGgMB1vsSNDftsuvaj3k93bO1lvUrjJ3cm/LxROVd8vRxdwoAZMo4oq33gZMeVQGYJ7N c9HOxEIaFdaxQQKv1kOrApL+1V2fD+IvZRmYMXmL4M1tfDuHfVfAujDNJw2xCsLttXhN c4/dLX2f5E/0mcHKzuak7P04h5zyDOXmwarWV1Z60Fsjk1L2gLckb/cuVJQ7XX1zkDL+ L6fA== X-Gm-Message-State: AFeK/H0+bmmF6ygtT6BAVPYRX3p98k3qIKa23qBCyKAmwGiK1Yqd6ZaQwcSBEGMMwOkT6bYKuexMcmEfFbZzxQ== X-Received: by 10.55.108.131 with SMTP id h125mr48657473qkc.199.1491838948362; Mon, 10 Apr 2017 08:42:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.135.212 with HTTP; Mon, 10 Apr 2017 08:42:27 -0700 (PDT) In-Reply-To: <5e3e3e9b-f5b9-a19e-c4cb-6af0f5985d94@beccati.com> References: <5e3e3e9b-f5b9-a19e-c4cb-6af0f5985d94@beccati.com> Date: Mon, 10 Apr 2017 11:42:27 -0400 Message-ID: To: Matteo Beccati Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a1148751894671a054cd1d212 Subject: Re: [PHP-DEV] [RFC] PDO Float Type From: adam.baratz@gmail.com (Adam Baratz) --001a1148751894671a054cd1d212 Content-Type: text/plain; charset=UTF-8 > > That said, I think the proposed type is likely to be misused for > NUMERIC/DECIMAL fields, which would be pretty bad. Maybe we should also > add PDO::PARAM_NUMERIC in order to avoid mistakes? > Just so I understand your concern, it's that fixed-precision types are meaningfully different and there could be clashes with other types of floats? I agree with you on that, but I'm not sure what the right solution is. There isn't a C type for fixed-precision floats, or even a PHP type. How would the flow of data work so nothing's lost/altered along the way? My general thought would be that if fixed-precision matters, then you should be storing values as strings, that there'd be a whole other set of pitfalls opened up with a PDO::PARAM_NUMERIC type. I realize this is all downsides, which isn't the most constructive way to respond. Happy to talk through details if you have specific suggestions for how this type would work in practice. Thanks, Adam --001a1148751894671a054cd1d212--