> > 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