From: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
---|---|
To: | Ruben Oliveira <ruben_dig(at)netcabo(dot)pt> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: problem with dots in order by |
Date: | 2005-02-15 16:38:34 |
Message-ID: | 20050215083524.C67893@megazone.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 15 Feb 2005, Ruben Oliveira wrote:
> Hello everybody !
>
> I have this order by :
> select lalala from tablex order by field_y;
> where field_y is a text column.
>
> that returns something like :
> 2.1004.11
> 21.00.461
> 2.1006.21
>
> in PostgreSQL 7.3.2 in Linux Mandrake 9.1
>
> but in PostgreSQL 8.0.0 in Windows XP it works as I expected ...
>
> 2.1004.11
> 2.1006.21
> 21.00.461
>
> the two config share the same Encoding when the database was created and
> the client enconding is the same in the two cases :
It's not encoding that's important. It's locale (LC_COLLATE).
The linux box is probably running the server with en_US which sorts like
you've shown the above (ignoring most/all symbols and spaces in first pass
sorting).
You could re-initdb in "C" locale to change the sort ordering.
From | Date | Subject | |
---|---|---|---|
Next Message | Serguei A. Mokhov | 2005-02-15 16:43:34 | Re: database encoding "WIN" -- Western or Cyrillic? |
Previous Message | Tom Lane | 2005-02-15 16:34:19 | Re: problem with dots in order by |