Re: Indexes with LIKE

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Julian Scarfe <julian(at)avbrief(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Indexes with LIKE
Date: 2002-07-14 19:46:53
Message-ID: 20020714124446.L31012-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Sat, 13 Jul 2002, Julian Scarfe wrote:

> From: "Stephan Szabo" <sszabo(at)megazone23(dot)bigpanda(dot)com>
>
> > You need to have made the database in C locale in order to get index scans
> > from LIKE. I think that's mentioned in the Localization section of the
> > admin guide, but I could be remembering that wrong.
>
> Thanks very much Stephan. Indeed it's in Admin Guide 5.1.2. I was using
> en_GB, not C.
>
> There is of course no excuse for failing to read every bit of smallprint in
> the admin guide before installation :-) but for those lazy unfortunates like
> me that don't think to look there to find out what's wrong when indexes
> aren't used with LIKE, I've added a DocNote under Pattern Matching.

That's a good idea. Alot of the docs are written assuming that you're
configuring it from source so that you'd have to turn on locale at
configure time, but that's not true for package users.

Are you actually using any of the locale features of the locale? If not,
you might want to consider setting up in C locale.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Christopher Kings-Lynne 2002-07-15 03:15:08 Quick Question
Previous Message Masaru Sugawara 2002-07-14 12:23:28 Re: [HACKERS] please help on query