From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Getting server crash on Windows when using ICU collation |
Date: | 2017-06-16 14:10:41 |
Message-ID: | a39112a8-e6e0-c218-79ff-656b3984299c@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 6/15/17 13:48, Ashutosh Sharma wrote:
>> Maybe just
>>
>> diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
>> index a0dd391f09..2506f4eeb8 100644
>> --- a/src/backend/utils/adt/varlena.c
>> +++ b/src/backend/utils/adt/varlena.c
>> @@ -1433,7 +1433,7 @@ varstr_cmp(char *arg1, int len1, char *arg2, int len2, Oid collid)
>>
>> #ifdef WIN32
>> /* Win32 does not have UTF-8, so we need to map to UTF-16 */
>> - if (GetDatabaseEncoding() == PG_UTF8)
>> + if (GetDatabaseEncoding() == PG_UTF8 && (!mylocale || mylocale->provider == COLLPROVIDER_LIBC))
>> {
>> int a1len;
>> int a2len;
>
> Oh, yes, this looks like the simplest and possibly the ideal way to
> fix the issue. Attached is the patch. Thanks for the inputs.
committed
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2017-06-16 14:12:41 | Re: Getting server crash on Windows when using ICU collation |
Previous Message | Tom Lane | 2017-06-16 14:06:16 | Re: 答复: GiST API Adancement |