restore encoding problem - Mailing list pgsql-general

From Sim Zacks
Subject restore encoding problem
Date
Msg-id 4CE51CF6.5000205@compulab.co.il
Whole thread Raw
List pgsql-general
I have a backup from an 8.2 UTF8 database and I am trying to restore it
into another 8.2 UTF8 database.

I have tried restoring it on the same machine and a different machine. I
don't know how the character got in, but t looks like it has been there
for about a year.


The backup is taken by pg_dump -Fc so the file is not editable (or is it).


One table is not importing because of the error:

> pg_restore: [archiver (db)] Error from TOC entry 6912; 0 18769241
> TABLE DATA emaildetails postgres
>
> pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte sequence
> for encoding "UTF8": 0xa9
>
> 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 emaildetails, line 13237
>
>
Is there any way to either fix the backup file or get it to ignore that
one error?


Thanks

Sim


pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: plpgsql, Exception handling: catching the message ?
Next
From: Andres Freund
Date:
Subject: Re: ERROR row is too big size 9336, exceeds size 8160 when populating record with tsquery and tsvector fields