Re: regression test crashes at tsearch - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: regression test crashes at tsearch
Date
Msg-id 49AC44D7.7040804@sigaev.ru
Whole thread Raw
In response to Re: regression test crashes at tsearch  (Greg Stark <greg.stark@enterprisedb.com>)
List pgsql-hackers
> Hmm well the KOI8 tests unsurprisingly produce random results on
> non-KOI8 input. It's pure chance you didn't get EILSEQ.
Because KOI8 is not multibyte encoding.

> What errno did you get for the C locale test? On which input
> character?Perhaps it's sihnalljng EILSEQ for every byte >0x80 ? That
> seems broken to me but perhaps not to a glibc pedant out there.

Linux
========C==========
mbstowcs returns -1 errno: 84 Invalid or incomplete multibyte or wide
character
========ru_RU.KOI8-R==========
mbstowcs returns 12 errno: 0 Success
========ru_RU.UTF-8==========
mbstowcs returns 6 errno: 0 Success

FreeBSD
========C==========
mbstowcs returns 12 errno: 0 Unknown error: 0
========ru_RU.KOI8-R==========
mbstowcs returns 12 errno: 0 Unknown error: 0
========ru_RU.UTF-8==========
mbstowcs returns 6 errno: 0 Unknown error: 0

In any case, we could not trust mbstowcs if current locale is not match
to encoding. And we could not check every pair of locale/encoding but
mbstowcs with C-locale and multibyte encoding obviously doesn't work.


Attachment

pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: GIN, partial matches, lossy bitmaps
Next
From: Merlin Moncure
Date:
Subject: statistics horribly broken for row-wise comparison