Re: copying a large database to change encoding

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: copying a large database to change encoding
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B17D7469C@ntex2010a.host.magwien.gv.at
обсуждение исходный текст
Ответ на copying a large database to change encoding  (Matthew Chambers <mchambers@wetafx.co.nz>)
Список pgsql-general
Matthew Chambers wrote:
> Would something like this work best, or is it better to use pgdump?
> 
> CREATE DATABASE newDatabase TEMPLATE oldDatabase ENCODING 'UTF8'
> 
> Does using a template  do a file system copy or just SQL copy everything over?

Using the old database as template will not change the encoding,
so I think that will not work at all.

The documentation says:
  The encoding and locale settings must match those of the template database,
  except when template0 is used as template.

Did you try it?

I think you will have to dump/restore.

Yours,
Laurenz Albe

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

Предыдущее
От: Abelard Hoffman
Дата:
Сообщение: Will pg_repack improve this query performance?
Следующее
От: Alban Hertroys
Дата:
Сообщение: Re: Will pg_repack improve this query performance?