RES: Order by behaviour - Mailing list pgsql-general

From Carlos H. Reimer
Subject RES: Order by behaviour
Date
Msg-id PEEPKDFEHHEMKBBFPOOKGENHEEAA.carlos.reimer@opendb.com.br
Whole thread Raw
In response to Re: Order by behaviour  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Responses Re: RES: Order by behaviour  (Richard Huxton <dev@archonet.com>)
Re: RES: Order by behaviour  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-general
Humm, ok, it is clear now.

And is there a way to change something in this behaviour, like not ignore
spaces and some type of symbols?

A configuration file or a patch?

Thanks in advance!


> -----Mensagem original-----
> De: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org]Em nome de Stephan Szabo
> Enviada em: quarta-feira, 28 de março de 2007 19:23
> Para: Carlos H. Reimer
> Cc: pgsql-general@postgresql.org
> Assunto: Re: [GENERAL] Order by behaviour
>
>
> On Wed, 28 Mar 2007, Carlos H. Reimer wrote:
>
> > Hi,
> >
> > We have a PostgreSQL 8.0.6 cluster configured with
> lc_collate=pt_BR.UTF-8
> > and when we run the following SELECT:
> > SELECT substr(nomerazao,1,4),
> > ascii(substr(nomerazao,1,1)),
> > ascii(substr(nomerazao,2,1))
> > from spunico.unico order by nomerazao;
> >
> > is returning:
> >
> >  substr | ascii | ascii
> > --------+-------+-------
> >         |    32 |     0
> >         |    32 |     0
> >  1000   |    49 |    48
> >  1.DI   |    49 |    46
> >  1° R   |    49 |   176
> >  2M C   |    50 |    77
> >  3A.G   |    51 |    65
> >  A. A   |    65 |    46
> >  AABA   |    65 |    65
> >  A.A.   |    65 |    46
> >  A.AG   |    65 |    46
> >  A.A.   |    65 |    46
> >  A.A.   |    65 |    46
> >  ABAS   |    65 |    66
> >  ABAS   |    65 |    66
> >  ABAT   |    65 |    66
> >  A.B.   |    65 |    46
> >  A.B.   |    65 |    46
> >  ABCC   |    65 |    66
> >  A.B.   |    65 |    46
> >  A.B.   |    65 |    46
> >
> > Are not the lines out of order or is it a normal behaviour for
> a server with
> > lc_collate=pt_BR.UTF-8?
>
> Many collations ignore spaces and symbols on the first pass, so, for
> example you might have "A Z" > "AB" despite the fact that a space has a
> lower value than a B.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly
>
>


pgsql-general by date:

Previous
From: Dave Page
Date:
Subject: Re: pgAgent Crash on WinXP
Next
From: Ron Johnson
Date:
Subject: Re: Btree indexes, large numbers and <= comparisons