Re: Problem in order by

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Reuly Bússolo Mendes <reuly(at)terra(dot)com(dot)br>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Problem in order by
Date: 2005-04-11 15:05:58
Message-ID: 20050411080350.I28912@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


On Mon, 11 Apr 2005, [iso-8859-1] Reuly Bússolo Mendes wrote:

> In the Cygwin, the return is correct:
>
> prodes
> ----------------------------------------------------
> TELHA FRANCESA CAMBORIU
> TELHA PORTUGUESA SAO CRISTOVAO
> TELHA ROMANA LEONEL PEREIRA
> TELHA TRANSPARENTE FRANCESA
> TELHA TRANSPARENTE PORTUGUESA
> TELHA TRANSPARENTE ROMANA
> TELHA ZINCO 1 1/2 P/POSTE TELHADO
> TELHAO FRANCES SAO CRISTOVAO *
> TELHAO ROMANO SAO CRISTOVAO-GOIVA *
>
>
> But in Linux the return is:
>
> prodes
> ----------------------------------------------------
> TELHA FRANCESA CAMBORIU
> TELHAO FRANCES SAO CRISTOVAO *
> TELHAO ROMANO SAO CRISTOVAO-GOIVA *
> TELHA PORTUGUESA SAO CRISTOVAO
> TELHA ROMANA LEONEL PEREIRA
> TELHA TRANSPARENTE FRANCESA
> TELHA TRANSPARENTE PORTUGUESA
> TELHA TRANSPARENTE ROMANA
> TELHA ZINCO 1 1/2 P/POSTE TELHADO
>
> I already executed vacuumbd and reindex database but nothing.
>
> Somebody could help me?

This probably is because you have a different collation set on the redhat
box. If you are using something other than "C" locale, the ordering on the
redhat box seems reasonable given that most locales ignore spaces for
their first pass, so 'TELHAO' < 'TELHA P' for example. If you want byte
ordering sorting, you can initdb in "C" locale.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Reuly Bússolo Mendes 2005-04-11 16:43:10 Re: Problem in order by
Previous Message Reuly Bússolo Mendes 2005-04-11 13:15:35 Problem in order by