Re: Can LIKE under utf8 use INDEXes?

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

Thank you, Tom. I guess I'm a bit confused about things here. How can I
find the locale of my database? (I wasn't able to find this in the docs).
If I do have the locale set to 'C', do I loose anything by using utf8 for
all text fields?

On Wed, Jul 22, 2009 at 4:31 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> 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 Nathan Jahnke 2009-07-22 22:30:12 plperl spi_prepare and arrays
Previous Message Robert James 2009-07-22 22:17:58 Re: Documentation Improvement suggestions