← Back to team overview

maria-discuss team mailing list archive

Re: Locale settings and fractal number

 

Hi, Sergey!

I use string column, because i need fixed-point number (time column):
14_digit_to_second.6_digit_to_microsecond

123456.654321 as example.

Big number, because i have not only "time" column and also "sum" column too.
I didn't find any type what good for this, and i use string.
Typically this columns use only by hand or in scripts, and don't used
in any another queries.
When i prepare output, i should print number and i don't know what the
delimiter should i use.
What the internal function should i call for get correct delimeter?

Best regards, Oleg.

2010/8/16 Sergei Golubchik <serg@xxxxxxxxxxxx>:
> Hi, Oleg!
>
> On Aug 15, Oleg Tsarev wrote:
>>
>> Hello all,
>>
>> I have feature
>> http://www.percona.com/docs/wiki/patches:response_time_distribution
>> Now i want respect locale settings, and use in "time" column
>> locale-depended delimiter instead of current hardcoded ".".
>> I investigate source code about that, and also bugzilla,
>> documentation, but not found answer to my question - where this
>> delimieter setup.
>>
>> What the "official" mysql policy? Use only "."? Or use native-locale?
>> Or use some internal mysql function?
>> Please, resolve my confuse.
>> I want understand how this questions solved in mysql.
>
> As far as I understand, MySQL typically does not uses system locale
> information for formatting numbers or dates.
>
> Anyway, you shouldn't care about locale - as you have two columns
> of numbers, you need to have two numeric columns, say, DOUBLE and
> BIGINT.
>
> Regards,
> Sergei
>



Follow ups

References