Re: how to make collation work - Mailing list pgsql-novice
From | Havasvölgyi Ottó |
---|---|
Subject | Re: how to make collation work |
Date | |
Msg-id | 009801c54f32$c08332f0$ab00a8c0@OTTO Whole thread Raw |
In response to | how to make collation work (Havasvölgyi Ottó <h.otto@freemail.hu>) |
List | pgsql-novice |
Volkan, I passed the desired collation and ctype to initdb. The version of gcc is 3.4. Should I upgrade to 4.0 perhaps? As for filling the table, I did it with psql on the server, setting the client encoding to LATIN2, the same as in the database. Initially it was set to WIN1250. Then I tested the upper() function as well, but they worked only with English characters. For example: select upper('á'); I expected 'Á', but I got 'á'. So upper() didn't change this Hungarian character. Best Regards, Otto ----- Original Message ----- From: "Volkan YAZICI" <volkan.yazici@gmail.com> To: "tövis" <tovises@freemail.hu> Cc: "PostgreSQL Novice" <pgsql-novice@postgresql.org> Sent: Sunday, May 01, 2005 10:28 PM Subject: Re: [NOVICE] how to make collation work Hi, On 5/1/05, tövis <tovises@freemail.hu> wrote: > This was help me, on Debian Sarge. > PostgreSQL problems with collation sequence! > #dpkg-reconfigure locales - generate - "hu_HU" and NLS hu_UTF8 > #reboot I know it'll be a little bit offtopic (when considered to list caption), but you don't have to (also you shouldn't) reboot your machine after a locale generation. Just login again to take changes effect. (You know, one of the best side of Linux as a server OS is that you don't have to reboot system after every configuration. Please give up your Micros~1 habbits. :) > #/etc/init.d/postgresql stop > #su postgres -> postgres@srv02: > > empty directory /var/lib/postgres/data > > /usr/lib/postgresql/bin/initdb -U > postgres --locale=hu_HU --lc-collate=hu_HU -E LATIN2 \ > -D /var/lib/postgres/data -W --pwprompt > ... set same password for "postgres" root -W and --pwprompt is just the same. Just chose one of 'em. On 5/1/05, "Havasvölgyi Ottó" <h.otto@freemail.hu> wrote: So far I have tried the first > and the second with initdb, set the --locale, --lc-collate and --lc-ctype > to that locale. But after filling a table with Hunagrian characters, and > selecting it all with order by didn't give the result I expected. The > encoding of the database and the client was both LATIN2. Neither worked > the upper() and lower() functions correct with Hungarian characters. As Tövis used above, you can pass collating locale to the database. If there're still problems in sorting, I advice you for checking your compiler version. (Probably gcc.) For instance, there were same problem for Turkish locale too and we found that it's related with the compiler, not with PostgreSQL. And another question. How did you typed your entries to the database? Using psql or any other client. Would you also try to import from a file which has Hungarian characters? Regards. ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings
pgsql-novice by date: