Re: adding an immutable variant of to_date

From: Andreas Karlsson <andreas(at)proxel(dot)se>
To: "Sven R(dot) Kunze" <srkunze(at)mail(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: adding an immutable variant of to_date
Date: 2017-03-08 16:37:27
Message-ID: 834dcca9-f144-6354-2ee9-3ed30da66451@proxel.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2017-03-08 16:39:37 Re: Hash support for grouping sets
Previous Message Alvaro Herrera 2017-03-08 16:33:58 Re: new gcc 7.0.1 warnings