Skip site navigation (1) Skip section navigation (2)

Re: BUG #3924: Create Database with another encoding as the encoding from postgres

From: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
To: "Stefan Kunick" <stefan(at)kunick(dot)org>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #3924: Create Database with another encoding as the encoding from postgres
Date: 2008-02-02 20:35:12
Message-ID: 47A4D400.2030200@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-bugs
Stefan Kunick wrote:
> PostgreSQL version: 8.3RC2
> Operating system:   Windows Longhorn
> Description:        Create Database with another encoding as the encoding
> from postgres
> Details: 
> 
> I installed postgres with the encoding 1252. After this, i started the
> program createdb (createdb -E LATIN1 -O postgres -p 5555 -U postgres). The
> program stopped with the error message: createdb: database creation failed.
> Error: encoding LATIN1 does not match server's locale German_Germany.1252
> DETAIL: The server's LC_CTYPE setting requires encoding WIN1252.
> 
> With the former version 8.2, i can create a database with other encoding

Yes, that's an intentional change. From release notes:

> Disallow database encodings that are inconsistent with the server's locale setting (Tom)
> 
> On most platforms, C locale is the only locale that will work with any database encoding. Other locale settings imply a specific encoding and will misbehave if the database encoding is something different. (Typical symptoms include bogus textual sort order and wrong results from upper() or lower().) The server now rejects attempts to create databases that have an incompatible encoding. 

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2008-02-02 20:40:15
Subject: Re: BUG #3925: You can delete enum elements from pg_enum, but it is used in a table
Previous:From: Peter EisentrautDate: 2008-02-02 19:45:12
Subject: Re: BUG #3924: Create Database with another encoding as the encoding from postgres

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group