Re: Eliminating bad characters from a database for upgrading from 7.4 to 8.1

From: Vivek Khera <vivek(at)khera(dot)org>
To: "Pgsql-General(at)Postgresql(dot)Org general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Eliminating bad characters from a database for upgrading from 7.4 to 8.1
Date: 2006-11-20 16:17:39
Message-ID: 69B96115-2165-4F62-836A-ECD67BF46453@khera.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Nov 16, 2006, at 10:38 PM, Gregory S. Williamson wrote:

> Try converting the dump files encoding to UTF-8. before 8.1 you could
> insert invalid characters into the DB because it accepted other
> encodings. It will also dump other encoding. For example, converting
> something with windows characters in it.
>
> iconv -f "WINDOWS-1251" -t "UTF-8" dump_file > converted_dump_file
>
> And import the converted file. you may need to try a couple of
> different input encodings if you aren't sure what encoding was used
> when
> inserting data into the DB.

I had a similar situation a few months back. I just ended up doing a
translation from UTF8 to UTF8 and dropping bad characters. The db
itself had multiple different encodings for different records: some
were windows encoding, some were other. It was just a mess. I'm
glad 8.1 is more strict about this!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-11-20 16:20:41 Re: [GENERAL] Shutting down a warm standby database in 8.2beta3
Previous Message Tomasz Ostrowski 2006-11-20 15:59:01 Re: functions: stable/volatile