From: Andrew Sullivan <ajs@commandprompt.com>
To: pgsql-general@postgresql.org
Subject: Re: Dumping/Restoring with constraints?
Date: Fri, 29 Aug 2008 09:34:36 -0400
Message-ID: <20080829133436.GG29463@commandprompt.com> (raw)
In-Reply-To: <e373d31e0808282253o13844c76odcd6f118fef4ff2e@mail.gmail.com>
References: <e373d31e0808270619uba31c8eodc2c85662b85140a@mail.gmail.com>
<48B5BC2A.5070104@wildenhain.de>
<e373d31e0808271651l6c7b99f0q960aaa5247b96b67@mail.gmail.com>
<20080828174712.GB27283@commandprompt.com>
<e373d31e0808282253o13844c76odcd6f118fef4ff2e@mail.gmail.com>
On Fri, Aug 29, 2008 at 01:53:28PM +0800, Phoenix Kiula wrote:
> My database encoding on BOTH the sides is UTF8. The dumped DB is UTF8.
Are you sure? I know people asked up-thread for the output of \l, but
I haven't seen it. If your encoding is UTF-8, then I don't understand
how you got non-UTF-8 characters in there, unless there's some bug in
the 8.2 series of which I'm unaware.
> The one I am importing into is also UTF8. So why is it showing me this
> error? Do I also have to look at stuff like "collation"?
You shouldn't have to. That's a constraint on sorting and such like.
It doesn't control what can get into the database.
Hmm. I wonder if the problem is the locale you're using for pg_dump
vs. what you're using when handing the data back in. If the locale
were different, it might be possible that your client_encoding was
different. I have no idea if this is the case, but you might want to
try it. Check your locale at the command line on each system.
> Also, how can I ensure that my dumped database on the server has only
> UTF8 data? What constraint or function can I use?
As I said before, if the database encoding is UTF-8, then it's
supposed to be _impossible_ that you get non-UTF-8 data in there.
That's the whole point of having the database encoding.
A
--
Andrew Sullivan
ajs@commandprompt.com
+1 503 667 4564 x104
http://www.commandprompt.com/
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: <20080829133436.GG29463@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