Re: multibyte-character aware support for function "downcase_truncate_identifier()" - Mailing list pgsql-hackers

From Robert Haas
Subject Re: multibyte-character aware support for function "downcase_truncate_identifier()"
Date
Msg-id AANLkTikG91524vucsG0NxaqgsSsZJw5NzG97V+jFq5_8@mail.gmail.com
Whole thread Raw
In response to Re: multibyte-character aware support for function "downcase_truncate_identifier()"  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: multibyte-character aware support for function "downcase_truncate_identifier()"
List pgsql-hackers
On Wed, Jul 7, 2010 at 10:07 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Rajanikant Chirmade <rajanikant.chirmade@enterprisedb.com> writes:
>> Every identifier is downcase & truncated by function
>> "downcase_truncate_identifier()"
>> before using it.
>
>> But since the function "downcase_truncate_identifier()" is not
>> multibyte-charecter aware,
>> it is not able to downcase some of special charecters in identifier like
>> "my_SchemÄ".
>
> IIRC this is intentional.  Please consult the archives for previous
> discussions.

Why would this be intentional?

One concern I have about this approach is that I am guessing that the
current implementation of str_tolower() is a lot slower than the
current implementation of downcase_truncate_identifier().  It would be
nice to have an implementation that is capable of handling wide
characters but doesn't actually incur the speed penalty unless a wide
character is actually present.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: Tab completion for view triggers in psql
Next
From: Tom Lane
Date:
Subject: Re: multibyte-character aware support for function "downcase_truncate_identifier()"