another locale problem - Mailing list pgsql-hackers

From Daniel Kalchev
Subject another locale problem
Date
Msg-id 199906101417.RAA28085@dcave.digsys.bg
Whole thread Raw
Responses Re: [HACKERS] another locale problem
List pgsql-hackers
While playing with --enable-locale and the like expressions I came across this 
phenomenon ('somestring' is in cyrillic - last 64 codes from 0xa0 to 0xff)

SELECT key FROM t WHERE key ~* 'somestring'

returns the correct answers, properly matching upper/lower case characters - 
this with --enable-locale, --with-mb=WIN and commenting out the USE_LOCALE 
restrictions in gram.y. Explain shows Sequential scan, as expected...

However

SELECT key FROM t WHERE key ~* '^somestring'

returns no tuples and explain says it will use the index on key. Why is this?

If 'somestring' is ASCII characters, explain always gives sequential scan and 
in both cases returns the proper results.

I am willing to do some testing if anyone has ideas how to patch the regex 
code (I hate it :-).

Regards,
Daniel



pgsql-hackers by date:

Previous
From: Vadim Mikheev
Date:
Subject: Re: Real Programmers (was: [HACKERS] Priorities for 6.6)
Next
From: Thomas Lockhart
Date:
Subject: Re: [HACKERS] Foreign Keys