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 1rQRtx-001LGQ-Rs for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Jan 2024 12:53:46 +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 1rQRtw-002UOM-5l for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Jan 2024 12:53:44 +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 1rQRtv-002UOC-69 for pgsql-hackers@lists.postgresql.org; Thu, 18 Jan 2024 12:53:43 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rQRtr-0029bX-PA for pgsql-hackers@postgresql.org; Thu, 18 Jan 2024 12:53:41 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 78E5D5C01C4; Thu, 18 Jan 2024 07:53:38 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 18 Jan 2024 07:53:38 -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=1705582418; x=1705668818; bh=mgndNJ7epeSAUG8y1dEmSVlCB41p0T1Q Q3GTWQti9f4=; b=LqdQtVtBjfEqxVQC6Y3763HV6forjo87JBBbmnv4SuW/gnX3 abf+jcJxFbflSg9RMmfIgdcEX1QSDBQYN8zmcM1rb9r5r6h1qzBDA/WY9L6Tyfyk BmDyZbwmuYjAz3pg1+35hntNHeLbr9MW2w9hZrSaGcQwWjOu0DbQg+crhIRMoSV7 O+tgR55qdMwJU/+PdLLs51r9h3HZ6fI/6RSX2/WNUA055ND7eJx5ImcKVrHjQBKu DduOuMP1h+wXI0I8fDtlkvgO7adetopPA8CTECnlMLCvEGMSKK4uuGl5ytfXm6G2 iuCeKKN9S3lus9Dh29oIWSuX0V8lN3cswquOWQ== 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=1705582418; x= 1705668818; bh=mgndNJ7epeSAUG8y1dEmSVlCB41p0T1QQ3GTWQti9f4=; b=B /QEeiZxYfSEqpan36HUJdAsbFbVZgQuB3h9CWEMBwHl0L4wDku/DuKjmrojfBxm/ phzyly8ZDWiCWmAGWJ1V4Y0CSU6xedw4K2S6magvG5lGEW8AgJ4In3IGnIlUWdaa S6Rl6FtdYXmdjydJiI1/rCXBKzsCt0t8z/VD8C8lmkk7IP+93Ft56C0zpfrCCGc5 MpNaa+Wg+hZrXmJ8LLKR9ne1TUfNtIN1ffxKVmktisz5bv4cPJlab28jGMVQlgsx IF5/mmc3GB4T1ZR0HdgOB0xOW69WP9ds9BWAk/SJ1Kz3MywQ/L/IYg3tgaef9V3f 9YfsGf8X35BYPtR6ZSY3g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdejkedgvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh eqnecuggftrfgrthhtvghrnhepgfejtdfhkeeftdeugfeileehteeljeeghfeuledthfeu tedvffdukeefjefhgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepphgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhg X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 18 Jan 2024 07:53:37 -0500 (EST) Message-ID: <67df0672-5bc0-4b2b-b9e0-00e12bdca601@eisentraut.org> Date: Thu, 18 Jan 2024 13:53:36 +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> From: Peter Eisentraut In-Reply-To: <12e4f6a78403b33c303c20e44976f891d879be09.camel@j-davis.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 12.01.24 03:02, Jeff Davis wrote: > New version attached. Changes: > > * Named collation object PG_C_UTF8, which seems like a good idea to > prevent name conflicts with existing collations. The locale name is > still C.UTF-8, which still makes sense to me because it matches the > behavior of the libc locale of the same name so closely. I am catching up on this thread. The discussions have been very complicated, so maybe I didn't get it all. The patches look pretty sound, but I'm questioning how useful this feature is and where you plan to take it. Earlier in the thread, the aim was summarized as > If the Postgres default was bytewise sorting+locale-agnostic > ctype functions directly derived from Unicode data files, > as opposed to libc/$LANG at initdb time, the main > annoyance would be that "ORDER BY textcol" would no > longer be the human-favored sort. I think that would be a terrible direction to take, because it would regress the default sort order from "correct" to "useless". Aside from the overall message this sends about how PostgreSQL cares about locales and Unicode and such. Maybe you don't intend for this to be the default provider? 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? Maybe if this new provider would be called "minimal", it might describe the purpose better. I could see a use for this builtin provider if it also included the default UCA collation (what COLLATE UNICODE does now). Then it would provide a "common" default behavior out of the box, and if you want more fine-tuning, you can go to ICU. There would still be some questions about making sure the builtin behavior and the ICU behavior are consistent (different Unicode versions, stock UCA vs CLDR, etc.). But for practical purposes, it might work. There would still be a risk with that approach, since it would permanently marginalize ICU functionality, in the sense that only some locales would need ICU, and so we might not pay the same amount of attention to the ICU functionality. I would be curious what your overall vision is here? Is switching the default to ICU still your goal? Or do you want the builtin provider to be the default? Or something else?