Search Postgresql Archives

Re: copying a large database to change encoding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux