Re: regression test crashes at tsearch

Поиск
Список
Период
Сортировка
От Teodor Sigaev
Тема Re: regression test crashes at tsearch
Дата
Msg-id 49A43C1D.6070106@sigaev.ru
обсуждение исходный текст
Ответ на Re: regression test crashes at tsearch  ("Hiroshi Saito" <z-saito@guitar.ocn.ne.jp>)
Ответы Re: regression test crashes at tsearch
Список pgsql-hackers
> I think that Mr. Inoue's patch is right.
> why isn't it taken into consideration yet?

I can't check that patch because I don't have a Windows box.
But I did some investigations. As I understand, the patch prevents from calling 
of wcstombs/mbstowcs with C locale and I checked trace for that. But 
wcstombs/mbstowcs doesn't called at all with C-locale.  With C locale char2wchar 
calls pg_mb2wchar_with_len(), and char2wchar is called from single place: 
TParserInit. wchar2char isn't called at all. Next, regression tests are 
successfully passed until ispell_tst configuration was created. Looking at diff   SELECT to_tsquery('ispell_tst',
'footballyklubber:b& rebookings:A & sky');^M                                               to_tsquery
     ^M
 
! 
-----------------------------------------------------------------------------------------------------^M
!  'f':B & 'o':B & 'b':B & 'l':B & 'y':B & 'l':B & 'b':B & 'e':B & 'r':A & 'b':A 
& 'o':A & 'g':A & 'y'^M

I believe that even here parser is working correctly but there is problems in 
ispell.

So, although patch fixes the problem, it seems to me patch doesn't do it in 
right place. The patch converts multibyte string in non-utf encoding with 
C-locale into wide string by multibyte->utf8->wide conversation instead of 
pg_mb2wchar_with_len() call. Is output of pg_mb2wchar_with_len() compatible with 
isalpha (and others) functions?



-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Synchronous replication & Hot standby patches
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Synchronous replication & Hot standby patches