Re: Using index for "like 'ABC%'" type query - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: Using index for "like 'ABC%'" type query
Date
Msg-id 20030418143104.GB26351@libertyrms.info
Whole thread Raw
In response to Using index for "like 'ABC%'" type query  (lec <englim@pc.jaring.my>)
Responses default locale considered harmful? (was Re: Using index for "like 'ABC%'" type query)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Fri, Apr 18, 2003 at 10:56:52AM +0800, lec wrote:
> For current version of postgresql, is it possible for a query like below
> to utilize an index?
>
> select item_name from item where item_code like 'ABC%';

Yes.  But locale is enabled by default now, and if you use anything
other than C (and other-than-C is increasingly the default on the
supportedplatforms), it won't work.  Just make sure that your locale
is C when you do initdb.

A

--
----
Andrew Sullivan                         204-4141 Yonge Street
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110


pgsql-general by date:

Previous
From: Ken Williams
Date:
Subject: Weird "template1" errors on CREATE DATABASE
Next
From: Tom Lane
Date:
Subject: Re: Weird "template1" errors on CREATE DATABASE