pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Haifeng Liu <liuhaifeng@live.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Does index based on text with 'en_US.utf8' collation support like query?
Date: Tue, 25 Dec 2012 19:37:10 +0800
Message-ID: <BLU0-SMTP2953C508D5F6127617CC45AB93A0@phx.gbl> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

Hi,

I found that queries like "select * from tbl where col1 like 'abc%'" will use index only when the col1(and the index) use 'C' collation. If I use 'default' which is 'en_US.utf8' in my database, the equation condition will use the index but like query will not.

I also tried to specify the collation explicitly: like ('abc%' collate 'en_US.utf8'), not work too.

Is that only 'C' collation support 'like' query or I missed something in my sql? Or do I need to install something additional to support index on other collation?

Thanks in advance.

-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (2+ messages)  latest in thread

Message-ID: <BLU0-SMTP2953C508D5F6127617CC45AB93A0@phx.gbl>
Permalink:  ../BLU0-SMTP2953C508D5F6127617CC45AB93A0@phx.gbl/
Also on:    postgresql.org/message-id/BLU0-SMTP2953C508D5F6127617CC45AB93A0@phx.gbl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: liuhaifeng@live.com
  Subject: Re: Does index based on text with 'en_US.utf8' collation support like query?
  In-Reply-To: <BLU0-SMTP2953C508D5F6127617CC45AB93A0@phx.gbl>
  References: <BLU0-SMTP2953C508D5F6127617CC45AB93A0@phx.gbl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox