Cant create database on remote postgresql server

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

Cant create database on remote postgresql server

Postby Winterdaerm » Mon Nov 22, 2010 9:59 am

I set up a remote server but on debian 5.0 (postgresql 8.3.11 with schemas).
But when i try to create a db in PT3 i get the following error.

Unable to create PostgreSQL database: PT3_DB
Reason: Unable to execute query: CREATE DATABASE "PT3_DB" WITH TEMPLATE = template0 ENCODING = 'SQL_ASCII';; Reason: Fatal Error (ERROR: encoding SQL_ASCII does not match server's locale en_US.UTF-8 DETAIL: The server's LC_CTYPE setting requires encoding UTF8. )


I looked into the postgresql.conf but there is no lc_type to change.

Any idea as to what i should do?
When i try to run the command that is shown in the errormesasage directly in the psql command window it works, and creates a DB.
Winterdaerm
 
Posts: 9
Joined: Thu May 29, 2008 2:59 am

Re: Cant create database on remote postgresql server

Postby kraada » Mon Nov 22, 2010 10:36 am

It sounds like this is a Debian specific issue as they've added a patch to disallow locales that aren't installed by default (see here). However, I think (I'm not running Debian anymore so I can't check) that if you install the locales-all package and dpkg --reconfigure locales you should be able to add the ASCII (or POSIX) locale which should be sufficient to get you going.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Cant create database on remote postgresql server

Postby Winterdaerm » Mon Nov 22, 2010 11:53 am

There are no ascii encodings to choose from when reconfiguring locales.
ONly country specific iso and utf sets.
Hm any other way to work around this?
Winterdaerm
 
Posts: 9
Joined: Thu May 29, 2008 2:59 am

Re: Cant create database on remote postgresql server

Postby kraada » Mon Nov 22, 2010 3:07 pm

POSIX isn't available? I know we plan to move to UTF-8 support eventually but I don't have a timeframe on that at this point.

I'm not having any trouble in Ubuntu setting this up, for what it's worth. Perhaps if you recompiled PostgreSQL from tarball it would work properly?
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 43 guests

cron
highfalutin