Skip site navigation (1) Skip section navigation (2)

Re: Problem restoring a dump

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: Johann Spies <jspies(at)sun(dot)ac(dot)za>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Problem restoring a dump
Date: 2011-09-14 01:56:27
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
On 09/13/2011 08:47 PM, Johann Spies wrote:
> Thanks Giulio and Gabriele,
>>      as Giulio pointed out, it seems like the destination database is in
>>   LATIN1 encoding, rather than UTF8. Could you please confirm this?
> That was the case.  I deleted one of the databases and recreated it with
> as a UTF-8 encoded database and the import went well.
> Question:  Can I change the encoding system of an existing database?  If
> so, how?
You can re-encode a dump (see pg_dump's -E flag) then reload it into a 
new database with the new encoding. This will only work if the source 
database contains only characters that exist in the target encoding.

You can't change the encoding of a database in-place.

Craig Ringer

Craig Ringer

In response to


pgsql-admin by date

Next:From: Mokhtary, MandanaDate: 2011-09-14 05:37:18
Subject: encoding problem
Previous:From: Craig RingerDate: 2011-09-14 01:53:00
Subject: Re: pg_upgrade --link

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group