Re: BUG #1931: ILIKE and LIKE fails on Turkish locale - Mailing list pgsql-bugs

From Volkan YAZICI
Subject Re: BUG #1931: ILIKE and LIKE fails on Turkish locale
Date
Msg-id 20060615155225.GD2469@alamut.tdm.local
Whole thread Raw
In response to Re: BUG #1931: ILIKE and LIKE fails on Turkish locale  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Jun 15 09:33, Tom Lane wrote:
> Volkan YAZICI <yazicivo@ttnet.net.tr> writes:
> > Also, if you'd wish, I can prepare an ad-hoc regression tests patch
> > for LATIN5 and UTF-8 support of Turkish characters.
>
> We know it's broken.  What's needed is a patch.

I couldn't understand why you're so aggressive. I'm just trying to help.
And, IMNSHO, posted test results are quite helpful to determine the
exact problem.

As I understand from the tests, ILIKE and ~* don't work properly while
using UTF-8, despite lower() and upper() work without any problem.
Therefore, I've tried to imitate the code of lower() to form a working
iwchareq() method. [Related patch is attached.] It succeded in all of my
previous tests (and plus in regression tests).

As you can see, it's a quite ad-hoc patch. (No win32 support added yet.)
Also, it needs a HAVE_MBTOWC definition too. I just wanted to give it a
V0 speed.

I think, like.c and oracle_compat.c files should be written from
scratch by somebody with more experience. They look like deprecated in
some aspects. (For instance, like.c is still using CHARMAX despite Bruce
generalized it as HIGHBIT in c.h)


Regards.

Attachment

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1931: ILIKE and LIKE fails on Turkish locale
Next
From: "Tetsuo Sakata"
Date:
Subject: BUG #2480: Installation Error of RMP for RHEL4