Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQzun-0007eQ-5L for pgsql-bugs@arkaria.postgresql.org; Wed, 15 May 2019 19:50:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hQzul-0003LD-HY for pgsql-bugs@arkaria.postgresql.org; Wed, 15 May 2019 19:50:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQzul-0003Kc-6G for pgsql-bugs@lists.postgresql.org; Wed, 15 May 2019 19:50:11 +0000 Received: from smtp.outgoing.loopia.se ([194.9.95.112]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQzp4-0005kx-TY for pgsql-bugs@lists.postgresql.org; Wed, 15 May 2019 19:44:20 +0000 Received: from s554.loopia.se (localhost [127.0.0.1]) by s554.loopia.se (Postfix) with ESMTP id 85AE51F17AB6 for ; Wed, 15 May 2019 21:43:53 +0200 (CEST) Received: from s498.loopia.se (unknown [172.21.200.96]) by s554.loopia.se (Postfix) with ESMTP id 66A7579754A; Wed, 15 May 2019 21:43:53 +0200 (CEST) Received: from s473.loopia.se (unknown [172.21.200.35]) by s498.loopia.se (Postfix) with ESMTP id 62A24449430; Wed, 15 May 2019 21:43:53 +0200 (CEST) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1 X-Spam-Level: X-Spam-Status: No, score=-1 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1] autolearn=disabled Received: from s499.loopia.se ([172.22.191.5]) by s473.loopia.se (s473.loopia.se [172.22.190.13]) (amavisd-new, port 10024) with LMTP id FXEKU6wbp34Y; Wed, 15 May 2019 21:43:52 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 85.228.38.16 Received: from [192.168.1.72] (c-1026e455.027-294-73746f71.bbcust.telenor.se [85.228.38.16]) (Authenticated sender: daniel@yesql.se) by s499.loopia.se (Postfix) with ESMTPSA id BF10E1349A3C; Wed, 15 May 2019 21:43:52 +0200 (CEST) From: Daniel Gustafsson Message-Id: <4F264E45-7708-4CCF-81BE-CE5AF190E71F@yesql.se> Content-Type: multipart/mixed; boundary="Apple-Mail=_5B8F8899-294E-40B3-95EC-BD041714BA49" Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: =?utf-8?Q?Re=3A_BUG_=2315805=3A_Problem_with_lower_function_for_g?= =?utf-8?Q?reek_sigma_=28=CE=A3=29_letter?= Date: Wed, 15 May 2019 21:43:51 +0200 In-Reply-To: <13376.1557935189@sss.pgh.pa.us> Cc: Daniel Verite , iksss.88@gmail.com, pgsql-bugs@lists.postgresql.org To: Tom Lane References: <5d80ac2d-3f1f-4d60-88a8-5602eb9978a3@manitou-mail.org> <13376.1557935189@sss.pgh.pa.us> X-Mailer: Apple Mail (2.3445.9.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_5B8F8899-294E-40B3-95EC-BD041714BA49 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 15 May 2019, at 17:46, Tom Lane wrote: >=20 > "Daniel Verite" writes: >> PG Bug reporting form wrote: >>> lower('=CE=94=CE=97=CE=9C=CE=9F=CE=A4=CE=95=CE=A3 =CE=A6=CE=91=CE=99=CE= =A3=CE=A4=CE=9F=CE=A5') =3D >>> "=CE=B4=CE=B7=CE=BC=CE=BF=CF=84=CE=B5=CF=83 =CF=86=CE=B1=CE=B9=CF=83=CF= =84=CE=BF=CF=85" instead of "=CE=B4=CE=B7=CE=BC=CE=BF=CF=84=CE=B5=CF=82 = =CF=86=CE=B1=CE=B9=CF=83=CF=84=CE=BF=CF=85" >=20 >> With PostgreSQL version 10 or newer, you could use an ICU >> locale. lower() would produce the expected result: >=20 > Oh, if using ICU already fixes this, I think we might as well just > say that you have to use ICU if you want the right behavior for such > cases. Seems reasonable. Maybe it warrants a mention in the docs on the string function page since it may suprise users? cheers ./daniel --Apple-Mail=_5B8F8899-294E-40B3-95EC-BD041714BA49 Content-Disposition: attachment; filename=casefolding.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="casefolding.diff" Content-Transfer-Encoding: 7bit diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index bc2275c8fe..b2f5a49b29 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1682,6 +1682,10 @@ + + The database must be compiled with ICU in order for contextual aware case-folding, + such as word-final characters. + Additional string manipulation functions are available and are listed in . Some of them are used internally to implement the --Apple-Mail=_5B8F8899-294E-40B3-95EC-BD041714BA49--