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+AXB3ymGCsGaAwYjEZUZG3gK5UO6koSUz=v4Sp_qX6UtOOFQ@mail.gmail.com
Whole thread Raw
In response to Re: Allow to_date() and to_timestamp() to accept localized names  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: Allow to_date() and to_timestamp() to accept localized names  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers


On Tue, Jan 28, 2020 at 9:35 PM Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
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.


We can avoid issues with non injective case conversion languages with a double conversion, so both strings in the comparison end up in the same state.

I propose an upper/lower conversion as in the attached patch.

Regards,

Juan José Santamaría Flecha
 
Attachment

pgsql-hackers by date:

Previous
From: ahsan hadi
Date:
Subject: Re: pg_restore crash when there is a failure before all child process is created
Next
From: Alvaro Herrera
Date:
Subject: Re: standby apply lag on inactive servers