Re: tolower() identifier downcasing versus multibyte encodings

From: "Francisco Figueiredo Jr(dot)" <francisco(at)npgsql(dot)org>
To: Marko Kreen <markokr(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: tolower() identifier downcasing versus multibyte encodings
Date: 2011-03-21 19:18:50
Message-ID: AANLkTimhti52XEyQB8zx+jBxuZ2KzYoc2HxKa2vtx-xL@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I just received a feedback from our bug report about this problem and
it seems the problem also occurred on a windows machine.

http://pgfoundry.org/tracker/index.php?func=detail&aid=1010988&group_id=1000140&atid=590

On Sat, Mar 19, 2011 at 14:13, Marko Kreen <markokr(at)gmail(dot)com> wrote:
> On Sat, Mar 19, 2011 at 5:05 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Marko Kreen <markokr(at)gmail(dot)com> writes:
>>> On Sat, Mar 19, 2011 at 6:10 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>>> Or we could bite the bullet and start using str_tolower(), but the
>>>> performance implications of that are unpleasant; not to mention that
>>>> we really don't want to re-introduce the "Turkish problem" with
>>>> unexpected handling of i/I in identifiers.
>>
>>> How about first pass with 'a' - 'A' and if highbit is found
>>> then str_tolower()?
>>
>> Hm, maybe.
>>
>> There's still the problem of what to do in src/port/pgstrcasecmp.c,
>> which won't have the infrastructure needed to do that.
>
> You mean client-side?  Could we have a str_tolower without xxx_l
> branch that always does wide-char conversion if high-bit is set?
>
> Custom locale there won't make sense there anyway?
>
> --
> marko
>

--
Regards,

Francisco Figueiredo Jr.
Npgsql Lead Developer
http://www.npgsql.org
http://fxjr.blogspot.com
http://twitter.com/franciscojunior

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2011-03-21 19:23:56 Re: Planner regression in 9.1: min(x) cannot use partial index with NOT NULL
Previous Message Greg Stark 2011-03-21 19:17:32 Re: 2nd Level Buffer Cache