Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 605921DACBC1 for ; Wed, 4 Jan 2012 10:33:20 -0400 (AST) Received: from mail-iy0-f174.google.com ([209.85.210.174]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RiRu3-00045M-Aw for pgsql-admin@postgresql.org; Wed, 04 Jan 2012 14:33:19 +0000 Received: by iaeh11 with SMTP id h11so32636385iae.19 for ; Wed, 04 Jan 2012 06:33:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=x38B5r+8aWA4AGZseeNOFK27Ea6t9T00NafwMwxJecs=; b=Hs6e/eifoqb+EMGHRzeYQh8UGkSiDsEG9xLU0qgQiqd5k4rkWI59MuBVL9G5eaROpy 9p3i3mY0H+9YzuS8jG6VZKB0Ahd3Tbb+FaNCRLib3rhKxmJOIyA20kCZU+hrfhkgLuOW QFte9qlzSm9xKW5/H6/C9zonQdnzGfNpDuBDI= Received: by 10.42.168.135 with SMTP id w7mr32975300icy.9.1325687586869; Wed, 04 Jan 2012 06:33:06 -0800 (PST) Received: from [192.168.11.2] ([114.95.162.169]) by mx.google.com with ESMTPS id h9sm189950769ibh.11.2012.01.04.06.33.03 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 04 Jan 2012 06:33:05 -0800 (PST) Message-ID: <4F04631C.7040007@gmail.com> Date: Wed, 04 Jan 2012 22:33:00 +0800 From: Rural Hunter User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: invalid byte sequence for encoding "UTF8": 0xf480 Content-Type: text/plain; charset=GB18030; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201201/12 X-Sequence-Number: 38924 My db is in UTF-8 encoding. When I tried to generate gist index for some rows I got the strange error: select to_tsvector('chinesecfg',content) from article where article_id=23834922; ERROR: invalid byte sequence for encoding "UTF8": 0xf480 However, "select content from article where article_id=23834922" works just fine and shows good content. Why the to_tsvector reported invalid byte sequence since the 'content' already exists in db as UTF-8?