Re: Upcoming PG re-releases

From: Paul Lindner <lindner(at)inuus(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Paul Lindner <lindner(at)inuus(dot)com>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Neil Conway <neilc(at)samurai(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Upcoming PG re-releases
Date: 2005-12-04 16:40:54
Message-ID: 20051204164054.GE10317@inuus.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-www

On Sun, Dec 04, 2005 at 11:34:16AM -0500, Tom Lane wrote:
> Paul Lindner <lindner(at)inuus(dot)com> writes:
> > To convert your pre-8.1 database to 8.1 you may have to remove and/or
> > fix the offending characters. One simple way to fix the problem is to
> > run your pg_dump output through the iconv command like this:
>
> > iconv -c -f UTF8 -t UTF8 -o fixed.sql dump.sql
>
> Is that really a one-size-fits-all solution? Especially with -c?
>

I'd say yes, and the -c flag is needed so iconv strips out the
invalid characters.

This technique worked for some smaller databases I converted and
croaked with out-of-memory on the larger ones.

It certainly doesn't make the problem worse.

If one wanted to fix this in the general case one could duplicate the
iconv behavior in the Postgres code via some kind of special
flag/setting that is only used for imports..

set strip_bad_utf8 = on

--
Paul Lindner ||||| | | | | | | | | |
lindner(at)inuus(dot)com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-12-04 16:52:45 Re: Upcoming PG re-releases
Previous Message Tom Lane 2005-12-04 16:34:16 Re: Upcoming PG re-releases

Browse pgsql-www by date

  From Date Subject
Next Message Tom Lane 2005-12-04 16:52:45 Re: Upcoming PG re-releases
Previous Message Tom Lane 2005-12-04 16:34:16 Re: Upcoming PG re-releases