Re: invalid byte sequence for encoding error

From: Nis Jorgensen <nis(at)superlativ(dot)dk>
To: oliverrojo(at)anticogroup(dot)com
Cc: Postgresql Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: invalid byte sequence for encoding error
Date: 2006-05-19 09:34:39
Message-ID: 446D912F.1030709@superlativ.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Oliver A. Rojo wrote:
> Nis Jorgensen wrote:
>
>> Oliver A. Rojo wrote:
>>
>>> Hi!
>>>
>>> I've just recently upgraded my database from 7.4.8 to 8.0.1. Im
>>> dumping data i got from my old db to my new db but eventually an
>>> error occured

>> I fixed it by fixing the original db and dumping again. If this is not
>> desirable you can of course restore to a clean 7.4.8, fix, dump.

> hi!
> how do you fix your original db?
>

Since I had only 3 occurrences of the error, I used hand-crafted update
statements. The fact that the replacement for the invalid characters was
constant and plain ascii made this very easy.

If you have many occurrences of the error, or if you need to do
replacement based on the invalid bytes, things become trickier. You
might even be better of working on the dump file directly using
perl/<favourite scripting language>

/Nis

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Markus Wollny 2006-05-19 09:48:45 Re: invalid byte sequence for encoding error
Previous Message Oliver A. Rojo 2006-05-19 08:50:15 Re: invalid byte sequence for encoding error