Re: [HACKERS] Multibyte in autoconf
От | Tatsuo Ishii |
---|---|
Тема | Re: [HACKERS] Multibyte in autoconf |
Дата | |
Msg-id | 19991207102941N.t-ishii@sra.co.jp обсуждение исходный текст |
Ответ на | Multibyte in autoconf (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: [HACKERS] Multibyte in autoconf
|
Список | pgsql-hackers |
> This belongs to the chapter "initdb weirdnesses", if you will. I have long > been confused about this, but now I think I have the answer. Could someone > from the multibyte camp please confirm this. > > When I configure --with-mb=FOO, the only place FOO is actually used is in > initdb as the default encoding of the database system you are creating > (can be overriden with --pgencoding). The rest of the source code only > does occasional #ifdef MULTIBYTE checks. This sort of arrangement is > questionable for a number of reasons: > > 1) It's not very clear to the casual observer (=end user). I was lead to > believe that the database system you are compiling will only support the > FOO encoding and I used several --with-mb's if I wanted more. Have you ever read doc/README.mb? > 2) It is very well possible that one initdb instance can be used to > install databases in several locations with varying encodings. You can initialize database with specified default encoding by initdb - e or -pgencoding. What's the problem with this? > 3) I might sound like a broken record, but autoconf is not for controlling > runtime behavior. > > While the notion of having a default encoding is perhaps not so bad (but > how often do you do initdb?) it could be introduced via other mechanisms, > such as environment variables. (I am contradicting earlier emails now, but > I'm not sure of a good way myself, yet.) The current approach causes all > kinds of structural hazards in the overall view of things. I propose that > --with-mb be replaced by --enable-mb (how about --enable-multibyte?). This > is nothing urgent, but I would like to know what you think. I don't understabd why you do not complain about --with-pgport or -- with-maxbackends. Sounds they have same problems as mb:-) Anyway, I don't like the idea to have an yet another environment variable to give a default encoding to initdb when -e or -pgencoding is not specified. We already have enough. Changing --with-mb to -- enable-multibyte seems good but I don't know how to give the default encoding to initdb in this case. Or just changing --with-mb=FOO to -- enable-multibyte=FOO is what you want? -- Tatsuo Ishii
В списке pgsql-hackers по дате отправления: