Re: [Maria-discuss] 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@askmonty.org>:
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
Oleg Tsarev <zabivator@gmail.com> writes:
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.
Did you consider using DECIMAL(14,6) ? If so, why can't you use it? It would seem greatly preferable to use a numeric type for a column with numbers ... - Kristian.
Hi, Oleg! On Aug 16, Oleg Tsarev wrote:
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.
It's DECIMAL(20,6), isn't it ? :) Regards, Sergei
participants (3)
-
Kristian Nielsen
-
Oleg Tsarev
-
Sergei Golubchik