Re: How to find correct locale name for CREATEDATABASE

From: "Andrus" <kobruleht2(at)hot(dot)ee>
To: "Alban Hertroys" <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
Cc: "Craig Ringer" <craig(at)postnewspapers(dot)com(dot)au>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>, "Thom Brown" <thom(at)linux(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to find correct locale name for CREATEDATABASE
Date: 2010-12-02 17:53:58
Message-ID: FA8EBBDD90A64C569E427DC3CD737E48@andrusnotebook
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> However, if the locale that your database needs isn't available, what did
> you intend to do about that? You can't just pick a different one, it
> probably wouldn't behave the same. Apparently you can't just use the
> default locales either, or you wouldn't be asking about this.

I'm trying to create portable application which can automatically create
database using estonian locale in any server.
Postgres returns different values for same locale:

In Fedora et_EE.UTF8
Other linuxes et_EE.UTF-8
In Windows Estonian_Estonia.1257
In some other Linuxes something like Estonian.Estonia

For this reason I'm looking for a way to probe server for locale existence.

> If the locale you need isn't available on the server and you don't have
> shell access to it, then you'll have to contact the server administrators
> to _make_ the locale available.
> That means that either the OS doesn't have the required locale, or the
> database cluster was initialised with an incompatible default locale -
> neither of these situations can be solved by trying CREATE DATABASE with a
> different locale, not if the locale mattered in the first place.

My locale may be available but it can have at least four different values
depending on server.
No need to disturb admins.

Andrus.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2010-12-02 18:30:35 Re: How to find correct locale name for CREATEDATABASE
Previous Message Merlin Moncure 2010-12-02 17:34:04 Re: [REPOST] plpgsql : looping over multidimensional array : getting NULL for subdimension