Re: problem with nasty latin2 sorting

From: Volkan YAZICI <yazicivo(at)ttnet(dot)net(dot)tr>
To: Anna Domachowska <anka(at)zjednoczenie(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: problem with nasty latin2 sorting
Date: 2005-12-22 14:54:53
Message-ID: 20051222145453.GA556@alamut
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-novice

On Dec 21 11:01, Anna Domachowska wrote:
> I've got a problem with sorting polish words in postgresql 7.4.2
>
> For example, I've got couple of polish cities in my table 'x',
> results of sorting are:
> (select city from x order by city asc)
>
> Bydgoszcz
> Gda?sk
> I?awa
> ?ód?
> ?arnów
> Malbork
> Warszawa
>
> So "?arnów" is placed in wrong place, because it should be found
> after letter "Z" ??
>
> What's wrong? Is there any patch to fix this? Does anybody had
> similar problem?
> I belive that postgres was compiled with "--enable-locale", and the
> right locale is set.

Beside previous suggestions, I'm curious about your libc version too.
PostgreSQL relies on system locale while making character related
processes - like case conversion, collation and etc. Does below
command set succeed in sorting above data:

$ export LC_COLLATE=<related_locale>
$ cat >/tmp/test.out <<EOF
> Bydgoszcz
> Gda...
> ...
> EOF
$ sort /tmp/test.out

If above command set doesn't succeed, this means your problem is with
libc. Otherwise, as mentioned in the previous posts, please check your
database encoding.

Regards.

--
"We are the middle children of history, raised by television to believe
that someday we'll be millionaires and movie stars and rock stars, but
we won't. And we're just learning this fact," Tyler said. "So don't
fuck with us."

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-12-22 15:40:24 Re: Unsplitting btree index leaf pages
Previous Message Simon Riggs 2005-12-22 14:31:33 WAL bypass for INSERT, UPDATE and DELETE?

Browse pgsql-novice by date

  From Date Subject
Next Message Tim Baumgartner 2005-12-22 15:23:57 long transaction with concurrent SELECT statements
Previous Message Oleg 2005-12-22 12:06:12 Re: transfer database from Linux to Windows