remove auto-switch between char and string based on the string length
1. it is against sql way, auto-detection should use metadata, not data, consider: create table t1 (qwe varchar(10)) as values ('qwe'),('qw'),('q'),('werty'); select sformat('{:*>5s}', qwe) from t1; this will auto-break on the third row. 2. using max_char_length() instead of length() fixes that, but there's a second big issue, fmt < 8.0 doesn't natively support unicode, so {:c} would only work for one-byte strings, for 'a', not for 'я' because of all that let's always format strings as strings. {:c} will only now work for numbers and still only in the ascii range.
Showing
Please register or sign in to comment