Re: locale-specific sort algorithms undocumented?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John Gunther <mail(at)bucksvsbytes(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: locale-specific sort algorithms undocumented?
Date: 2004-07-26 00:27:35
Message-ID: 17152.1090801655@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

John Gunther <mail(at)bucksvsbytes(dot)com> writes:
> In the course of creating a new PG 7.4.3 server, I chose UTF-8 as my
> locale.

UTF-8 is a character set encoding, not a locale. I suspect you may
have chosen en_US or something like that as your locale.

> I now find that sorting is very different with that setting: It
> appears, through trial and error, that all non-alphanumeric characters
> are completely ignored by ORDER BY.

I doubt they are ignored completely, but they probably are ignored in
the first-order comparison. However, this is not PostgreSQL's
bailiwick; we just use whatever strcoll() behavior the C library
provides. The correct place to be looking for this documentation
is in the libc or glibc docs.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bill Moran 2004-07-26 01:11:33 Re: Sql injection attacks
Previous Message Stephan Szabo 2004-07-26 00:18:53 Re: locale-specific sort algorithms undocumented?