Re: to_char with locale decimal separator
| От | Adrian Klaver |
|---|---|
| Тема | Re: to_char with locale decimal separator |
| Дата | |
| Msg-id | 51F68171.8000400@gmail.com обсуждение исходный текст |
| Ответ на | Re: to_char with locale decimal separator (Ingmar Brouns <swingi@gmail.com>) |
| Список | pgsql-general |
On 07/29/2013 07:27 AM, Ingmar Brouns wrote: > On Mon, Jul 29, 2013 at 3:45 PM, Adrian Klaver <adrian.klaver@gmail.com> wrote: >> On 07/29/2013 04:24 AM, Ingmar Brouns wrote: >>> >>> Hi, >> >> This work?: >> >> test=> select replace(1.500::text, '.', ','); >> replace >> --------- >> 1,500 >> (1 row) >> > > > that would work, but that requires keeping track of which decimal > separator to use yourself. If you change the locale, the code > has to change as well. As to_char already converts the decimal > separator in a locale aware manner, I wonder whether there is a > way to do this using the existing locale facilities. Sorry, I just got to your second post where you explained that. I can't think of a way at the moment. > > Ingmar > > -- Adrian Klaver adrian.klaver@gmail.com
В списке pgsql-general по дате отправления: