Re: Allow to_date() and to_timestamp() to accept localized names

From: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Arthur Zakirov <zaartur(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Allow to_date() and to_timestamp() to accept localized names
Date: 2020-01-28 22:07:13
Message-ID: CAC+AXB0erbzgt5YMEHb12voiTZArW6HEqiRyqG0++CqasZzFUg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 28, 2020 at 5:21 PM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
wrote:

> On 2020-Jan-28, Peter Eisentraut wrote:
>
> > On 2020-01-28 04:05, Mark Dilger wrote:
> > > German uses both Sonnabend and Samstag for Saturday, so don’t you have
> to compare to a list of values anyway?
> >
> > Yeah, good point. If it doesn't accept both "Sonnabend" and "Samstag",
> then
> > it's not really usable.
>
> The string "Sonnabend" never appears in the glibc sources, so that will
> certainly not work. I vote not to care about that, but of course my
> language is not one that has alternate weekday/month names. I guess if
> we're intent on recognizing alternate names, we'll have to build our own
> list of them :-(
>
> I don't have the ICU sources here to check the status there.
>
>
"Sonnabend" is neither available in ICU.

What is available are both genitive and nominative forms for months, as
reported up thread by Peter. See formats "M" and "L" in:

http://userguide.icu-project.org/formatparse/datetime

Regards,

Juan José Santamaría Flecha

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2020-01-28 22:28:32 Re: making the backend's json parser work in frontend code
Previous Message Stephen Frost 2020-01-28 21:58:32 Re: Removing pg_pltemplate and creating "trustable" extensions