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 1iEFeV-0005uL-Np for pgsql-bugs@arkaria.postgresql.org; Sat, 28 Sep 2019 16:32:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iEFeU-0002ho-AH for pgsql-bugs@arkaria.postgresql.org; Sat, 28 Sep 2019 16:32:58 +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 1iEFeT-0002gg-VM for pgsql-bugs@lists.postgresql.org; Sat, 28 Sep 2019 16:32:58 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iEFeR-00047x-GD for pgsql-bugs@postgresql.org; Sat, 28 Sep 2019 16:32:56 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1iEFeQ-00013Y-0T; Sat, 28 Sep 2019 12:32:54 -0400 Date: Sat, 28 Sep 2019 12:32:53 -0400 From: Bruce Momjian To: Tom Lane Cc: Morris de Oryx , pgsql-bugs@postgresql.org Subject: Re: citext LIKE search bug Message-ID: <20190928163253.GE26853@momjian.us> References: <29403.1568866774@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <29403.1568866774@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Sep 19, 2019 at 12:19:34AM -0400, Tom Lane wrote: > Morris de Oryx writes: > > I'm using citext fields, and am working through how to build indexes that > > the planner recognizes. I found this paragraph in the PG 11 release notes: > > > "Allow creation of indexes that can be used by LIKE comparisons on citext > > columns (Alexey Chernyshov) > > To do this, the index must be created using the citext_pattern_ops operator > > class." > > https://www.postgresql.org/docs/11/release-11.html > > > As far as I can tell, this doesn't work, or at least not in my case with an > > expression index. > > Hm. I found the original submission in the archives [1], and Alexey > explicitly *didn't* claim that that patch was sufficient to enable LIKE > index optimizations on citext. Indeed it obviously isn't, since it just > created some weirdly-named operators without connecting them up to the > LIKE plumbing in any way. So this seems like a case of the REL11 release > notes author (probably Bruce) not reading too closely, which doesn't seem > like entirely his fault since the commit message was totally content-free > about what the point of the patch was [2]. I have no idea how I would have generated any release note item with that commit or the commit diff. I must have asked someone, but I don't remember who. The item was in my initial version of the relesae notes, so it was not added later. Sorry. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +