pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Arthur Zakirov <zaartur@gmail.com>
Cc: Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Allow to_date() and to_timestamp() to accept localized names
Date: Thu, 23 Jan 2020 13:49:55 -0300
Message-ID: <20200123164955.GA23074@alvherre.pgsql> (raw)
In-Reply-To: <11266.1579796123@sss.pgh.pa.us>

On 2020-Jan-23, Tom Lane wrote:

> That particular case could be improved by stopping at a dash ... but
> since this code is also used to match strings like "A.M.", we can't
> just exclude punctuation in general.  Breaking at whitespace seems
> like a reasonable compromise.

Yeah, and there are cases where dashes are used in names -- browsing
through glibc for example I quickly found Akan, for which the month names are:

mon  "Sanda-<U0186>p<U025B>p<U0254>n";/
     "Kwakwar-<U0186>gyefuo";/
     "Eb<U0254>w-<U0186>benem";/

and so on.  Even whitespace is problematic for some languages, such as Afan,

mon      "Qunxa Garablu";/
         "Naharsi Kudo";/
         "Ciggilta Kudo";/
(etc) but I think whitespace-splitting is going to be more comprehensible
in the vast majority of cases, even if not perfect.

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





view thread (66+ messages)  latest in thread

Message-ID: <20200123164955.GA23074@alvherre.pgsql>
Permalink:  ../20200123164955.GA23074@alvherre.pgsql/
Also on:    postgresql.org/message-id/20200123164955.GA23074@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us, zaartur@gmail.com, juanjo.santamaria@gmail.com, tomas.vondra@2ndquadrant.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Allow to_date() and to_timestamp() to accept localized names
  In-Reply-To: <20200123164955.GA23074@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox