Re: [HACKERS] Multibyte in autoconf - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] Multibyte in autoconf
Date
Msg-id Pine.LNX.4.20.9912082106030.389-100000@localhost.localdomain
Whole thread Raw
In response to Re: [HACKERS] Multibyte in autoconf  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Responses Re: [HACKERS] Multibyte in autoconf
List pgsql-hackers
On 1999-12-08, Tatsuo Ishii mentioned:

> 1) initdb with no encoding augument (suppose that SQL_ASCII is set as
> the default encoding in template1)
> 
> 2) a user creates a database with no encoding augument. he thought
> that the default encoding is EUC_JP.

Why would the user think that? Can't he check if he's not sure? Call his
db admin? Or did the db admin mess up the initdb?

> 
> 3) he makes a table then fills it with some Japanese data.
> 
> 4) later he pulls data from the table and found that it no longer
> Japanese!

That really doesn't have anything to do with what I'm getting at. This is
just a naive user, quite honestly.

> So you think a postgres package with multibyte/locale/cyrillic options
> enabled is a good thing for everyone? At least I don't like locale
> option. It is not only useless for multibyte languages such as
> Japanese, but it makes slow for text comparison. I wouldn't say locale
> is useless for everyone, however. I admit it is usefull for single
> byte encodings.

(Locale doesn't only affect language matters, but also currenct
formatting, number display, etc.)

The performance problems with locale is a deficiency which will get fixed.
But that doesn't mean we have to block this path via other means. But that
was not the point. The point was that what we have here is a default for a
default. And moreover a default for an action you only do once. If you
init a database system, you make then and there (and only there) a
decision what you are going to do, tell your users about it and everyone
is happy. That's not any more complicated than it is now, only that it
moves runtime behaviour to run time programs and leaves build time
decisions with configure time programs.

Now you would do:
./configure --with-mb=FOO
make
make install
initdb

With the proposal you could do:
./configure --enable-multibyte
make
make install

initdb -E FOO # if you want multibyte in all your databases
--or--
initdb        # if you don't want multibyte by default but want             # to keep the option for individual cases

The fact that you have configured with --enable-multibyte doesn't mean you
have to use it. Just because a program is locale capable, doesn't mean you
have to decide on the default locale at compile time.

> I think it would be very hard to make a unified ideal package for
> everyone.

That's what packages try to achieve. We shouldn't make it harder for them.

-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden





pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: More initdb follies
Next
From: Hiroshi Inoue
Date:
Subject: Re: [HACKERS] Multibyte in autoconf