Re: how to make collation work

From: tövis <tovises(at)freemail(dot)hu>
To: "pgsql novice" <pgsql-novice(at)postgresql(dot)org>, Havasvölgyi Ottó <h(dot)otto(at)freemail(dot)hu>
Subject: Re: how to make collation work
Date: 2005-05-02 16:36:51
Message-ID: 005d01c54f35$24ef2300$3401a8c0@mainxp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Exciting!
Unfortunatelly I do not know how to check this quickly on my server;-( Could
you sent some simple sequence to check this out?
Üdv
Tövis
----- Original Message -----
From: "Havasvölgyi Ottó" <h(dot)otto(at)freemail(dot)hu>
To: <pgsql-novice(at)postgresql(dot)org>
Sent: Monday, May 02, 2005 6:19 PM
Subject: Re: [NOVICE] how to make collation work

> 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(dot)yazici(at)gmail(dot)com>
> To: "tövis" <tovises(at)freemail(dot)hu>
> Cc: "PostgreSQL Novice" <pgsql-novice(at)postgresql(dot)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(at)freemail(dot)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(at)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(dot)otto(at)freemail(dot)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
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jessica Ditt 2005-05-02 17:43:12 Re: Problem with DirectFunctionCall3(array_in,...)
Previous Message Havasvölgyi Ottó 2005-05-02 16:19:44 Re: how to make collation work