Re: [HACKERS] another locale problem

From: Daniel Kalchev <daniel(at)digsys(dot)bg>
To: t-ishii(at)sra(dot)co(dot)jp
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] another locale problem
Date: 1999-06-11 07:06:06
Message-ID: 199906110706.KAA21618@dcave.digsys.bg
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';

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Broytmann 1999-06-11 07:12:36 Re: [HACKERS] Postgres 6.5 beta2 and beta3 problem
Previous Message Goran Thyni 1999-06-11 07:03:01 locales and MB (was: Postgres 6.5 beta2 and beta3 problem)