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

Re: Converting from LATIN1 to UNICODE encoding?

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Scott Eade <seade(at)backstagetech(dot)com(dot)au>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Converting from LATIN1 to UNICODE encoding?
Date: 2005-09-21 14:40:32
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
On Wed, Sep 21, 2005 at 06:16:31PM +1000, Scott Eade wrote:
> I have a database that was created using the LATIN1 encoding.
> Is it necessary for me to convert the database to some other encoding
> (e.g. UNICODE) before I can store non-LATIN1 characters or does
> PostgreSQL catch these and encode them somehow?
> I have actually been attempting to convert a database by doing a pg_dump
> (from the LATIN1 database) followed by a pg_restore (to one created with
> the UNICODE encoding).  Seemed to work with a sparsely populated 8.0.3
> database, but I am running into all sorts of problems with 7.3.10 (e.g.
> corrupted database followed by corrupted pg_clog).

Hmm.  Do tell, what database did you use as template?  Was it correctly
frozen?  If not, has it suffered from Xid wraparound?

Try dumping the template database.  If it succeeds, then it's OK.  If it
complains in the same way, with a missing pg_clog file, there lies the

Alvaro Herrera                      
"En las profundidades de nuestro inconsciente hay una obsesiva necesidad
de un universo lógico y coherente. Pero el universo real se halla siempre
un paso más allá de la lógica" (Irulan)

In response to

pgsql-admin by date

Next:From: Tom LaneDate: 2005-09-21 14:50:40
Subject: Re: Searching for a supposedly resolved bug report
Previous:From: Peter EisentrautDate: 2005-09-21 14:15:21
Subject: Re: Converting from LATIN1 to UNICODE encoding?

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