BUG #3766: tsearch2 index creation error

Started by Thomas H.over 18 years ago6 messagesbugs
Jump to latest
#1Thomas H.
me@alternize.com

The following bug has been logged online:

Bug reference: 3766
Logged by: Thomas Haegi
Email address: me@alternize.com
PostgreSQL version: 8.3b3
Operating system: Windows 2003
Description: tsearch2 index creation error
Details:

when following the documentation
(http://www.postgresql.org/docs/8.3/static/textsearch-tables.html), the
creation of an gin tsearch index fails:

CREATE INDEX posts_fts_idx ON forum.posts USING gin(to_tsvector('english',
p_msg_clean));

ERROR: translation from wchar_t to server encoding failed: No error

********** Error **********

ERROR: translation from wchar_t to server encoding failed: No error
SQL state: 22021

field p_msg_clean is TEXT (unlimited), db encoding is UTF8.

- thomas

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Thomas H. (#1)
Re: BUG #3766: tsearch2 index creation error

"Thomas Haegi" <me@alternize.com> writes:

Operating system: Windows 2003

CREATE INDEX posts_fts_idx ON forum.posts USING gin(to_tsvector('english',
p_msg_clean));
ERROR: translation from wchar_t to server encoding failed: No error

Hmm. That error message is close to some code that is specific to the
Windows-and-UTF8 case, which might explain why I don't see it.

Can any Windows hackers check into whether the WIN32 coding in
wchar2char() and char2wchar() in ts_locale.c is sane?

regards, tom lane

#3Thomas H.
me@alternize.com
In reply to: Tom Lane (#2)
Re: BUG #3766: tsearch2 index creation error

Tom Lane wrote:

Operating system: Windows 2003

CREATE INDEX posts_fts_idx ON forum.posts USING gin(to_tsvector('english',
p_msg_clean));
ERROR: translation from wchar_t to server encoding failed: No error

Hmm. That error message is close to some code that is specific to the
Windows-and-UTF8 case, which might explain why I don't see it.

Can any Windows hackers check into whether the WIN32 coding in
wchar2char() and char2wchar() in ts_locale.c is sane?

has anyone had the chance to look into that problem? i'd be more than
willing to help testing an updated build if needed.

thanks,
thomas

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Thomas H. (#3)
Re: BUG #3766: tsearch2 index creation error

"Thomas H." <me@alternize.com> writes:

Tom Lane wrote:

Can any Windows hackers check into whether the WIN32 coding in
wchar2char() and char2wchar() in ts_locale.c is sane?

has anyone had the chance to look into that problem? i'd be more than
willing to help testing an updated build if needed.

After re-reading Microsoft's man pages I think I see the problem ---
attached patch is applied.

regards, tom lane

#5Thomas H.
me@alternize.com
In reply to: Tom Lane (#4)
Re: BUG #3766: tsearch2 index creation error

tom lane wrote:

Can any Windows hackers check into whether the WIN32 coding in
wchar2char() and char2wchar() in ts_locale.c is sane?

has anyone had the chance to look into that problem? i'd be more than
willing to help testing an updated build if needed.

After re-reading Microsoft's man pages I think I see the problem ---
attached patch is applied.

thank you for taking a shot at the problem. unfortunately, i still
couldn't get around to get a mvc build environement up & running so i
can not compile the patch myself.

if any of the win32-hackers (magnus?) can provide me with a binary, i
can test it. else i'll wait for the next official build.

thanks,
thomas

#6Thomas H.
me@alternize.com
In reply to: Tom Lane (#4)
Re: BUG #3766: tsearch2 index creation error

Tom Lane wrote:

"Thomas H." <me@alternize.com> writes:

Tom Lane wrote:

Can any Windows hackers check into whether the WIN32 coding in
wchar2char() and char2wchar() in ts_locale.c is sane?

has anyone had the chance to look into that problem? i'd be more than
willing to help testing an updated build if needed.

After re-reading Microsoft's man pages I think I see the problem ---
attached patch is applied.

regards, tom lane

tsearch2 works fine now in the official win32 b4 build

thanks,
thomas