Skip site navigation (1) Skip section navigation (2)

Re: ERROR: translation failed from server encoding to wchar_t

From: ilanco(at)gmail(dot)com
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ERROR: translation failed from server encoding to wchar_t
Date: 2008-01-07 20:27:02
Message-ID: 72972bae-bfa7-401e-b74d-e930915ffa2d@i72g2000hsd.googlegroups.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Found something interesting with this testcase.
update fails after SELECT query.
Can anyone confirm this ???


dbname=> UPDATE dbmail_messageblks SET idxFTI=to_tsvector('simple',
encode(messageblk, 'escape')) where messageblk_idnr = 12949;
UPDATE 1
dbname=> UPDATE dbmail_messageblks SET idxFTI=to_tsvector('simple',
encode(messageblk, 'escape')) where messageblk_idnr = 12949;
UPDATE 1
dbname=> select * from dbmail_messageblks where messageblk_idnr =
12949;
 messageblk_idnr | physmessage_id
|
messageblk
| blocksize | is_header |
idxfti
-----------------+----------------
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-----------+-----------
+-------------------------------------------------------------------------------------------------
           12949 |           6319 | l'\351quipe de Casinos-park a bien
re\347u votre messsage. \012\012Vous aurez une r\351ponse d\350s que
l'un de nos responsables aura pris connaissance de votre envoi.
\012\012cordialement\012\012l'\351quipe de casinos-park.
\012\012====================\012\012The team of Casinos-park received
your messsage.\012\012You will have an answer as soon as one of our
persons in charge takes note of your sending. \012\012Best regards
\012\012The team of casinos-park.\012 |       398 |         0 | '=':3
'e':5 'h':11 'i':2,10 'k':12 'l':1 'o':7 'p':9,16 'r':8 's':6 't':13
'u':15 'y':14 'rk':4
(1 row)

dbname=> UPDATE dbmail_messageblks SET idxFTI=to_tsvector('simple',
encode(messageblk, 'escape')) where messageblk_idnr = 12949;
ERROR:  translation failed from server encoding to wchar_t
dbname=> UPDATE dbmail_messageblks SET idxFTI=to_tsvector('simple',
encode(messageblk, 'escape')) where messageblk_idnr = 12949;
UPDATE 1


On Jan 7, 10:21 pm, ila(dot)(dot)(dot)(at)gmail(dot)com wrote:
> http://pastebin.ca/845670
>
> This url provides a testcase ...
>
> fisrt pass :
> => UPDATE dbmail_messageblks SET idxFTI=to_tsvector('simple',
> encode(messageblk, 'escape')) where messageblk_idnr = 12949;
> ERROR:  translation failed from server encoding to wchar_t
>
> second pass :
> => UPDATE dbmail_messageblks SET idxFTI=to_tsvector('simple',
> encode(messageblk, 'escape')) where messageblk_idnr = 12949;
> UPDATE 1
>
> The to_tsvector seems to accept the row at random ...
>
> On Jan 7, 9:16 pm, ila(dot)(dot)(dot)(at)gmail(dot)com wrote:
>
> > I am using tsearch2 with pgsql 8.2.5 and get the following error when
> > calling to_tsvector :
> > "translation failed from server encoding to wchar_t"
>
> > My database is UTF8 encoded and the data sent to to_tsvector comes
> > from a bytea column converted to text with
> > encode(COLUMN, 'escape').
>
> > In 8.1 with tsearch2 it worked perfectly ...
>
> > Thanks for you help,
>
> > ilan


In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-01-07 20:31:15
Subject: Re: Bug: Unreferenced temp tables disables vacuum to update xid
Previous:From: ilancoDate: 2008-01-07 20:21:15
Subject: Re: ERROR: translation failed from server encoding to wchar_t

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group