| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Alexander LAW" <exclusion(at)gmail(dot)com> |
| Cc: | pgsql-bugs(at)postgresql(dot)org |
| Subject: | Re: BUG #6277: Money datatype conversion wrong with Russian locale |
| Date: | 2011-10-29 16:17:15 |
| Message-ID: | 16309.1319905035@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
"Alexander LAW" <exclusion(at)gmail(dot)com> writes:
> It's caused by wrong mon_thousands_sep processing in
> backend/utils/adt/cash.c, cash_out function.
> The code assumes that the thousands separator fits in one character. But in
> Russian locale we have non-breakable space as the thousands separator (0xC2
> 0xA0 in UTF-8).
Hmm ... looks like cash_out really needs a significant rewrite to make
that work nicely. It's combining counting of digit positions with
counting of output bytes, which was messy enough already, but gets
worse fast if the thousands separator isn't a single byte.
Does anyone know of locales where the decimal point isn't a single byte?
I'm wondering if that assumption needs to be got rid of too.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | horiguchi.kyotaro | 2011-10-29 17:16:03 | Re: [v9.2] make_greater_string() does not return a string in some cases |
| Previous Message | Alexander LAW | 2011-10-29 12:10:17 | BUG #6277: Money datatype conversion wrong with Russian locale |