Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cBOyv-0006FO-7r for pgsql-bugs@arkaria.postgresql.org; Mon, 28 Nov 2016 16:40:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cBOyu-0003eA-F1 for pgsql-bugs@arkaria.postgresql.org; Mon, 28 Nov 2016 16:40:40 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cBOyE-0002qx-UW for pgsql-bugs@postgresql.org; Mon, 28 Nov 2016 16:39:58 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cBOy8-0005tK-1Y for pgsql-bugs@postgresql.org; Mon, 28 Nov 2016 16:39:58 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id uASGdlEk003925; Mon, 28 Nov 2016 11:39:47 -0500 From: Tom Lane To: pawel.kania@moneyhouse.de cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14437: BTREE Index is not used for queries on citext columns In-reply-to: <20161128071755.6530.8905@wrigleys.postgresql.org> References: <20161128071755.6530.8905@wrigleys.postgresql.org> Comments: In-reply-to pawel.kania@moneyhouse.de message dated "Mon, 28 Nov 2016 07:17:55 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3923.1480351187.1@sss.pgh.pa.us> Date: Mon, 28 Nov 2016 11:39:47 -0500 Message-ID: <3924.1480351187@sss.pgh.pa.us> X-Pg-Spam-Score: -4.8 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org pawel.kania@moneyhouse.de writes: > [ citext LIKE operator isn't indexable ] Yeah. Don't hold your breath waiting for that to get better :-(. The problem is that there's no way for extensions to plug into the "special index operator" mechanism in the planner, so there's no way to derive indexable range conditions from the citext LIKE operator. That's probably solvable with enough sweat, but so far no one has taken an interest in working on it. Even if that were fixed, I'm not sure that your examples would be indexable, because the patterns all start with case-foldable characters. The "special index operator" conversion for ILIKE just throws up its hands when it sees that, and I doubt citext could do any better. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs