On Fri, Feb 10, 2017 at 11:26 AM, Clemens Ladisch <clem...@ladisch.de>
wrote:

> Dominique Devienne wrote:
> > But there's got to be a better way, no?
>
> A database stores data.  Formatting the data for the user is not the
> job of the database but of the actual application.


Honestly Clemens? There wouldn't be a built-in printf() and substr() etc...
if that was the case. At least you're consistent with your answer to the
post I was referring to. Hopefully someone less rigid in what a DB should
be will chime in too, with some actual SQL.


> > Couldn't SQLite's built-in printf gain a thousand-separator formatting
> > argument, which doesn't need to be locale aware
>
> Thousand separators _are_ locale specific.
>

They are if you want them to be. I can arbitrarily say I want a given one.
And so is the decimal point BTW, which SQLite happily hard codes to the C
locale.
e.g. The US 1,000.5 is 1.000,5 in FR, basically the "reverse".

So I'd be perfectly happy with a hard-coded thousand separator. Especially
since
the hard-coded separator can easily be replace()d by a different one to to
be locale OK via
some easy and short text substitution using out-of-the-box SQLite.

Dealing with locales would go against the grain of SQLite, I can accept
that, but the thousand separator
is just too common (be it , or . or _ or  space or else) to be summarily
dismissed like so IMHO. --DD
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to