Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98773 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76526 invoked from network); 11 Apr 2017 22:53:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Apr 2017 22:53:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@beccati.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=php@beccati.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain beccati.com designates 176.9.123.236 as permitted sender) X-PHP-List-Original-Sender: php@beccati.com X-Host-Fingerprint: 176.9.123.236 box.beccati.com Received: from [176.9.123.236] ([176.9.123.236:42510] helo=box.beccati.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AE/A6-18853-94E5DE85 for ; Tue, 11 Apr 2017 18:52:59 -0400 Received: from authenticated-user (box.beccati.com [176.9.123.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by box.beccati.com (Postfix) with ESMTPSA id 762892001DF; Wed, 12 Apr 2017 00:52:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=beccati.com; s=mail; t=1491951174; bh=Qpto+GPXSqUZ6FtgmSIE67nlunThobuNM6HQPIb4yR8=; h=Subject:To:References:From:Cc:Date:In-Reply-To:From; b=hDa0ugvu6F+CXLAII/TyWwMhOE3/uS9MX9gqVojSQfI9MzqwOSHovr4LA0mOELpXd c1ymW1BY0vZjW61DHhkqDtVBBWju8SGB0OmTLCqI1o171LzxIudxR74WWJxiW+ULNZ 9VqcEELK2UV0dhy5qPWGBNjqVwx91Qw16Ivj6af5mY7pWqJ3ZrRQyTAOfb0wUOKXTL hLggRli/x1HOY1Hn4dLkJisPstbINW/st2g4J6ctsgj8fj8es7BJpka7oB89kZqjzo 101aPUalBr0uP6WaDc+nwvBpvIcBkll+BmYosw4Cgf6PNuo1S2GqNj0TtGzUtUvVhX rtwzUsOU7axnQ== To: internals@lists.php.net References: <5e3e3e9b-f5b9-a19e-c4cb-6af0f5985d94@beccati.com> Cc: Andrea Faulds Message-ID: <8923084a-a357-91e9-44b5-52a4af0a5df1@beccati.com> Date: Wed, 12 Apr 2017 00:52:50 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] PDO Float Type From: php@beccati.com (Matteo Beccati) Hi Andrea, On 11/04/2017 19:25, Andrea Faulds wrote: > Matteo Beccati wrote: >> a PDO::PARAM_NUMERIC const that could in fact just be an alias for >> PDO::PARAM_STR for most of the drivers > > This is a technical solution to a documentation problem. Yes, and I'd tend to agree. But technically PDO::PARAM_NUMERIC could also allow to pass parameters in an appropriate format: I believe it wouldn't be much of an improvement for pdo_pgsql, but to be certain some level of investigation would be required. > I think it runs the risk of confusing people who do know what they're > doing, and assume NUMERIC is like FLOAT. Hey, that was precisely my point! ;) I.e. to assume that numeric and float are similar enough that PDO::PARAM_FLOAT would be a good fit for a numeric field. I know you meant it the other way around, but to me it is more confusing to use PARAM_STR for numerics when only PARAM_FLOAT is available as alternative vs using PARAM_FLOAT on a numeric when both are available. > I'd suggest adding a warning to the manual instead. I think that's a requirement in any case. Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/