From: | Artur Rataj <arataj(at)iitis(dot)gliwice(dot)pl> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Comparing strings with non-ASCII characters |
Date: | 2002-11-13 15:56:30 |
Message-ID: | Pine.LNX.4.33.0211131650200.11316-100000@linux.iitis.gliwice.pl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I have set locale to C, made initdb and started postgres, and the index is
not used again.
explain select idescr.string from isbibc_fti_descr idescr where
idescr.string ~ '^string.*';
NOTICE: QUERY PLAN:
Seq Scan on isbibc_fti_descr idescr (cost=0.00..63910.04 rows=17033
width=44)
On Wed, 13 Nov 2002, Artur Rataj wrote:
> Hi,
>
> Is it possible in Postgres to use non-ASCII characters and have enabled
> index optimizations for the ~ operator? Would it work correctly with
> locale set to C for expressions of the form ~ '^string.*'? Or is there a
> way to substitue expressions like this with two comparisons? I have tried
> to do it like that >= 'string' and <= 'string_' where _ would be a
> character sorted after any other used in the searched table, but I did
> not found such a character in the locale pl_PL. Anyway, why the index
> optimizations are disabled for the ~ operator and not for the < or >
> operators in the locale? Is not there a similar problem with all of the
> three operators in a non-ASCII locale? Could not the lack of index
> optimizations be fixed in Postgres for locales like pl_PL with a simple
> reordering of characters for a collator, at least to get the < and >
> operators working right with index optimizations in such locales?
>
Best regards,
Artur Rataj
From | Date | Subject | |
---|---|---|---|
Next Message | Björn Metzdorf | 2002-11-13 16:09:04 | Re: tsearch consistency trigger on inheritated table |
Previous Message | Björn Metzdorf | 2002-11-13 15:51:50 | Re: Connection startup overhead |