X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 77FA3D1B454 for ; Tue, 25 Nov 2003 17:54:05 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 08813-01 for ; Tue, 25 Nov 2003 13:53:33 -0400 (AST) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 44328D1B443 for ; Tue, 25 Nov 2003 13:53:33 -0400 (AST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 2CD643561C; Tue, 25 Nov 2003 09:53:33 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 2B5CA354A9; Tue, 25 Nov 2003 09:53:33 -0800 (PST) Date: Tue, 25 Nov 2003 09:53:33 -0800 (PST) From: Stephan Szabo To: Andrei Bintintan Cc: "[ADMIN]" Subject: Re: Sensitive sort problem? In-Reply-To: <022a01c3b373$45fc4f00$0b00a8c0@andy> Message-ID: <20031125095150.J20420@megazone.bigpanda.com> References: <017301c3b365$70935b40$0b00a8c0@andy> <005701c3b370$3d09fe40$1664a8c0@DEMOLITION> <022a01c3b373$45fc4f00$0b00a8c0@andy> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/435 X-Sequence-Number: 11422 On Tue, 25 Nov 2003, Andrei Bintintan wrote: > I give an example: > > These are the datas from the table names: > > id n1 n2 > 1 AaAa AaAa > 2 X X > 3 A A > 4 a a > 5 ab ab > 6 _Y _Y > 8 ..a ..a > 9 .x .x > 7 ...a ...a > > If I run: select * from names order by n1: the result is: > > id n1 n2 > 4 a a > 8 ..a ..a > 7 ...a ...a > 3 A A > 1 AaAa AaAa > 5 ab ab > 9 .x .x > 2 X X > 6 _Y _Y > > Which I don't think that is right. I don't know what happened. But I > find that the ASCII char order is not respected here. As Tom said, you've probably run initdb in a locale other than "C". For example, I believe the above is correct for en_US.