Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k844d-000750-0Q for pgsql-bugs@arkaria.postgresql.org; Tue, 18 Aug 2020 16:02:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k844b-0003L9-U0 for pgsql-bugs@arkaria.postgresql.org; Tue, 18 Aug 2020 16:02:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k844b-0003L1-Mz for pgsql-bugs@lists.postgresql.org; Tue, 18 Aug 2020 16:02:53 +0000 Received: from mail.dalibo.com ([212.85.157.172]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k844X-0004Of-FP for pgsql-bugs@lists.postgresql.org; Tue, 18 Aug 2020 16:02:51 +0000 Received: from firost (abordeaux-652-1-105-160.w2-6.abo.wanadoo.fr [2.6.152.160]) by mail.dalibo.com (Postfix) with ESMTPSA id 4CDF922704; Tue, 18 Aug 2020 18:02:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dalibo.com; s=a; t=1597766568; bh=6wHgUimvlWue8JHd+mFv4J4/WXo6YwGtPmFUMQQuxOs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=plyeAUzu820cYtCjawczIblyLFdYUk5J7W4hwqc3+0FjDXFohYoa0GdfQ/neDPYLz DPAKZVG6qYQmJW77HB3j18mIrTxIziU4PmxVOAvh/Oy8rsMMjZyRxaE3ZduCcaYVpB m17zpIHtx4l8J2eOALIeK2wFGCPMe7K2dZFg1egk= Date: Tue, 18 Aug 2020 18:02:46 +0200 From: Jehan-Guillaume de Rorthais To: Peter Geoghegan Cc: Thomas Munro , =?UTF-8?B?0KDQvtC80LDQvSDQm9C4?= =?UTF-8?B?0YLQvtCy0YfQtdC90LrQvg==?= , PostgreSQL mailing lists Subject: Re: BUG #15285: Query used index over field with ICU collation in some cases wrongly return 0 rows Message-ID: <20200818180246.04e47f8e@firost> In-Reply-To: References: <153201618542.1404.3611626898935613264@wrigleys.postgresql.org> <20200610002933.6a6d482b@firost> <20200612184055.205f0159@firost> <20200613004322.3bcc37f6@firost> Organization: Dalibo MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Peter, On Tue, 11 Aug 2020 21:14:03 -0700 Peter Geoghegan wrote: > On Fri, Jun 12, 2020 at 3:43 PM Jehan-Guillaume de Rorthais > wrote: > > Please, find in attachment the second version of the patch, with a > > regression test. > > Is it possible to fix this by making the existing > HAVE_UCOL_STRCOLLUTF8 test more conservative about ICU version? IOW, > by making it only use ucol_strcollUTF8() on versions that are known to > not be affected by this bug? I might be missing something, but according to my tests back in June, the bug exists in both ucol_strcollUTF8()/ucol_strcoll() and is still affecting the very last version of ICU (67.1). That's why my patch replaces both functions altogether using ucol_strcollIter as replacement. > This related ICU bug describes an issue affecting only versions 53/54: > > https://unicode-org.atlassian.net/browse/ICU-11388 This bug is related to ICU4J, not ICU4C. AS far as I understand, this was related to a bad variable type when porting the code to java. Do I miss something? Regards,