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>, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-28 20:35:25
Message-ID: dae3654e-aee2-b691-ec82-f8dc43ebfd14@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-01-28 16:47, Juan José Santamaría Flecha wrote:
> This patch targets to do something symmetrical to to_char(), which will
> just return a single value.

I didn't fully realize while reading this thread that to_char() already
supports localized output and this patch indeed just wants to do the
opposite.

So I'm withdrawing my concerns with respect to this patch. As long as
it can do a roundtrip conversion with to_char(), it's fine.

It's pretty clear that this interface cannot be useful for producing or
parsing fully general localized dates. But since it exists now (and
it's quasi SQL standard now), we might as well fill in this gap.

--
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 Tom Lane 2020-01-28 20:42:08 Re: making the backend's json parser work in frontend code
Previous Message Markus Winand 2020-01-28 20:32:20 VALUES ROW(...)