Re: Dumping/Restoring with constraints?

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: Dumping/Restoring with constraints?
Дата
Msg-id 20080827154109.GA18946@commandprompt.com
обсуждение исходный текст
Ответ на Re: Dumping/Restoring with constraints?  ("Phoenix Kiula" <phoenix.kiula@gmail.com>)
Ответы Re: Dumping/Restoring with constraints?  ("Phoenix Kiula" <phoenix.kiula@gmail.com>)
Список pgsql-general
On Wed, Aug 27, 2008 at 11:20:55PM +0800, Phoenix Kiula wrote:

> This seems to be it. This is what I should be executing, except that
> it spews out many errors, like:
>
>    ERROR:  invalid byte sequence for encoding "UTF8": 0x80

You have bad data in your database.  Apparently, you have an encoding
of UTF-8, but you have data in there that's not UTF-8 data.  I'll bet
your other encoding is SQL_ASCII.

> This prevents my main table from being copied - Why can't the dump and
> the restore just copy the file as-is, including the encoding and such?
> What am I not doing right?

My bet is that you did initdb on one system with a locale of C and on
another with a locale of utf-8 (somehow).  You can use pg_controldata
to find out: run it against the data areas on each system.

If I'm right, then you probably want to run initidb again on the
target system.

A

--
Andrew Sullivan
ajs@commandprompt.com
+1 503 667 4564 x104
http://www.commandprompt.com/

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

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: Dumping/Restoring with constraints?
Следующее
От: Bill Moran
Дата:
Сообщение: Re: Dumping/Restoring with constraints?