On 2020-01-24 18:25, Juan José Santamaría Flecha wrote:
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)
Well, this is interesting, because on macOS and Debian stable I get
postgres=# select to_char(now(),'TMmonth');
to_char
------------
ιανουαρίου
(1 row)
which is the genitive of ιανουάριος. You use the genitive form for a
date (24th of January) but the nominative otherwise. But the reverse
mapping can only take one of these forms. So here
select to_date('Ιανουαριος', 'TMMonth');
fails, which is bad.
In the glibc locale data sources they have both forms listed, but
apparently the API were are using only accepts one of them.
(I don't know any Greek, I'm just extrapolating from Wikipedia and
locale data.)
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services