Обсуждение: RES: Issue on Varchar Ordering

Поиск
Список
Период
Сортировка

RES: Issue on Varchar Ordering

От
Erika Terahata Torres Prada e Silva - MPS
Дата:
OS Debian 3.1

Show lc_collate:

"pt_BR.ISO-8859-1"

It returns:
    GABRIELA HELEDA DE SOUZA
      GABRIELA JACOBY NOS
      GABRIEL ALCIDES KLIM PERONDI
      GABRIELA LETICIA BATISTA NUNES
      GABRIEL ALEXANDRE DA SILVA MANICA

The correct would be:

    GABRIEL ALCIDES KLIM PERONDI
    GABRIEL ALEXANDRE DA SILVA MANICA
    GABRIELA HELEDA DE SOUZA
    GABRIELA JACOBY NOS
    GABRIELA LETICIA BATISTA NUNES

As I told you, with OS Windows, it works correctly...


Erika Terahata T. P. e Silva


-----Mensagem original-----
De: Peter Eisentraut [mailto:peter_e@gmx.net]
Enviada em: sexta-feira, 18 de agosto de 2006 02:58
Para: pgsql-admin@postgresql.org
Cc: Alvaro Herrera; Erika Terahata Torres Prada e Silva - MPS
Assunto: Re: RES: RES: [ADMIN] Issue on Varchar Ordering

Alvaro Herrera wrote:
> LC_COLLATE=pt_PT sort << EOF
> GABRIEL ALEXANDRE DA SILVA MANICA
> GABRIELA JACOBY NOS
> GABRIELA HELEDA DE SOUZA
> GABRIELA LETICIA BATISTA NUNES
> GABRIEL ALCIDES KLIM PERONDI
> EOF
>
> On my system it outputs the order you show above, which shows that my
> locale is correctly defined per your expectations.

That is absolutely wild.  This will indeed return a space-sensitive sort
under pt_BR, but not under, say, de_DE.  So there is order in this
world! (heh)

This is on Debian, so the original poster has some configuration or
version difference.  Please tell OS version, and the output of "SHOW
lc_collate".

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

Re: RES: Issue on Varchar Ordering

От
Alvaro Herrera
Дата:
Erika Terahata Torres Prada e Silva - MPS wrote:
> OS Debian 3.1
>
> Show lc_collate:
>
> "pt_BR.ISO-8859-1"
>
> It returns:
>     GABRIELA HELEDA DE SOUZA
>       GABRIELA JACOBY NOS
>       GABRIEL ALCIDES KLIM PERONDI
>       GABRIELA LETICIA BATISTA NUNES
>       GABRIEL ALEXANDRE DA SILVA MANICA
>
> The correct would be:
>
>     GABRIEL ALCIDES KLIM PERONDI
>     GABRIEL ALEXANDRE DA SILVA MANICA
>     GABRIELA HELEDA DE SOUZA
>     GABRIELA JACOBY NOS
>     GABRIELA LETICIA BATISTA NUNES
>
> As I told you, with OS Windows, it works correctly...

Strange.  I'm using Debian unstable here and it works fine, i.e., just
as you expect.  This sounds like a glibc bug to me; one corrected after
3.1.  (Is that Sarge?  I don't know the version numbers.)

What version of the libc6 package do you have installed?  I have 2.3.6-18 here.

$ LC_MESSAGES=C dpkg -l libc6
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                    Version                 Description
+++-=======================-=======================-==============================================================
ii  libc6                   2.3.6-18                GNU C Library: Shared libraries


--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support