pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Andrew Sullivan <ajs@commandprompt.com>
To: pgsql-general@postgresql.org
Subject: Re: Dumping/Restoring with constraints?
Date: Wed, 27 Aug 2008 11:41:10 -0400
Message-ID: <20080827154109.GA18946@commandprompt.com> (raw )
In-Reply-To: <e373d31e0808270820ia11a515se1110775ab29e998@mail.gmail.com >
References: <e373d31e0808270619uba31c8eodc2c85662b85140a@mail.gmail.com >
<22708.1219845242@sss.pgh.pa.us >
<e373d31e0808270712n7c599a82sca5a6bbf6cc5c20a@mail.gmail.com >
<23571.1219848176@sss.pgh.pa.us >
<e373d31e0808270751m646aebb5ga122d0d8aa87fd11@mail.gmail.com >
<23743.1219848802@sss.pgh.pa.us >
<e373d31e0808270820ia11a515se1110775ab29e998@mail.gmail.com >
On Wed, Aug 27, 2008 at 11:20:55PM +0800, Phoenix Kiula wrote:
> This seems to be it. This is what I should be executing, except that
> it spews out many errors, like:
>
> ERROR: invalid byte sequence for encoding "UTF8": 0x80
You have bad data in your database. Apparently, you have an encoding
of UTF-8, but you have data in there that's not UTF-8 data. I'll bet
your other encoding is SQL_ASCII.
> This prevents my main table from being copied - Why can't the dump and
> the restore just copy the file as-is, including the encoding and such?
> What am I not doing right?
My bet is that you did initdb on one system with a locale of C and on
another with a locale of utf-8 (somehow). You can use pg_controldata
to find out: run it against the data areas on each system.
If I'm right, then you probably want to run initidb again on the
target system.
A
--
Andrew Sullivan
ajs@commandprompt.com
+1 503 667 4564 x104
http://www.commandprompt.com/
view thread (36+ messages) latest in thread
Message-ID: <20080827154109.GA18946@commandprompt.com>
Permalink: ../20080827154109.GA18946@commandprompt.com/
Also on: postgresql.org/message-id/20080827154109.GA18946@commandprompt.com
copy link · copy postgr.es
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: pgsql-admin@postgresql.org
Cc: ajs@commandprompt.com, pgsql-general@postgresql.org
Subject: Re: Dumping/Restoring with constraints?
In-Reply-To: <20080827154109.GA18946@commandprompt.com>
* 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