Re: Allow to_date() and to_timestamp() to accept localized names - Mailing list pgsql-hackers

From Juan José Santamaría Flecha
Subject Re: Allow to_date() and to_timestamp() to accept localized names
Date
Msg-id CAC+AXB1+dHo_DhCTySrqoVaq9WUta9uA+2Ens-bEqDw8X4UbTA@mail.gmail.com
Whole thread Raw
In response to Re: Allow to_date() and to_timestamp() to accept localized names  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Allow to_date() and to_timestamp() to accept localized names
List pgsql-hackers

On Fri, Jan 24, 2020 at 5:46 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> Looking through the patch quickly, if you want to get Unicode-fancy,
> doing a case-insensitive comparison by running lower-case on both
> strings is also wrong in corner cases.  All the Greek month names end in
> sigma, so I suspect that this patch might not work correctly in such cases.

Hm.  That's basically what citext does, and I don't recall hearing
complaints about that.  What other definition of "case insensitive"
would you suggest?


To illustrate the issue, it does not work as expected:

postgres=# select lower(to_char(now(),'TMMONTH'));
   lower
------------
 ιανουάριοσ
(1 row)

postgres=# select to_char(now(),'TMmonth');
  to_char
------------
 ιανουάριος
(1 row)

Regards,

Juan José Santamaría Flecha
 

pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: Re: making the backend's json parser work in frontend code
Next
From: Xiang Xiao
Date:
Subject: any work item suggestion for newbie?