Re: [HACKERS] Multibyte in autoconf

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Multibyte in autoconf
Date: 1999-12-09 00:18:20
Message-ID: Pine.LNX.4.20.9912082106030.389-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 1999-12-09 00:18:37 More initdb follies
Previous Message Frans Van Elsacker 1999-12-08 22:46:58 Postgresql 6.5.3-2 for redhat 6.1