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 1iIYP5-0004N5-Gc for pgsql-general@arkaria.postgresql.org; Thu, 10 Oct 2019 13:22:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iIYP4-0002jO-5f for pgsql-general@arkaria.postgresql.org; Thu, 10 Oct 2019 13:22:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iIYP3-0002jH-RX for pgsql-general@lists.postgresql.org; Thu, 10 Oct 2019 13:22:49 +0000 Received: from mout.kundenserver.de ([212.227.126.133]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iIYP1-0000GR-NQ for pgsql-general@lists.postgresql.org; Thu, 10 Oct 2019 13:22:49 +0000 Received: from [10.8.0.75] ([185.40.248.10]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPSA (Nemesis) id 1N6bTa-1i1fsD2rTq-0181BU for ; Thu, 10 Oct 2019 15:22:43 +0200 Subject: Re: Case Insensitive Comparison with Postgres 12 References: <9ad4f42faa10f1aa4e81e3ed8160d36d0d39856a.camel@cybertec.at> <9803fc4d-7fe4-33f3-014e-defdfcc59873@lucee.org> To: pgsql-general@lists.postgresql.org From: Thomas Kellerer Message-ID: <7f3e8791-fa18-b355-d377-465cba605616@gmx.net> Date: Thu, 10 Oct 2019 15:22:41 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 In-Reply-To: <9803fc4d-7fe4-33f3-014e-defdfcc59873@lucee.org> Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:T/VY9+jqzqOzkBt4MOQbqIrWrQJNKAkzlsriU0sc8Ev0V9UIjla iuyqDuR9NSZsIQVPnowGGf0PdB5j6oJBlLWsYf/S/95FeV95ZekSwboAf+efbiL2MOC+0BF mYCSMFCLVkQZtq1blDvy6QfAM1XpWo9mJiPINvb1WHPDFE9AwJJhg8zCGtGGDYdxIqwtmpp A/ztJXKs4jy340Z5Os3Lg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:DbR4okoc9qE=:x+2RZhLJoIDTvT3usvAWs6 c577+dUYsqCtKhH6cTlpXJMuDCsAybvuk7n8XivVPWZuVnNpZnxfG9zE0yRkFZjQKS5r2eRfO 1ASOpybo/NPcUCQ+LfuUBgy72kILQLESNxVaxicX30CgeGb3re7QMnrGuXmtmZa76eglVlJQV Ba+mISo5DjzfkBm0oX1oYqhF3IR7g7mOws1peI8WEPVpPCFp4/YQOVlrBIXiM5qytJ8XYNazo 9lhhOKvieFE4bhljgUsRRbu1CaK+e4d8VoMRplKzBSYfOEwtrnZjc2f7FRnmpQ33c7Hg28wzB uFGNI1FEo6aGudTjYSMpycoOwINsIJ6CZ9eEXsU914j/1qIblOplKnGC+xdZEc6oz3ssB8Ezh 4Llu6jYXtGZJ3ch02ngR2zyGf3wU8oG0PqlU9PRYnzFZve+3njHYIS+KmNnPE0VG1eqaIOeFK cMpGbTSj1RxBXkLAQmnEPkyZzHGPMXTUm0kvXwqIkalPl6bHPd8QPHxSmm7Gh3bZqGd4cV52b AS2OadMvjR7x0stArqEssOFPLhi2fj9D0uW1qygvKunwQ4jlGOHNWm2wXTzkkAwC96A7Sb2NM KrvJYq9Au6Rrc5GXLC/A99ZiW3xeQ1NO0bIJu7M1ABE431iqPG119lJCtIo8pCPLrNuOaVgVF KFowBzP3RkDKEG7SkaNIMdcNpT8Mzl5+yiLKUps8XCfSkSiht1EfuywE+K5pARJcwi2SukpXY JmFfMdRVWFg12E/9OigIkQ9CKJHW17mRIPA2C/lIEsplqRMC5XaAWfaUd30a96q8yEm91MKVj 4OxmvanbnTbDcMaJ4volg1YZd2/Ia5/tbwFhX0GTvJwJHvBqffna4pyZU3EB2n1TttpuP4xOg clpPGPYRvChB0eQeB+GJmbooWa3kkkQPSkCHfREDE= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Igal @ Lucee.org schrieb am 10.10.2019 um 14:41: > Thank you all for replying. I tried to use the locale suggested by > both Laurenz and Pavel, en-US-u-ks-level2, but I'm still getting > false for a simple comparison of 'Abc' = 'abc'. I tried the locale > both as a 'string' and as an "identifier": > >> drop collation if exists case_insensitive; > >> create collation case_insensitive ( >    provider=icu, locale="en-US-u-ks-level2", deterministic=false > ); > >> select 'Abc' = 'abc' collate case_insensitive as is_equal; > > is_equal| > --------| > false   | > > What am I doing wrong here? Check the version of libicu that your Linux is using. That locale format requires version 54 or later. (My up-to-date CentOS 7.7 for example is still using version 50 and the EDB Windows binaries include version 53). In another thread about ICU problems, Daniel Verite explained that in more detail: > With ICU 53 or older, instead of the locale above, we must use the old-style syntax: > > locale = 'de-DE@colStrength=secondary' In your case I guess, it should be locale = 'en-US@colStrength=secondary' Thomas