From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Tim Gustafson <tjg(at)ucsc(dot)edu> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Changing Character Sets |
Date: | 2013-02-12 17:00:41 |
Message-ID: | CABUevEyG9z3myG1peE2ExzKWrjkbcPyHQCLJQNvSENaEGp=9rw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Feb 12, 2013 at 5:34 PM, Tim Gustafson <tjg(at)ucsc(dot)edu> wrote:
> Is there any way to change the character set of a database and its tables?
>
> I did a pg_dumpall to upgrade from Postgres 8.4 to Postgres 9.2, and
> all the tables came back as UTF-8, and now Bacula is complaining that
> it wants SQL_ASCII encoding for everything. I don't see a flag on
> pg_dumpall or pg_restore to set which character encoding I'd like, and
> Google has failed me.
What you're looking for is to change the encoding, right, and not the locale?
You can't change the encoding of a database, but you can use a
different one when you create it - this can be specified in the CREATE
DATABASE statement.
You can also ask pg_dump to use a specific encoding using the -E
parameter. You can't do it on pg_dumpall, but you can do it if you use
pg_dump.
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Tim Gustafson | 2013-02-12 17:02:14 | Re: Changing Character Sets |
Previous Message | Tim Gustafson | 2013-02-12 16:34:10 | Changing Character Sets |