Re: [HACKERS] adding an immutable variant of to_date

Поиск
Список
Период
Сортировка
От Andreas Karlsson
Тема Re: [HACKERS] adding an immutable variant of to_date
Дата
Msg-id 834dcca9-f144-6354-2ee9-3ed30da66451@proxel.se
обсуждение исходный текст
Ответ на Re: [HACKERS] adding an immutable variant of to_date  ("Sven R. Kunze" <srkunze@mail.de>)
Ответы Re: [HACKERS] adding an immutable variant of to_date  ("Sven R. Kunze" <srkunze@mail.de>)
Список pgsql-hackers
On 03/07/2017 09:56 PM, Sven R. Kunze wrote:
> On 07.03.2017 03:21, Andreas Karlsson wrote:
>> 1) I do not think we currently allow setting the locale like this
>> anywhere, so this will introduce a new concept to PostgreSQL. And you
>> will probably need to add support for caching per locale.
>
> Good to know. Could you explain what you mean by "caching per locale"?

The current code for to_char will on the first call to to_char build 
arrays with the localized names of the week days and the months. I 
suspect that you may need to build something similar but a set of arrays 
per locale.

See the DCH_to_char function and its call to cache_locale_time.

Andreas



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] new gcc 7.0.1 warnings
Следующее
От: Mark Dilger
Дата:
Сообщение: Re: [HACKERS] Hash support for grouping sets