Re: Frustrated...pg_dump/restore

Поиск
Список
Период
Сортировка
От Marco Colombo
Тема Re: Frustrated...pg_dump/restore
Дата
Msg-id 48EF31B9.4050803@esiway.net
обсуждение исходный текст
Ответ на Re: Frustrated...pg_dump/restore  (Jeff Amiel <becauseimjeff@yahoo.com>)
Список pgsql-general
Jeff Amiel wrote:

> Ahhh....
> *looks at encoding*
>
> Well..they are both the same...BUT...they are set to
> ENCODING = 'SQL_ASCII';
>
> That explains a lot....they should probably be set to Unicode UTF8....
> Duh!!!!
>
> Any way to change encoding without dumping/restoring database?

You can change client encoding any time with the PGCLIENTENCODING
environment variable. AFAIK, there's no way to change the encoding of
a database, it's set at creation time.

But I think SQL_ASCII makes it less picky about the input, so that
might not be the source of your problem.

You should look at the errors you see _before_ the "invalid command \N".
I suspect a slight schema mismatch... that could cause a COPY to fail,
while an INSERT might still work.

How did you create the 'schema-only database'? With a
pg_dump --schema-only or with a different SQL script?

You may also try and pg_dump --schema-only both databases and diff
the output.

.TM.

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

Предыдущее
От: Sebastian Pawłowski
Дата:
Сообщение: flood in logs
Следующее
От: Jeng Yu
Дата:
Сообщение: Update Query Problem