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

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, 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-25 09:31:42
Message-ID: aa5d8d96-0eb6-07b9-2caf-0910b313cb56@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-01-24 19:01, Peter Eisentraut wrote:
> 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.

For the record, the correct form of that would appear to be

select to_date('Ιανουάριος', 'TMMonth');

with the accent. I had tried different variations of that and they all
failed.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2020-01-25 10:31:11 Re: Parallel grouping sets
Previous Message Amit Kapila 2020-01-25 06:40:59 Re: [HACKERS] Block level parallel vacuum