Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rRzMz-00AdZd-9w for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jan 2024 18:50:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rRzMx-006KpT-Ty for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jan 2024 18:50:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rRzMx-006KpL-Jm for pgsql-hackers@lists.postgresql.org; Mon, 22 Jan 2024 18:50:03 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rRzMu-002psr-UC for pgsql-hackers@postgresql.org; Mon, 22 Jan 2024 18:50:02 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id EC3C13200AF1; Mon, 22 Jan 2024 13:49:58 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 22 Jan 2024 13:49:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm2; t=1705949398; x=1706035798; bh=9eEwuPmYfSCGGYdRlrFz8I4bFP08LHOX XVQezRvDbQ0=; b=gXIvF/ygS32yybctmmMKOUNqA7a3lJKvY3RaHbsFNxUSDSkN wEBO4XoyTPi6dI2jqx+aVNKC68hzTBMmQeRO1x//JNU0JK5Qc0mOWae4Inx6jjH8 CDtBmWv8qlN/N9R6+mVWfJcebVCbXxHvZnWab/XPn11fpVz3U1lp8GtW7ixOO3ut y7meZUqzXIyF9YqfveLp1w30dsF2pU6PgVdVTbhUF7/xVsjstNlZt4PDQaPnViXi 1WpxDxIBhVSGRTQ5lx5q6a62fut47RDfLRWzlLknzeuCqillO97cEk3HOI5uc+T6 8ntg37BVUjUjHBHPc5iD0YAYEUQy97kHgvDLUQ== 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:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1705949398; x= 1706035798; bh=9eEwuPmYfSCGGYdRlrFz8I4bFP08LHOXXVQezRvDbQ0=; b=L mh5Dj+G4Mm/sMfvm3zfSmvaoyIioI8LX0F68hWp+lE3d0zsOnqmiurMgYvt7qCa9 lSOWfsiJNHvQAJ5b7/+VwHkP5YJdheGK7AYFZ57sry63CamPb2ahvA/xvkZqX6el fN/JCAGZql7O5Jy2gEb7A60HzuI0q7QfPoK0+Tc9V9zLpHcPGd04647EY1QhndF5 mpy/GPivQ5XISl9doqFdbpWjHnXYl+wnmRygYNHxMAS1uRIHmM7nFHuwmaqHwl8c S0R+DRrbXparycUqIpVH2dMt91VnwIZS/6Bh9hQkhnT0xLd0y8PQpPfrVo1iX1ds NHScliF+Z+PKqHAoq3sQw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdekiedgudduhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomheprfgv thgvrhcugfhishgvnhhtrhgruhhtuceophgvthgvrhesvghishgvnhhtrhgruhhtrdhorh hgqeenucggtffrrghtthgvrhhnpeejhfevhedttefgfffhhfeffefggffhffelgfeiueeu keehvdehvdefheffvdefueenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 22 Jan 2024 13:49:56 -0500 (EST) Message-ID: <2bcd882a-cf20-40fc-84eb-5c5c6365ff56@eisentraut.org> Date: Mon, 22 Jan 2024 19:49:56 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Built-in CTYPE provider Content-Language: en-US To: Jeff Davis , Daniel Verite Cc: Robert Haas , Jeremy Schneider , pgsql-hackers@postgresql.org References: <6f3e94c0-f174-4380-9b69-072f8a838881@manitou-mail.org> <12e4f6a78403b33c303c20e44976f891d879be09.camel@j-davis.com> <67df0672-5bc0-4b2b-b9e0-00e12bdca601@eisentraut.org> <3c1f4043bb4f76de78160f8afc8678eaa10b0e46.camel@j-davis.com> From: Peter Eisentraut In-Reply-To: <3c1f4043bb4f76de78160f8afc8678eaa10b0e46.camel@j-davis.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 18.01.24 23:03, Jeff Davis wrote: > On Thu, 2024-01-18 at 13:53 +0100, Peter Eisentraut wrote: >> I think that would be a terrible direction to take, because it would >> regress the default sort order from "correct" to "useless". > > I don't agree that the current default is "correct". There are a lot of > ways it can be wrong: > > * the environment variables at initdb time don't reflect what the > users of the database actually want > * there are so many different users using so many different > applications connected to the database that no one "correct" sort order > exists > * libc has some implementation quirks > * the version of Unicode that libc is based on is not what you expect > * the version of libc is not what you expect These are arguments why the current defaults are not universally perfect, but I'd argue that they are still most often the right thing as the default. >>   Aside from >> the overall message this sends about how PostgreSQL cares about >> locales >> and Unicode and such. > > Unicode is primarily about the semantics of characters and their > relationships. The patches I propose here do a great job of that. > > Collation (relationships between *strings*) is a part of Unicode, but > not the whole thing or even the main thing. I don't get this argument. Of course, people care about sorting and sort order. Whether you consider this part of Unicode or adjacent to it, people still want it. >> Maybe you don't intend for this to be the default provider? > > I am not proposing that this provider be the initdb-time default. ok >>   But then >> who would really use it? I mean, sure, some people would, but how >> would >> you even explain, in practice, the particular niche of users or use >> cases? > > It's for users who want to respect Unicode support text from > international sources in their database; but are not experts on the > subject and don't know precisely what they want or understand the > consequences. If and when such users do notice a problem with the sort > order, they'd handle it at that time (perhaps with a COLLATE clause, or > sorting in the application). > Vision: > * ICU offers COLLATE UNICODE, locale tailoring, case-insensitive > matching, and customization with rules. It's the solution for > everything from "slightly more advanced" to "very advanced". I am astonished by this. In your world, do users not want their text data sorted? Do they not care what the sort order is? You consider UCA sort order an "advanced" feature?