Re: [GENERAL] trouble with to_char('L')

Поиск
Список
Период
Сортировка
От Hiroshi Inoue
Тема Re: [GENERAL] trouble with to_char('L')
Дата
Msg-id 4BCDBA07.3040109@tpf.co.jp
обсуждение исходный текст
Ответ на Re: [GENERAL] trouble with to_char('L')  (Takahiro Itagaki <itagaki.takahiro@oss.ntt.co.jp>)
Ответы Re: [GENERAL] trouble with to_char('L')
Список pgsql-hackers
Takahiro Itagaki wrote:
> Magnus Hagander <magnus@hagander.net> wrote:
> 
>>> 1. setlocale(LC_CTYPE, lc_monetary)
>>> 2. setlocale(LC_MONETARY, lc_monetary)
>>> 3. lc = localeconv()
>>> 4. pg_do_encoding_conversion(lc->xxx,
>>>      FROM pg_get_encoding_from_locale(lc_monetary),
>>>      TO GetDatabaseEncoding())
>>> 5. Revert LC_CTYPE and LC_MONETARY.
> 
> A patch attached for the above straightforwardly. Does this work?

I have 2 questions about this patch.

1. How does it work when LC_MONETARY and LC_NUMERIC are different?
2. Calling db_encoding_strdup() for lconv->grouping is appropriate?

regards,
Hiroshi Inoue

> Note that #ifdef WIN32 parts in the patch are harmless on other platforms
> even if they are enabled.
> 
>> Let's work off what we have now to start with at least. Bruce, can you
>> comment on that thing about the extra parameter? And UTF8?
> 
> Regards,
> ---
> Takahiro Itagaki
> NTT Open Source Software Center


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: [DOCS] Streaming replication document improvements
Следующее
От: Tom Lane
Дата:
Сообщение: Re: SpinLockAcquire question