Re: invalid byte sequence for encoding error

Поиск
Список
Период
Сортировка
От Nis Jorgensen
Тема Re: invalid byte sequence for encoding error
Дата
Msg-id 446D912F.1030709@superlativ.dk
обсуждение исходный текст
Ответ на Re: invalid byte sequence for encoding error  ("Oliver A. Rojo" <oliverrojo@anticogroup.com>)
Список 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


В списке pgsql-general по дате отправления:

Предыдущее
От: "Oliver A. Rojo"
Дата:
Сообщение: Re: invalid byte sequence for encoding error
Следующее
От: "Qingqing Zhou"
Дата:
Сообщение: Re: Insert into partition table hangs