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

From Alvaro Herrera
Subject Re: Allow to_date() and to_timestamp() to accept localized names
Date
Msg-id 20200124161814.GA8989@alvherre.pgsql
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 2020-Jan-24, Peter Eisentraut wrote:

> When you interact with glibc locale functions, you essentially have to
> assume that everything is in NFC.  When using ICU locale functions (which we
> don't here, but just for the sake of argument), then I would expect that ICU
> does appropriate normalization itself when I call
> icu_what_month_is_this(string) returns int.  So I think it is appropriate to
> not deal with normalization in this patch.

But that's a different POV.  The input to this function could come from
arbitrary user input from any application whatsoever.  So the only
reason we can get away with that is because the example regression case
Juan José added (which uses non-normals) does not conform to the
standard.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: David Steele
Date:
Subject: Re: libxml2 is dropping xml2-config
Next
From: Tom Lane
Date:
Subject: Re: Allow to_date() and to_timestamp() to accept localized names