Re: Latest on CITEXT 2.0 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Latest on CITEXT 2.0
Date
Msg-id 4993.1214923936@sss.pgh.pa.us
Whole thread Raw
In response to Re: Latest on CITEXT 2.0  ("Marko Kreen" <markokr@gmail.com>)
Responses Re: Latest on CITEXT 2.0  ("Marko Kreen" <markokr@gmail.com>)
List pgsql-hackers
"Marko Kreen" <markokr@gmail.com> writes:
> On 6/26/08, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> BTW, I don't think you can use that same-length optimization for
>> citext.  There's no reason to think that upper/lowercase pairs will
>> have the same length all the time in multibyte encodings.

> What about this code in current str_tolower():

>         /* Output workspace cannot have more codes than input bytes */
>         workspace = (wchar_t *) palloc((nbytes + 1) * sizeof(wchar_t));

That's working with wchars, not bytes.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Marko Kreen"
Date:
Subject: Re: Latest on CITEXT 2.0
Next
From: "Radek Strnad"
Date:
Subject: [WIP] patch - Collation at database level