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

mysterious sortorder issue

From: Andreas <maps(dot)on(at)gmx(dot)net>
To: ListaPostgre <pgsql-novice(at)postgresql(dot)org>
Subject: mysterious sortorder issue
Date: 2010-06-18 16:24:20
Message-ID: 4C1B9DB4.1090409@gmx.net (view raw or flat)
Thread:
Lists: pgsql-novice
Hi,
I've got a produktive pg-server V8.4 on SuSE Linux and my dev-server on 
winxp localhost.

The 2 servers produce different results in text sorting.
The local server sorts as expected but the productive db produces 
unexpected orders.
They have identical data. The testbox has daily backups of the 
productive db.

E.g. there is a table that holds projects.

A   select project from projects order by project;   delivers on 
productive-db
....
StatStuff
S&T Evo
STP
S&T Polithings
Syback
....
How can the "STP" be between the two "S&T"s ?
Actually one should expect the two "S&T"s should appear as the first 
projects with S because '&' < 'A'.

Another example is our " Sales" project. I made the blank in front to 
get it always on the top of the list.
This works with PG on windows but PG on SUSE ignores the leading blank 
and puts sales among the other projects that start with S.

The DB on WinXP is        ENCODING = 'UTF8'
        LC_COLLATE = 'German, Germany'
        LC_CTYPE = 'German, Germany'

The DB on SUSE has ENCODING = 'UTF8'
        LC_COLLATE = 'de_DE.UTF-8'
        LC_CTYPE = 'de_DE.UTF-8'

There is no de_DE.UTF-8 on Windows and no German, Germany on SUSE so I 
expect them as equal?

Can someone point me to the right server option that controls the sort 
order to get the SUSE server right?

pgsql-novice by date

Next:From: Martin KnafveDate: 2010-06-18 17:40:58
Subject: Bundling PostgreSQL
Previous:From: AndreasDate: 2010-06-18 16:18:48
Subject: Re: (not so?) silly question

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