Regular Expressions, LIKE, and indexes - Mailing list pgsql-sql

From Travis Whitton
Subject Regular Expressions, LIKE, and indexes
Date
Msg-id cf9b4f3e0611221110s412dfe4foefa988ef787b30a8@mail.gmail.com
Whole thread Raw
Responses Re: Regular Expressions, LIKE, and indexes
List pgsql-sql
From everything I've been able to find, it seems that the only way to get front-anchored regular expressions or LIKE
patternsbeginning with constants to use an index is to have previously initialized your database using the C locale. Is
thisstill true? I'm trying to do something like: <br /><br />SELECT keyword FROM keywords WHERE keyword ~ '^foo';<br
/><br/>or<br /><br />SELECT keyword FROM keywords WHERE keyword like 'foo%';<br /><br />Are there any other functions
thatcan provide equivalent results while using an index, or am going to have drop UTF-8 and recreate my database? <br
/><br/>Thanks,<br />Travis<br /> 

pgsql-sql by date:

Previous
From: Richard Broersma Jr
Date:
Subject: Re: select into
Next
From: Richard Huxton
Date:
Subject: Re: Regular Expressions, LIKE, and indexes