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

From Bruce Momjian
Subject Re: [HACKERS] another locale problem
Date
Msg-id 199906111422.KAA17946@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] another locale problem  (Daniel Kalchev <daniel@digsys.bg>)
List pgsql-hackers
> >>>Tatsuo Ishii said:
>  > > SELECT key FROM t WHERE key ~* '^somestring'
>  > > 
>  > > returns no tuples and explain says it will use the 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';

Oops, forgot ~* is case-insensitive.  The conditions we adde for this
require the query to be between > A and < a, which is not very
restrictive.

No real better way to do this.


--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] BUG in 6.5 - GROUP BY inheritance
Next
From: Bruce Momjian
Date:
Subject: Re: [PORTS] Patch for m68k architecture