From: Tom Lane <tgl@sss.pgh.pa.us>
To: Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
Cc: Roman Neuhauser <neuhauser@sigpipe.cz>
Cc: Pgsql-sql@postgresql.org <Pgsql-sql@postgresql.org>
Cc: Pgsql-General <pgsql-general@postgresql.org>
Subject: Re: [SQL] How do I copy part of table from db1 to db2 (and
Date: Wed, 31 Aug 2005 10:29:49 -0400
Message-ID: <1677.1125498589@sss.pgh.pa.us> (raw)
In-Reply-To: <1125489603.9456.24.camel@Panoramix>
References: <1125482430.9456.6.camel@Panoramix>
<20050831104011.GB74859@isis.sigpipe.cz>
<1125489603.9456.24.camel@Panoramix>
Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl> writes:
> I am afraid that the problem is more complex. The original database
> (which is created with SQL_ASCII) contains invalid byte sequences in
> some columns (target database created with UNICODE):
There is no magic bullet to make bad data better. If the original data
is all in a specific encoding that happens not to be unicode, then you
can get Postgres to translate it for you --- just edit the dump file and
change CLIENT_ENCODING to the real original encoding before reloading.
If, as seems more likely, there's a mishmash of different encodings then
you are in for some pain. At the minimum you'll have to separate out
the rows that are in each encoding so you can pass them through
different conversion processes.
regards, tom lane
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: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, J.Kraaijeveld@Askesis.nl, neuhauser@sigpipe.cz, pgsql-general@postgresql.org
Subject: Re: [SQL] How do I copy part of table from db1 to db2 (and
In-Reply-To: <1677.1125498589@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox