Skip site navigation (1) Skip section navigation (2)

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 (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-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.


"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

pgsql-novice by date

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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group