Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 0E45A1337B56 for ; Tue, 9 Nov 2010 12:10:57 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 78119-09 for ; Tue, 9 Nov 2010 16:10:50 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 9E5101336B42 for ; Tue, 9 Nov 2010 12:10:49 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id oA9GAlVi018806; Tue, 9 Nov 2010 11:10:47 -0500 (EST) To: Andreas cc: pgsql-sql@postgresql.org Subject: Re: unexpected ORDER BY In-reply-to: <4CD97004.7070403@gmx.net> References: <4CD97004.7070403@gmx.net> Comments: In-reply-to Andreas message dated "Tue, 09 Nov 2010 17:00:04 +0100" Date: Tue, 09 Nov 2010 11:10:47 -0500 Message-ID: <18805.1289319047@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201011/14 X-Sequence-Number: 34752 Andreas writes: > I've got an PG 8.4 on a opensuse box running. > The DB is unicode german. > There is a text column I'd like to order by but as far as I see PG > ignores special chars and uses only characters and numbers. This is driven by the locale you're using, specifically the LC_COLLATE setting. If you want "plain ASCII" sort order, you need to switch to C locale. regards, tom lane