Re: [HACKERS] another locale problem - Mailing list pgsql-hackers

From Daniel Kalchev
Subject Re: [HACKERS] another locale problem
Date
Msg-id 199906110706.KAA21618@dcave.digsys.bg
Whole thread Raw
In response to Re: [HACKERS] another locale problem  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Responses Re: [HACKERS] another locale problem
Re: [HACKERS] another locale problem
Re: [HACKERS] another locale problem
List pgsql-hackers
>>>Tatsuo Ishii said:> > SELECT key FROM t WHERE key ~* '^somestring'> > > > returns no tuples and explain says it will
usethe index on key. Why is th    is?> > That's strange. It should be seq scan in this case?
 

I forgot to mention, that if 'somestring' is all uppercase, everything works 
(the key field in the table is all uppercase). It still says index scan will 
be used.

To summarize the problem. If key contains (equivalent cyrillic letters) 'ABC', 
'ABCD', 'DAB' and 'ABX' and the query is:

SELECT key FROM t WHERE key ~* '^AB';

index scan will be used and the correct tuples ('ABC', 'ABCD' and 'ABX') will 
be returned. If the query is

SELECT key FROM t WHERE key ~* '^ab';

index scan will be used and no tuples will be returned. With the query

SELECT key FROM t WHERE key ~* 'ab';

sequential scan will be used and the correct tuples will be returned (all of 
the above).
> Can you test following case:> > SELECT key FROM t WHERE key ~* '^Xsomestring'> > where X is one of an ASCII
character.

Explain says it will use sequential scan and if I insert proper key in the 
table it will be returned.

Daniel



pgsql-hackers by date:

Previous
From: Goran Thyni
Date:
Subject: locales and MB (was: Postgres 6.5 beta2 and beta3 problem)
Next
From: Oleg Broytmann
Date:
Subject: Re: [HACKERS] Postgres 6.5 beta2 and beta3 problem