From: | Darko Prenosil <darko(dot)prenosil(at)finteh(dot)hr> |
---|---|
To: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Using index for "like 'ABC%'" type query |
Date: | 2003-04-18 18:17:04 |
Message-ID: | 200304181817.04081.darko.prenosil@finteh.hr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
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 !
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2003-04-18 18:34:38 | Casts to text/varchar |
Previous Message | Lincoln Yeoh | 2003-04-18 16:06:53 | Re: default locale considered harmful? (was Re: |
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2003-04-18 18:22:45 | Re: pg_clog woes with 7.3.2 - Episode 2 |
Previous Message | Lincoln Yeoh | 2003-04-18 16:06:53 | Re: default locale considered harmful? (was Re: |