Re: Can LIKE under utf8 use INDEXes?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert James <srobertjames(at)gmail(dot)com>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Can LIKE under utf8 use INDEXes?
Date: 2009-07-22 20:31:15
Message-ID: 2611.1248294675@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Robert James <srobertjames(at)gmail(dot)com> writes:
> Hi. I'm confused about the behavior of LIKE under utf8 locale.

UTF8 is not a locale, it's an encoding. If you're using C locale then
LIKE can use indexes, regardless of the encoding. If you're using
some other locale then you need a pattern_ops index.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Wenk 2009-07-22 20:32:43 Re: psql \du [PATCH] extended \du with [+] - was missing
Previous Message Andy Colson 2009-07-22 19:26:50 Re: Best way to import data in postgresl (not "COPY")