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

Re: Problem restoring a dump

From: Gabriele Bartolini <Gabriele(dot)Bartolini(at)2ndQuadrant(dot)it>
To: giulio calacoci <giulio(dot)calacoci(at)2ndquadrant(dot)it>
Cc: Johann Spies <jspies(at)sun(dot)ac(dot)za>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Problem restoring a dump
Date: 2011-09-13 09:58:29
Message-ID: 196cf71cbca8f7fb8505fb2da9469fbe@2ndquadrant.it (view raw or flat)
Thread:
Lists: pgsql-admin
 Hi Johann,

    as Giulio pointed out, it seems like the destination database is in 
 LATIN1 encoding, rather than UTF8. Could you please confirm this?

    By reading the little information we have, it seems like you have an 
 export in UTF8 and you are trying to load it into a LATIN1 database. If 
 you specify the client_encoding you are actually informing psql that you 
 are reading UTF8 - which is probably fine given the above assumptions - 
 but that does not specify how the information is then stored in the 
 database. That's decided by the database encoding.

    Also, I suggest that you dump your database using the destination 
 version's pg_dump rather than the source's.

    Please keep us posted.

 Cheers,
 Gabriele

 On Tue, 13 Sep 2011 11:43:27 +0200, giulio calacoci 
 <giulio(dot)calacoci(at)2ndquadrant(dot)it> wrote:
> hi,
>
> the character that is giving you troubles is "orizontal ellipsis",
> this character does not exists in latin1 encoding, only in utf8, so
> database you dumped was utf8 encoded.
>
> i think the fastest way you have to solve the problem is:  change the
> encoding of the target database you are trying to restore.
>
> Regards
>
> Giulio.
>
> Il giorno 13/set/2011, alle ore 11.18, Johann Spies ha scritto:
>
>> Good day,
>>
>> I have installed postgresql 9.0 on my Debian and thought that 
>> restoring
>> the database would be as simple as psql -f <the dump made by 8.4's
>> pg_dumpall>.
>>
>> However: I get several errors like this:
>>
>> psql:pgdump.txt.1:4453471: ERROR:  character 0xe280a6 of encoding 
>> "UTF8"
>> has no equivalent in "LATIN1"
>>
>> I have changed the client-encoding of psql to UTF8 but I see after 
>> the
>> restore of the dump the encoding is still LATIN1.
>>
>> How do I overcome this?
>>
>> Regards
>> Johann
>> --
>> Johann Spies                            Telefoon: 021-808 4699
>> Databestuurder /  Data manager
>>
>> Sentrum vir Navorsing oor Evaluasie, Wetenskap en Tegnologie
>> Centre for Research on Evaluation, Science and Technology
>> Universiteit Stellenbosch.
>>
>>     "For my thoughts are not your thoughts, neither are
>>      your ways my ways, saith the LORD. For as the heavens
>>      are higher than the earth, so are my ways higher than
>>      your ways, and my thoughts than your thoughts."
>>                               Isaiah 55:8,9
>>
>> --
>> Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-admin

-- 
  Gabriele Bartolini - 2ndQuadrant Italia
  PostgreSQL Training, Services and Support
  Gabriele(dot)Bartolini(at)2ndQuadrant(dot)it - www.2ndQuadrant.it

In response to

Responses

pgsql-admin by date

Next:From: Johann SpiesDate: 2011-09-13 12:47:40
Subject: Re: Problem restoring a dump
Previous:From: giulio calacociDate: 2011-09-13 09:43:27
Subject: Re: Problem restoring a dump

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