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

BUG #5164: COPY command: invalid byte sequence 0x80

From: "Bogdan Mihaila" <bm2004mvc(at)yahoo(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5164: COPY command: invalid byte sequence 0x80
Date: 2009-11-04 09:05:55
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      5164
Logged by:          Bogdan Mihaila
Email address:      bm2004mvc(at)yahoo(dot)com
PostgreSQL version: 8.1 and 8.3
Operating system:   Linux
Description:        COPY command: invalid byte sequence 0x80


I searched the internet for this problem, but I didn't find an answer.
Please help me.

I make a COPY TO command (in a 8.1 version, under Linux) for a table that
contains text in the UTF-8 encoding. The command is:

set client_encoding = 'utf8';
DROP TABLE "acte1";
    SELECT * FROM "Oficiale"."acte" WHERE id = 57502;
COPY "acte1" TO '/home/bogdanm/eugen.copy';

Then I make a COPY FROM (in a 8.3 version,under the same Linux machine as
above) like this:

set client_encoding = 'utf8';
copy "Oficiale"."acte" from '/home/bogdanm/eugen.copy'

It works!

But, where I specify the interval like this:

WHERE id > 57500 and id < 57600;

it doesn't work, saying:

ERROR:  invalid byte sequence for encoding "UTF8": 0x80
HINT:  This error can also happen if the byte sequence does not match the
encoding expected by the server, which is controlled by "client_encoding".
CONTEXT:  COPY acte, line 51

Why is that? The second range obviously contains the first...

Thanks very much in advance,


pgsql-bugs by date

Next:From: Fujii MasaoDate: 2009-11-04 10:40:19
Subject: Re: BUG #4961: pg_standby.exe crashes with no args
Previous:From: Craig RingerDate: 2009-11-04 04:44:39
Subject: Re: BUG #5163: Admin can't connect and won't use port 5432

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