X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 62102D1B537 for ; Wed, 15 Oct 2003 03:40:12 +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 48129-10 for ; Wed, 15 Oct 2003 00:39:40 -0300 (ADT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 9B1CDD1B4FE for ; Wed, 15 Oct 2003 00:39:40 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 18ECC353E7; Tue, 14 Oct 2003 20:39:25 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 17955353E3; Tue, 14 Oct 2003 20:39:25 -0700 (PDT) Date: Tue, 14 Oct 2003 20:39:25 -0700 (PDT) From: Stephan Szabo To: "George A.J" Cc: pgsql-sql@postgresql.org Subject: Re: Sorting problem In-Reply-To: <20031015033054.50872.qmail@web14908.mail.yahoo.com> Message-ID: <20031014203640.V89503@megazone.bigpanda.com> References: <20031015033054.50872.qmail@web14908.mail.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/171 X-Sequence-Number: 15571 On Tue, 14 Oct 2003, George A.J wrote: > hi all, > i am using postgres 7.3.2 .i am converitng a mssql database to postgres. > now i am facing a strange problem. sorting based on a varchar field is not working > as expected. the non alphanumeric characters are not sorting based on the ascii > value of them. What OS and locale are you using? If it's not "C", you're probably getting bit by the fact that many natural language collations (such as en_US for example) don't consider most of the symbols except as tie breakers when sorting. Unfortunately, to change the locale you need to run initdb again with the appropriate locale, something like: LANG="C" initdb -D /path/to/dataspace