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 1pqxpa-0005to-ML for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Apr 2023 15:10:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pqxpY-0002Tq-Uc for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Apr 2023 15:10:16 +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 1pqxpX-0002Th-Nj for pgsql-hackers@lists.postgresql.org; Mon, 24 Apr 2023 15:10:16 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pqxpT-004okl-C1 for pgsql-hackers@lists.postgresql.org; Mon, 24 Apr 2023 15:10:14 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 872A358204B; Mon, 24 Apr 2023 11:10:07 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 24 Apr 2023 11:10:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1682349007; x=1682356207; bh=7vusNYTyaHpMiWq/swkOxRvur14kR/fgZRp 5GJggFj4=; b=XaCCA/Ksvc7jj+iA+A5LGqBhrA6wKafKs5Tmmq26f8IMuaD9JgF 9TmLp16qdqTpSdnU2q5eeUpc3TtoE1gyT4MAlRLdDgOHdvyp+DzAdxrrurpP+X/N bVW2lHPhfnnf4UNqqJqQ+NkKtkNmXXRFvz7R/1wQiHgCdTmsj2dDWVPAokO1v2tN VHBCNtZ65sqCTYcJJK4YfDxqlnnU37yz/pt39182xw/38KJNa+WJ0qMFnopKGgPW wFkXXjU7cJFcz0wRCmmnP6RX308PXAUiooHryQPbRtUkWQl2vJA3Fyk5kliPYer/ v8iDMjC5q4gKt1WB3sfmbOcAUor3XXCMPww== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedutddgkeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuhffvvehfjggtgfesth ekredttdefjeenucfhrhhomheprfgvthgvrhcugfhishgvnhhtrhgruhhtuceophgvthgv rhdrvghishgvnhhtrhgruhhtsegvnhhtvghrphhrihhsvggusgdrtghomheqnecuggftrf grthhtvghrnhepheeukedukeehtefggeeihffhffeugeehveelkeeihfeivdegvdejleev ffefleeinecuffhomhgrihhnpehoshhgvghordhorhhgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhht segvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 Apr 2023 11:10:05 -0400 (EDT) Message-ID: <696054d1-bc88-b6ab-129a-18b8bce6a6f0@enterprisedb.com> Date: Mon, 24 Apr 2023 17:10:04 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: Order changes in PG16 since ICU introduction Content-Language: en-US From: Peter Eisentraut To: Sandro Santilli , Tom Lane Cc: Regina Obe , pgsql-hackers@lists.postgresql.org, Jeff Davis References: <000b01d97465$c34bbd60$49e33820$@pcorp.us> <3353947.1682092131@sss.pgh.pa.us> <533d93c5-f604-8e5f-4a48-975c08c53d59@enterprisedb.com> In-Reply-To: <533d93c5-f604-8e5f-4a48-975c08c53d59@enterprisedb.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 21.04.23 19:14, Peter Eisentraut wrote: > On 21.04.23 19:09, Sandro Santilli wrote: >> On Fri, Apr 21, 2023 at 11:48:51AM -0400, Tom Lane wrote: >>> "Regina Obe" writes: >>> >>>> https://trac.osgeo.org/postgis/ticket/5375 >>> >>> If they actually are using locale C, I would say this is a bug. >>> That should designate memcmp sorting and nothing else. >> >> Sounds like a bug to me. This is happening with a PostgreSQL cluster >> created and served by a build of commit c04c6c5d6f : >> >>    =# select version(); >>    PostgreSQL 16devel on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu >> 11.3.0-1ubuntu1~22.04) 11.3.0, 64-bit >>    =# show lc_collate; >>    C >>    =# select '+' < '-'; >>    f > > If the database is created with locale provider ICU, then lc_collate > does not apply here, so the result might be correct (depending on what > locale you have set). The GUC settings lc_collate and lc_ctype are from a time when those locale settings were cluster-global. When we made those locale settings per-database (PG 8.4), we kept them as read-only. As of PG 15, you can use ICU as the per-database locale provider, so what is being attempted in the above example is already meaningless before PG 16, since you need to look into pg_database to find out what is really happening. I think we should just remove the GUC parameters lc_collate and lc_ctype.