Re: How to find correct locale name for CREATE DATABASE

From: Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
To: Andrus <kobruleht2(at)hot(dot)ee>
Cc: "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 CREATE DATABASE
Date: 2010-12-01 22:33:31
Message-ID: 500F33EF-755C-4C57-A286-538B2801B749@solfertje.student.utwente.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 1 Dec 2010, at 21:46, Andrus wrote:

> Alban,
>
>> Seriously though, functionality like that has no place in a database server. That's the responsibility of the OS, or if it lacks in that respect, for third-party tools.
>
> Thank you.
> So only portable way is to probe Postgres 9 locales using CREATE DATABASE command with expected locale names hoping that some call suceeds?

Well... if you really have to insist on using Postgres to determine system locales, I suppose you could do that - just like you can use a crane to park your car. It's not a very sensible thing to attempt before looking at alternative solutions though.

I imagine there must be tools for that purpose, or otherwise some programming language will probably have functions for this that you can use. Using the database server for this would be the last thing I'd try.
I can't say I'm too well-versed in locale usage though, I usually just stick with English.

Alban Hertroys

--
Screwing up is an excellent way to attach something to the ceiling.

!DSPAM:737,4cf6cd4e802658319426940!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vick Khera 2010-12-01 22:35:50 Re: Cannot start Postgres- FATAL: invalid cache id: 19
Previous Message Dmitriy Igrishin 2010-12-01 22:28:47 Re: Proper Permissions for /usr/local/pgsql/data