From: Mark Dilger <mark.dilger@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Arthur Zakirov <zaartur@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: Mon, 27 Jan 2020 19:05:48 -0800
Message-ID: <2E3D8D71-3B55-4735-A047-1FECE1506CD1@enterprisedb.com> (raw)
In-Reply-To: <7212.1580177517@sss.pgh.pa.us>
References: <20200124161814.GA8989@alvherre.pgsql>
<32487.1579882979@sss.pgh.pa.us>
<2f83150e-a2c0-6318-3125-d9b86e421aa2@2ndquadrant.com>
<964.1579884408@sss.pgh.pa.us>
<CAC+AXB1+dHo_DhCTySrqoVaq9WUta9uA+2Ens-bEqDw8X4UbTA@mail.gmail.com>
<ba83b5a7-e63e-5aaf-ac29-745a549f9d7d@2ndquadrant.com>
<aa5d8d96-0eb6-07b9-2caf-0910b313cb56@2ndquadrant.com>
<7212.1580177517@sss.pgh.pa.us>
> On Jan 27, 2020, at 6:11 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> and I think it
> makes German better (does 'ß' appear in any month/day names there?),
> so maybe we should just roll with that.
To my knowledge, neither /ß/ nor /ss/ occur in day or month names in German, neither presently nor in recent times, so I wouldn’t expect it to matter for German whether you use uppercase or lowercase.
>
> The other question your example raises is whether we should be trying
> to de-accent before comparison, ie was it right for 'Ιανουάριος' to
> be treated differently from 'Ιανουαριος'. I don't know enough Greek
> to say, but it kind of feels like that should be outside to_date's
> purview.
I’m getting a little lost here. German uses both Sonnabend and Samstag for Saturday, so don’t you have to compare to a list of values anyway? I don’t know Norwegian, but Wikipedia shows both sundag and søndag for Sunday in Norwegian Nynorsk. Faroese seems to have a few similar cases. Whether those languages have alternate day names both in common usage, I can’t say, but both Sonnabend and Samstag are still in use in the German speaking world. If you need to compare against lists, then I would think you could put both ιανουάριοσ and ιανουάριος into a list, even if only one of them is grammatically correct Greek. I’d think that unaccented versions of names might also go into the list, depending on whether speakers of that language consider them equivalent. That sounds like something for the translators to hash out.
—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
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: mark.dilger@enterprisedb.com, tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com, juanjo.santamaria@gmail.com, alvherre@2ndquadrant.com, zaartur@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: <2E3D8D71-3B55-4735-A047-1FECE1506CD1@enterprisedb.com>
* 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