Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mC2EY-00085G-EN for pgsql-general@arkaria.postgresql.org; Fri, 06 Aug 2021 15:58:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mC2EV-0007P4-Ug for pgsql-general@arkaria.postgresql.org; Fri, 06 Aug 2021 15:58:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mC2EV-0007O1-0A for pgsql-general@lists.postgresql.org; Fri, 06 Aug 2021 15:58:03 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mC2EQ-0004HB-5s for pgsql-general@postgresql.org; Fri, 06 Aug 2021 15:58:02 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id AD5CD5C0150; Fri, 6 Aug 2021 11:57:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 06 Aug 2021 11:57:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=s4MnqX3oc/DJmEm+hefVRi9jSljiYYKa0bKmCwQWF H8=; b=MS5E0A9l0nN4tPODgD+CJ+HpOi/D2ohItl7OW51AHbbznORq1XJsuixHh EEQgrhh23uV7xZwh0QHGn8mzfnXbWvr6huArA7UWrhdX+Hz2dDmoEAe6AenZE6A6 xCKPeiuOJy9gcBEfMjCl4BFMk6qWTorMdwfZSacMPs/l/TrttAJ6Lv6hfHUdqHwX 9wXoVDQ6bsCmJsAtZMEx1htQjrR0citJuOoJC1LDB7psDB0cyZJLVxHUc3AldeLm t0c+VP4dLIlZ/fXBZ6TC0hrO6e2oWu72q0VrvnoZNrq7nA1TA9aXolRa+BcW774D gLXOrNID5a7QSFiyg7hYfms7QBANw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjedugdelvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenog fuuhhsphgvtghtffhomhgrihhnucdlgeelmdenucfjughrpefuvfhfhffkffgfgggjtgfg sehtkeertddtfeejnecuhfhrohhmpefrvghtvghrucfgihhsvghnthhrrghuthcuoehpvg htvghrrdgvihhsvghnthhrrghuthesvghnthgvrhhprhhishgvuggsrdgtohhmqeenucgg tffrrghtthgvrhhnpeeiveehveeuudfgteejueelvdfhteekiedujeevgeegleegueetje etudejffefteenucffohhmrghinhepghhithhhuhgsrdhiohenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrg huthesvghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 6 Aug 2021 11:57:54 -0400 (EDT) Subject: Re: sort order To: Marc Millas , pgsql-general@postgresql.org References: From: Peter Eisentraut Message-ID: <3940ae46-b123-f58e-aa58-e6f9309b5ef6@enterprisedb.com> Date: Fri, 6 Aug 2021 17:57:51 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 27.07.21 19:07, Marc Millas wrote: > so, obviously, both lc_collate knows about the é > but obviously, too, they do behave differently on the impact of the > beginning white space. > > I didn't see anything about this behaviour on the doc, unless the > reference at the libc should be understood as please read and test libc > doc on each platform. > So my first question is: why ? > My second question is: how to make the centos postgres behave like the > w10 one ?? > ie. knowing about french characters AND taking beginning white spaces > into account ? There are multiple standard ways to deal with space and punctuation characters when sorting. See for a description. Not all collation providers implement all of them, but the behavior you happen to get is usually one of them. The centos 7 behavior corresponds to "shift-trimmed", the Windows one appears to match "non-ignorable". If you want to get that latter one on Linux as well, you can use the ICU locales, which also default to non-ignorable. For example select * from test order by ble collate "fr-x-icu"; matches your Windows output for me.