From: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
---|---|
To: | Hiroshi Saito <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp> |
Cc: | Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>, PG Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: regression test crashes at tsearch |
Date: | 2009-02-24 18:27:41 |
Message-ID: | 49A43C1D.6070106@sigaev.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2009-02-24 18:34:15 | Re: Synchronous replication & Hot standby patches |
Previous Message | Heikki Linnakangas | 2009-02-24 17:37:59 | Re: Synchronous replication & Hot standby patches |