Re: tolower() identifier downcasing versus multibyte encodings

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

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2011-03-19 17:48:39 Re: Indent authentication overloading
Previous Message Tom Lane 2011-03-19 16:45:01 Re: Collations versus record-returning functions