From: | teodor(at)postgresql(dot)org (Teodor Sigaev) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix usage of char2wchar/wchar2char. |
Date: | 2009-03-02 15:13:17 |
Message-ID: | 20090302151317.D4C187559ED@cvs.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Log Message:
-----------
Fix usage of char2wchar/wchar2char. Changes:
- pg_wchar and wchar_t could have different size, so char2wchar
doesn't call pg_mb2wchar_with_len to prevent out-of-bound
memory bug
- make char2wchar/wchar2char symmetric, now they should not be
called with C-locale because mbstowcs/wcstombs oftenly doesn't
work correct with C-locale.
- Text parser uses pg_mb2wchar_with_len directly in case of
C-locale and multibyte encoding
Per bug report by Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp> and
following discussion.
Backpatch up to 8.2 when multybyte support was implemented in tsearch.
Tags:
----
REL8_2_STABLE
Modified Files:
--------------
pgsql/contrib/tsearch2:
ts_locale.c (r1.7.2.1 -> r1.7.2.2)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/tsearch2/ts_locale.c?r1=1.7.2.1&r2=1.7.2.2)
pgsql/contrib/tsearch2/wordparser:
parser.c (r1.11.2.2 -> r1.11.2.3)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/tsearch2/wordparser/parser.c?r1=1.11.2.2&r2=1.11.2.3)
parser.h (r1.11 -> r1.11.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/tsearch2/wordparser/parser.h?r1=1.11&r2=1.11.2.1)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-03-02 21:18:43 | pgsql: When we are in error recursion trouble, arrange to suppress |
Previous Message | Teodor Sigaev | 2009-03-02 15:11:25 | pgsql: Fix usage of char2wchar/wchar2char. |