Re: [HACKERS] another locale problem

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Daniel Kalchev <daniel(at)digsys(dot)bg>
Cc: t-ishii(at)sra(dot)co(dot)jp, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] another locale problem
Date: 1999-06-11 14:22:46
Message-ID: 199906111422.KAA17946@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-06-11 14:27:01 Re: [PORTS] Patch for m68k architecture
Previous Message Tom Lane 1999-06-11 14:02:56 Re: [HACKERS] BUG in 6.5 - GROUP BY inheritance