Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ce317-0006xK-S9 for pgsql-bugs@arkaria.postgresql.org; Wed, 15 Feb 2017 17:05:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ce317-0004oc-DQ for pgsql-bugs@arkaria.postgresql.org; Wed, 15 Feb 2017 17:05:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ce316-0004li-CR for pgsql-bugs@postgresql.org; Wed, 15 Feb 2017 17:05:20 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ce313-0007p5-G5 for pgsql-bugs@postgresql.org; Wed, 15 Feb 2017 17:05:19 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v1FH5Dow016286; Wed, 15 Feb 2017 12:05:13 -0500 From: Tom Lane To: Peter Geoghegan cc: Hari Sankar A , pgsql-bugs@postgresql.org Subject: Re: Problem with PostgreSQL string sorting In-reply-to: References: Comments: In-reply-to Peter Geoghegan message dated "Wed, 15 Feb 2017 08:54:56 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16284.1487178313.1@sss.pgh.pa.us> Date: Wed, 15 Feb 2017 12:05:13 -0500 Message-ID: <16285.1487178313@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Peter Geoghegan writes: > The behavior of each collation comes from the operating system's own > libc, except for the C collation, which is based on the ordering > implied by strcmp() comparisons. Generally, most implementations have > the behavior you describe, in that they assign least weight of all to > caseness and whitespace, and somewhat more weight to punctuation. I > don't think that there is much that can be done about it in practice, > though in principal there could be a collation that has all the > properties you want. I believe most versions of libc use declarative specifications of locale properties, so if you wanted to spend some time learning the language in which those are written, you could make and install a locale that acts like you want. It's possible there's one out there already, because a lot of people seem to want that. In any case, this is not a bug, this is a feature request; and it's not even for a Postgres feature, it's for a libc feature. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs