Re: Using index for "like 'ABC%'" type query

Поиск
Список
Период
Сортировка
От Darko Prenosil
Тема Re: Using index for "like 'ABC%'" type query
Дата
Msg-id 200304181817.04081.darko.prenosil@finteh.hr
обсуждение исходный текст
Ответ на Using index for "like 'ABC%'" type query  (lec <englim@pc.jaring.my>)
Список pgsql-general
On Friday 18 April 2003 02:56, 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%';
>
> Earlier versions of postgresql, eg, 6.5.3 can utilize the index.
>
>

    I think some other DB projects use something that is called
"BEGINS WITH" operator. Some time ago I tried to write such operator for
postgres. Unfortunatelly at that time I had no experience with postgres
internals, so the functions are written in PL/PSQL !!! They are working all
right, but the whole thing should be rewriten in C. If You are interested,
I'll send You the "code". For us using non "C" collations, I do not know for
other way. Of course if "C" collation satisfy Your needs, You do not need to
do such "hacks".

Regards !


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

Предыдущее
От: Lincoln Yeoh
Дата:
Сообщение: Re: default locale considered harmful? (was Re:
Следующее
От: Greg Stark
Дата:
Сообщение: Casts to text/varchar