Re: v8.3 + UTF8 errors when restoring DB

From: "Mitchell D(dot) Russell" <mitchell(dot)russell(at)gmail(dot)com>
To: "'pgsql-general'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: v8.3 + UTF8 errors when restoring DB
Date: 2008-03-09 18:49:11
Message-ID: 47d4312f.1d35640a.5d8d.3350@mx.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dean:

I did the dump as so:

Psql –Upostgres databasename > c:\temp\dump.sql

I think the database was set to SQL_ASCII before I dumped it, because when I did the 2nd restore last night to a new SQL_ASCII database, it worked fine, so that’s where I am at right now, the database is running fine on 8.3 as SQL_ASCII but I don’t want to keep it like that.

So what do you suggest I do now? Make another 8.3 database in UTF8 and dump the 8.3 SQL_ASCII one using –E with UTF8? What will it do to the characters that can’t be interpreted?

Thanks

Mitch

From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Dean Gibson (DB Administrator)
Sent: Sunday, March 09, 2008 9:58 AM
To: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] v8.3 + UTF8 errors when restoring DB

Well, you partially hosed yourself when you did the dump using a 'client_encoding' of 'SQL_ASCII'. If the 8.2 database is still around, redo pg_dump using the '-E' parameter to set the client_encoding to UTF-8, then import the data into your 8.3 database created with a UTF-8 encoding.

If you don't have the 8.2 server around any more, it's a bit more complicated. How did you do the pg_dump (what format)?

--
Mail to my list address MUST be sent via the mailing list.
All other mail to my list address will bounce.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Josh Berkus 2008-03-09 18:59:49 Re: Watch your PlanetPostgreSQL.org blogs
Previous Message Justin 2008-03-09 18:43:28 Re: how do you write aggregate function