Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id E38E463EA09 for ; Wed, 3 Feb 2010 15:20:37 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 85989-04-3 for ; Wed, 3 Feb 2010 19:20:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mail.postgresql.org (Postfix) with SMTP id 423D363EFFD for ; Wed, 3 Feb 2010 15:17:25 -0400 (AST) Received: (qmail invoked by alias); 03 Feb 2010 19:16:43 -0000 Received: from a88-115-218-165.elisa-laajakaista.fi (EHLO [10.0.0.101]) [88.115.218.165] by mail.gmx.net (mp006) with SMTP; 03 Feb 2010 20:16:43 +0100 X-Authenticated: #495269 X-Provags-ID: V01U2FsdGVkX18FRXNPdvAFlUaenzz9AdPJIRy1uKPDZdanJqLmij Ban2KFvSDrHn32 Subject: Re: Issues with LC_COLLATE, across 8.3/8.4 on various platforms From: Peter Eisentraut To: Achilleas Mantzios Cc: pgsql-admin@postgresql.org In-Reply-To: <201002031705.36226.achill@matrix.gatewaynet.com> References: <201002021426.44936.achill@matrix.gatewaynet.com> <201002021728.39492.achill@matrix.gatewaynet.com> <1265208800.10962.13.camel@fsopti579.F-Secure.com> <201002031705.36226.achill@matrix.gatewaynet.com> Content-Type: text/plain; charset="UTF-8" Date: Wed, 03 Feb 2010 21:16:36 +0200 Message-ID: <1265224596.16965.1.camel@vanquo.pezone.net> Mime-Version: 1.0 X-Mailer: Evolution 2.28.2 Content-Transfer-Encoding: 8bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.56999999999999995 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.987 tagged_above=-10 required=5 tests=AWL=-0.988, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 201002/39 X-Sequence-Number: 33642 On ons, 2010-02-03 at 17:05 +0200, Achilleas Mantzios wrote: > Στις Wednesday 03 February 2010 16:53:20 ο/η Peter Eisentraut έγραψε: > > On tis, 2010-02-02 at 17:28 +0200, Achilleas Mantzios wrote: > > > It seems that libc's behaviour regarding LC_COLLATE in Linux/FreeBSD > > > are two different stories, hence the seen results. > > > > The UTF-8 locales on FreeBSD and Mac OS X are pretty much broken. > > > > This is becoming a FAQ ... > > This is a libc/locale combination issue. Care to elaborate? > AFAICT for my case in FreeBSD, the greek UTF locale el_GR.UTF-8 behaves as expected without problems. Well, """ while in all of PostgreSQL 8.3.3 on i686-pc-linux-gnu (lc_collate=C) PostgreSQL 8.3.7 (lc_collate=el_GR.UTF-8) on i386-unknown-freebsd6.3 PostgreSQL 8.4.1 on x86_64-unknown-freebsd8.0 (lc_collate=en_US.UTF-8), gives fooname ------------------------- Cylinder Liner No1 Cylinder head No1 Cylinder head cover No1 """ is not a correct sorting result in my book, unless your measure of correctness is ASCII byte value order. And then it's left as an exercise to determine what the results would be for texts involving non-ASCII letters.