Re: BUG #14437: BTREE Index is not used for queries on citext columns - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #14437: BTREE Index is not used for queries on citext columns
Date
Msg-id 3924.1480351187@sss.pgh.pa.us
Whole thread Raw
In response to BUG #14437: BTREE Index is not used for queries on citext columns  (pawel.kania@moneyhouse.de)
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: BUG #14406: Statement fails after upgrade to 9.6.1
Next
From: Jonathon Nelson
Date:
Subject: Bug in Physical Replication Slots (at least 9.5)?