From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Daniel Gustafsson <daniel@yesql.se>
Cc: iksss.88@gmail.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #15805: Problem with lower function for greek sigma (Σ) letter
Date: Wed, 15 May 2019 09:44:20 -0400
Message-ID: <31390.1557927860@sss.pgh.pa.us> (raw)
In-Reply-To: <20190515122048.GA12876@alvherre.pgsql>
References: <20190515122048.GA12876@alvherre.pgsql>
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> On 2019-May-15, Daniel Gustafsson wrote:
>> This is indeed a bug, and a rare occurrence since AFAICT from ISO 30112 and
>> googling there is only a single case of word-final lowercasing which is this
>> sigma. The attached patch takes a stab at fixing this.
> Ummm ... isn't this a counterexample?
> https://hebrew4christians.com/Grammar/Unit_One/Final_Forms/final_forms.html
I do not think the patch as given is acceptable in any case:
1. assumes without any evidence whatsoever that the system's wide-character
representation is Unicode code points;
2. assumes without checking that the locale is one that would allow this
conversion (counterexample: C locale);
3. unreasonable hard-coded assumption about what the "not a word character"
condition is.
It's possible that 1 and 2 could be finessed by checking both that the
original character is Σ and the new one is σ (in Unicode). We'd still
theoretically be taking a risk of the wrong substitution if the wchar
representation is not Unicode, but the odds seem fairly small. As for
point 3, why aren't you using iswalpha() on the next character?
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, daniel@yesql.se
Subject: Re: BUG #15805: Problem with lower function for greek sigma (Σ) letter
In-Reply-To: <31390.1557927860@sss.pgh.pa.us>
References: <20190515122048.GA12876@alvherre.pgsql> <31390.1557927860@sss.pgh.pa.us>
* 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