On 06/03/2019 08:58, Nikita Popov wrote:
1. What is more important to me here than strictness is consistency. Either
both "   123" and "123   " are numeric, or neither are. Making "123    "
numeric is a change we can easily do, because it makes the numeric string
definition more permissive and is thus mostly backwards compatible. Doing
the reverse change is certainly not compatible and will be a much harder
sell.

I think it may be worth pointing out here the distinction at least with Firebird and I thought with other databases? A CHAR field is always returned padded with spaces to it's length, while a VARCHAR field is always trimmed to the last non space character. There are often reasons for using CHAR although many of those are probably historic, but trimming them without proper consideration is less than ideal. Returning historic material where numeric data is right justified in a CHAR field is equally valid.

Handling these has always required care and it would be preferable that both returned the same result without having to trim and perhaps creating problems when the padded version needs to be returned ...

--
Lester Caine - G8HFL
-----------------------------
Contact - https://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - https://lsces.co.uk
EnquirySolve - https://enquirysolve.com/
Model Engineers Digital Workshop - https://medw.co.uk
Rainbow Digital Media - https://rainbowdigitalmedia.co.uk

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to