Обсуждение: unicode
Hi, can someone summarize the steps necessary to get PG8 fully setup for UTF-8 use, please? Locale, initDB params? Especially that SQL functions like UPPER, LOWER, LENGTH etc work correct as well.. Thanks in Advance
Am Freitag, 24. Juni 2005 11:47 schrieb Hannes Dorbath: > can someone summarize the steps necessary to get PG8 fully setup for > UTF-8 use, please? Locale, initDB params? Especially that SQL functions > like UPPER, LOWER, LENGTH etc work correct as well.. Use initdb --locale=de_DE.utf8 and that should be all.
Thanks. This works fine on Linux, but I could't get it to work on FreeBSD 5.3 - any ideas? On 24.06.2005 16:55, Peter Eisentraut wrote: > > Use initdb --locale=de_DE.utf8 and that should be all. >
Am Donnerstag, 30. Juni 2005 11:58 schrieb Hannes Dorbath: > Thanks. This works fine on Linux, but I could't get it to work on > FreeBSD 5.3 - any ideas? I hear that FreeBSD doesn't support Unicode, so you're probably out of luck for now. -- Peter Eisentraut http://developer.postgresql.org/~petere/
> I hear that FreeBSD doesn't support Unicode, so you're probably out of luck > for now. Hm, but the locales are there, it's just named de_DE.UTF-8 instead of de_DE.utf8 on FreeBSD. InitDB crashs with the following: [pgsql@kirk pgsql]$initdb --locale=de_DE.UTF-8 The files belonging to this database system will be owned by user "pgsql". This user must also own the server process. The database cluster will be initialized with locale de_DE.UTF-8. The default database encoding has accordingly been set to UNICODE. fixing permissions on existing directory /opt/pgsql/data ... ok creating directory /opt/pgsql/data/global ... ok creating directory /opt/pgsql/data/pg_xlog ... ok creating directory /opt/pgsql/data/pg_xlog/archive_status ... ok creating directory /opt/pgsql/data/pg_clog ... ok creating directory /opt/pgsql/data/pg_subtrans ... ok creating directory /opt/pgsql/data/base ... ok creating directory /opt/pgsql/data/base/1 ... ok creating directory /opt/pgsql/data/pg_tblspc ... ok selecting default max_connections ... 10 selecting default shared_buffers ... 50 creating configuration files ... ok creating template1 database in /opt/pgsql/data/base/1 ... FATAL: XX000: failed to initialize lc_messages to "" LOCATION: InitializeGUCOptions, guc.c:2389 child process exited with exit code 1 initdb: removing contents of data directory "/opt/pgsql/data" [pgsql@kirk pgsql]$ -- imos Gesellschaft fuer Internet-Marketing und Online-Services mbH Alfons-Feifel-Str. 9 // D-73037 Goeppingen // Stauferpark Ost Tel: 07161 93339-14 // Fax: 07161 93339-99 // Internet: www.imos.net
Hannes Dorbath <light@theendofthetunnel.de> writes: >> I hear that FreeBSD doesn't support Unicode, so you're probably out of luck >> for now. > Hm, but the locales are there, it's just named de_DE.UTF-8 instead of > de_DE.utf8 on FreeBSD. InitDB crashs with the following: > creating template1 database in /opt/pgsql/data/base/1 ... FATAL: XX000: > failed to initialize lc_messages to "" > LOCATION: InitializeGUCOptions, guc.c:2389 We've seen that happen before. As far as I can see it indicates breakage in the locale library: setlocale(LC_MESSAGES, "") should work, but it's failing. I'm not certain this is the total story, since the same failure has been seen on several platforms and it's hard to believe they are all brain-damaged. But I don't really see what we should do differently. regards, tom lane
After 7 hours of trail an error I upgraded FreeBSD from 5.3 to 5.4 - and all of sudden - everything works :) On 30.06.2005 15:57, Tom Lane wrote: > We've seen that happen before. As far as I can see it indicates > breakage in the locale library: setlocale(LC_MESSAGES, "") > should work, but it's failing. > > I'm not certain this is the total story, since the same failure > has been seen on several platforms and it's hard to believe they > are all brain-damaged. But I don't really see what we should > do differently.