public inbox for [email protected]  
help / color / mirror / Atom feed
From: Paul Lindner <[email protected]>
To: Tom Lane <[email protected]>
Cc: Paul Lindner <[email protected]>
Cc: Bruce Momjian <[email protected]>
Cc: Neil Conway <[email protected]>
Cc: [email protected]
Subject: Re: Upcoming PG re-releases
Date: Sun, 4 Dec 2005 08:40:54 -0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>

On Sun, Dec 04, 2005 at 11:34:16AM -0500, Tom Lane wrote:
> Paul Lindner <[email protected]> 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        ||||| | | | |  |  |  |   |   |
[email protected]


view thread (55+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Upcoming PG re-releases
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox