From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Invalid byte sequence for encoding "UTF8", caused due to non wide-char-aware downcase_truncate_identifier() function on WINDOWS |
Date: | 2011-06-09 15:28:20 |
Message-ID: | BANLkTimy+bQGeFqr-v5ENhi3YMK4iUDeqQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jun 9, 2011 at 11:17 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Thu, Jun 9, 2011 at 10:15 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> If we need to work around brain-dead isupper() tests, maybe the best
>>> thing is to implement two versions of the loop:
>>> if (encoding is single byte)
>
>> That seems like a clear improvement. It's a long way from perfect,
>> but still worthwhile.
>
> Hmm ... while the above is easy enough to do in the backend, where we
> can look at pg_database_encoding_max_length, we have also got instances
> of this coding pattern in src/port/pgstrcasecmp.c. It's a lot less
> obvious how to make the test in frontend environments. Thoughts anyone?
I'm not sure if this helps at all, but an awful lot of those tests are
against hard-coded strings that are known to contain only ASCII
characters. Is there some way we can optimize this for that case?
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2011-06-09 15:29:05 | Re: release slippage |
Previous Message | Tom Lane | 2011-06-09 15:17:47 | Re: Invalid byte sequence for encoding "UTF8", caused due to non wide-char-aware downcase_truncate_identifier() function on WINDOWS |