Re: BUG #1931: ILIKE and LIKE fails on Turkish locale

From: Volkan YAZICI <yazicivo(at)ttnet(dot)net(dot)tr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1931: ILIKE and LIKE fails on Turkish locale
Date: 2006-06-15 15:52:25
Message-ID: 20060615155225.GD2469@alamut.tdm.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-tr-genel

On Jun 15 09:33, Tom Lane wrote:
> Volkan YAZICI <yazicivo(at)ttnet(dot)net(dot)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 Content-Type Size
like.patch.0 text/plain 2.7 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alexander Galler 2006-06-15 18:43:27 BUG #2482: Wrong result in timestamp_in, timestamptz_in, date_in
Previous Message Tom Lane 2006-06-15 13:33:33 Re: BUG #1931: ILIKE and LIKE fails on Turkish locale

Browse pgsql-tr-genel by date

  From Date Subject
Next Message Ali Dereli 2006-06-28 12:16:03 sutun birleştirme
Previous Message Tom Lane 2006-06-15 13:33:33 Re: BUG #1931: ILIKE and LIKE fails on Turkish locale