Search Postgresql Archives

Re: Can LIKE under utf8 use INDEXes?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx> wrote:
Robert James <srobertjames@xxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux