Обсуждение: error creating database

Поиск
Список
Период
Сортировка

error creating database

От
Geoffrey
Дата:
I'm trying to reload a database and I'm receiving the following error:

pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 5181; 1262 45260
DATABASE nev postgres
pg_restore: [archiver (db)] could not execute query: ERROR:  encoding
LATIN1 does not match server's locale en_US.UTF-8
DETAIL:  The server's LC_CTYPE setting requires encoding UTF8.
     Command was:
CREATE DATABASE nev WITH TEMPLATE = template0 ENCODING = 'LATIN1';

This backup was created on another machine, so it must be that the
enviroment on the two machines is different.

Where do I look to fix this?

Thanks.

--
Until later, Geoffrey

"I predict future happiness for America if they can prevent
the government from wasting the labors of the people under
the pretense of taking care of them."
- Thomas Jefferson

Re: error creating database

От
Chris Barnes
Дата:
 
This depends on your OS. If you are running (linux) redhat or centos you would edit this file /etc/sysconfig/i18n
and change your locale to, for example. Save it and reboot.
 
There are probably ways around this when creating the database, but we install our OS with this in mind.
 
 
LANG="en_US.UTF-8"
SYSFONT="latarcyrheb-sun16"
 
> Date: Wed, 17 Feb 2010 09:15:56 -0500
> From: lists@serioustechnology.com
> To: pgsql-general@postgresql.org
> Subject: [GENERAL] error creating database
>
> I'm trying to reload a database and I'm receiving the following error:
>
> pg_restore: [archiver (db)] Error while PROCESSING TOC:
> pg_restore: [archiver (db)] Error from TOC entry 5181; 1262 45260
> DATABASE nev postgres
> pg_restore: [archiver (db)] could not execute query: ERROR: encoding
> LATIN1 does not match server's locale en_US.UTF-8
> DETAIL: The server's LC_CTYPE setting requires encoding UTF8.
> Command was:
> CREATE DATABASE nev WITH TEMPLATE = template0 ENCODING = 'LATIN1';
>
> This backup was created on another machine, so it must be that the
> enviroment on the two machines is different.
>
> Where do I look to fix this?
>
> Thanks.
>
> --
> Until later, Geoffrey
>
> "I predict future happiness for America if they can prevent
> the government from wasting the labors of the people under
> the pretense of taking care of them."
> - Thomas Jefferson
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general


All your Hotmail contacts on your phone. Try it now.