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 1iIaSa-0000ks-82 for pgsql-general@arkaria.postgresql.org; Thu, 10 Oct 2019 15:34:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iIaSZ-0001bC-1s for pgsql-general@arkaria.postgresql.org; Thu, 10 Oct 2019 15:34:35 +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 1iIaSY-0001ar-M0 for pgsql-general@lists.postgresql.org; Thu, 10 Oct 2019 15:34:34 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iIaSW-0001b5-Br for pgsql-general@lists.postgresql.org; Thu, 10 Oct 2019 15:34:34 +0000 Received: by mail-qk1-x742.google.com with SMTP id f16so5977731qkl.9 for ; Thu, 10 Oct 2019 08:34:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lucee.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=xIZYGCC3s3HshW8+ayzsOZw+x4MD+73zCqGEspqNGVA=; b=Gz6VbbDjwq5+bjXxKZfk61SzYPa1/j+cQIY3bhpg6g3YhMU5cdZlVRsppWpPqKXhxP l35gvSU9Jmc7m72NHDRBrL+tdeubnc/IKhyZcfVg6QJFbGI0pXW95ZZX9UR67+AgUWCv XuJsxo/fOzkdy0BDTrWQgy73T/1H3qjAv5pboGjl+t/c0mHw7Ea1z72+R3W0FMjzlH1b FCOJdUIWtnkBRp4o7QSSPYUpELpHNbmXOEinSp+7TJ6nmVM/D+pf2jL+nYmkPoHAJX1x o6Omsz0qOZZCKAU3oFF75NfQf5hS4hH2tOL5HIZkFaKiSv9e0p0HWibpdcDOFUeZbpE7 6xGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=xIZYGCC3s3HshW8+ayzsOZw+x4MD+73zCqGEspqNGVA=; b=D5q4HgwPFLUIaK4UDPn6BGtmp71/7MIaEgrYs6YvxirhGXHGrIEhnW8NxfXFVho65w FguoYsYDMV3ok86U0Jn5mud+ZuSE6fVkKwadF3lqNm9nL5SkEkcuX48bHEVTHRt8SkvO mMj9Su9aOKEBPVHzYs7nLwt00/Qx9NOwXldOIbFwcKf+vWP5jclUR0whGBEYzY/r5DUL fEmTQwl+I+71zZg/blhVP9+KUSofqMkWm+p5ZBLI0pEBwaVhnsd7Ivfcmk2Bn3kZnnj6 wg0aXsOyvfjSsDgJQGPjG3JXEISV6Sd5Fm+TzO7lcLZWQ1CFa2tKF8u4XBlO3xbCXOcm Rzcg== X-Gm-Message-State: APjAAAWzZ5sRncI/en7QKbyYsLBcOZanW9J8ZN22Pl9mt4WC2l0wfWst gshY3wf0UOnYVywzLyrFmz0HMYWnri0= X-Google-Smtp-Source: APXvYqx96BVQQNn+rHBCZaQJJFdzk2CNGsuel4sfzyuoA4slOZOP+A38czGSQhWPJMEGkxJjMoemWQ== X-Received: by 2002:a05:620a:24b:: with SMTP id q11mr10416579qkn.436.1570721669817; Thu, 10 Oct 2019 08:34:29 -0700 (PDT) Received: from [10.24.0.14] ([173.244.200.125]) by smtp.googlemail.com with ESMTPSA id 131sm2848207qkg.1.2019.10.10.08.34.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Oct 2019 08:34:28 -0700 (PDT) Subject: Re: Case Insensitive Comparison with Postgres 12 To: pgsql-general@lists.postgresql.org References: <9ad4f42faa10f1aa4e81e3ed8160d36d0d39856a.camel@cybertec.at> <9803fc4d-7fe4-33f3-014e-defdfcc59873@lucee.org> <7f3e8791-fa18-b355-d377-465cba605616@gmx.net> From: "Igal @ Lucee.org" Message-ID: Date: Thu, 10 Oct 2019 08:34:26 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <7f3e8791-fa18-b355-d377-465cba605616@gmx.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thomas, On 10/10/2019 6:22 AM, Thomas Kellerer wrote: > 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' That works, thank you! I also have CentOS installed on that machine: CentOS Linux release 7.7.1908 (Core), showing libicu Version 50.2 via `yum info libicu`. Best, Igal