Re: Chinese initdb on Windows

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Chinese initdb on Windows
Date: 2011-03-22 08:30:27
Message-ID: 4D885E23.6050906@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 22.03.2011 01:06, Tom Lane wrote:
> Heikki Linnakangas<heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
>> Any objections to the 2nd attached patch, which adds the mapping of
>> those locale names on Windows?
>
> I think the added initdb message isn't following our style guidelines
> --- it certainly doesn't match the adjacent existing message. Other
> than that quibble, ok here.

What you usually get is something like this:

> ...
> The database cluster will be initialized with locale Lithuanian_Lithuania.1257.
> The default database encoding has accordingly been set to WIN1257.
> initdb: could not find suitable text search configuration for locale Lithuanian_
> Lithuania.1257
> The default text search configuration will be set to "simple".
>
> creating directory data2 ... ok
> creating subdirectories ... ok
> ...

And when initdb falls back to UTF-8 with the patch you get:

> The database cluster will be initialized with locale Chinese (Simplified)_China.936.
> Encoding GBK implied by locale is not allowed as a server-side encoding.
> The default database encoding has been set to UTF8 instead.
> initdb: could not find suitable text search configuration for locale Chinese (Simplified)_China.936
> The default text search configuration will be set to "simple".
>
> creating directory data2 ... ok
> creating subdirectories ... ok
> ...

The new message fits in nicely with the surrounding messages IMHO. Or
are you thinking that it should be more warning like, similar to the
message about missing text search configuration? Something like:

> The database cluster will be initialized with locale Chinese
(Simplified)_China.936.
> initdb: encoding GBK implied by locale is not allowed as a
server-side encoding.
> The default database encoding has been set to UTF8 instead.
> initdb: could not find suitable text search configuration for locale
Chinese (Simplified)_China.936
> The default text search configuration will be set to "simple".
>
> creating directory data2 ... ok
> creating subdirectories ... ok
> ...

That's fine with me as well..

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2011-03-22 08:39:01 Re: Collations versus record-returning functions
Previous Message Heikki Linnakangas 2011-03-22 08:06:53 Re: How to look at the Expression Trees