X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AB2E1D90DF for ; Wed, 21 Sep 2005 12:26:49 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 05943-05 for ; Wed, 21 Sep 2005 15:26:36 +0000 (GMT) Received: from mx1.surnet.cl (mx2.surnet.cl [216.155.73.181]) by svr1.postgresql.org (Postfix) with ESMTP id 885A6D99E1 for ; Wed, 21 Sep 2005 11:40:29 -0300 (ADT) Received: from unknown (HELO cluster.surnet.cl) ([216.155.73.165]) by mx1.surnet.cl with ESMTP; 21 Sep 2005 10:40:07 -0400 X-IronPort-AV: i="3.97,114,1125892800"; d="scan'208"; a="11072598:sNHT3130858610" Received: from alvh.no-ip.org (216.155.84.209) by cluster.surnet.cl (7.0.043) (authenticated as alvherre@surnet.cl) id 4327E85F000BCEF4; Wed, 21 Sep 2005 10:40:25 -0400 Received: by alvh.no-ip.org (Postfix, from userid 1000) id 3B4DFC2D451; Wed, 21 Sep 2005 10:40:32 -0400 (CLT) Date: Wed, 21 Sep 2005 10:40:32 -0400 From: Alvaro Herrera To: Scott Eade Cc: pgsql-admin@postgresql.org Subject: Re: Converting from LATIN1 to UNICODE encoding? Message-ID: <20050921144032.GD24138@surnet.cl> Mail-Followup-To: Scott Eade , pgsql-admin@postgresql.org References: <433116DF.7050108@backstagetech.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <433116DF.7050108@backstagetech.com.au> User-Agent: Mutt/1.5.10i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=2.391 required=5 tests=[AWL=-0.435, DNS_FROM_RFC_ABUSE=0.374, DNS_FROM_RFC_POST=1.376, FORGED_RCVD_HELO=0.05, RCVD_IN_NJABL_PROXY=1.026] X-Spam-Level: ** X-Archive-Number: 200509/219 X-Sequence-Number: 18956 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 problem. -- Alvaro Herrera http://www.planetpostgresql.org "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)