Re: Leading substrings - alternatives with 8.1.3?

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Leading substrings - alternatives with 8.1.3?
Дата
Msg-id 20060501174721.GA27150@svana.org
обсуждение исходный текст
Ответ на Leading substrings - alternatives with 8.1.3?  (Wes <wespvp@syntegra.com>)
Ответы Re: Leading substrings - alternatives with 8.1.3?  (Wes <wespvp@syntegra.com>)
Список pgsql-general
On Mon, May 01, 2006 at 12:16:46PM -0500, Wes wrote:
> Back in the 7.4 era, to make leading substrings be indexed, I had to set
> locale=C.  See thread:
>
>   <http://archives.postgresql.org/pgsql-general/2005-02/msg00159.php>
>
> I couldn't find any updates to this issue in the archives since then.
>
> With 8.1.3, the default locale for my system is en_US.UTF8.  Leading
> substring searches result in a sequential search instead of an indexed
> search.  Do I still have to initdb to locale=C, or is there a better option
> now?

Check the documentation, but if you declare a index with (for example)
text_pettern_ops, then LIKE will work even if the rest of your DB is
UTF-8.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: Is PostgreSQL an easy choice for a large CMS?
Следующее
От: Philip Hallstrom
Дата:
Сообщение: Re: Is PostgreSQL an easy choice for a large CMS?