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 1n7FBD-00005j-48 for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Jan 2022 11:19:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n7FBC-0007h1-2c for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Jan 2022 11:19:06 +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 1n7FBB-0007gs-PE for pgsql-hackers@lists.postgresql.org; Tue, 11 Jan 2022 11:19:05 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n7FB7-0002kx-Ur for pgsql-hackers@postgresql.org; Tue, 11 Jan 2022 11:19:05 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 4C73A5C0292; Tue, 11 Jan 2022 06:19:00 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 11 Jan 2022 06:19:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=fm1; bh=KBteCTuwMe9Ei7gXqx4jkFlSvelew3RqS5YYU/sPp xQ=; b=PXjj9WlxmqrepeQZv4PkWjkjqAbttEHr9D7H3nmzxR5EYnZFp3bnhmgkt lUUm14g57RR6lsDQglWoZ65DjkiuJy1Tctdl+XoXJv7zgbCThpUbRIw2oTlYkI8O tUZzcJGPWpvp7itiMCguJCOy3VeNeprlP6y2uH+WhrTd0ZxjMVRofylVdR5Iq1gv T9/3FgiPNIO8k8yGE2CyZ1sMlwPNtVS982NMLcv4rU9M10T1v6RSmJjKL6kJZzVw jX92oX5O7VJlzroJdHiQwpI+Q+Wgj7PDhHGtEoJpNAQCbObNl4zuxOzKYRnxn4ZS 9kCYPGVIZO82Op85QVTV8BQORF/aA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudehfedgvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepfeejgeehteeuhfevvedu leeufedtjeetiefftedvudfhtdeifefgueettdevgefgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhht segvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 11 Jan 2022 06:18:59 -0500 (EST) Message-ID: <34c910bf-50bf-c33f-940d-3e5fe029347e@enterprisedb.com> Date: Tue, 11 Jan 2022 12:18:58 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: ICU for global collation Content-Language: en-US To: Daniel Verite Cc: pgsql-hackers References: <809c0fba-b0e6-44bf-b110-0886cb462aab@manitou-mail.org> From: Peter Eisentraut In-Reply-To: <809c0fba-b0e6-44bf-b110-0886cb462aab@manitou-mail.org> 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 10.01.22 12:49, Daniel Verite wrote: > With the current patch, it's not possible, AFAICS, because the user > can't tell that the collation is non-deterministic. Presumably this > would require another option to CREATE DATABASE and another > column to store that bit of information. Adding this would be easy, but since pattern matching currently does not support nondeterministic collations, if you make a global collation nondeterministic, a lot of system views, psql, pg_dump queries etc. would break, so it's not practical. I view this is an orthogonal project. Once we can support this without breaking system views etc., then it's easy to enable with a new column in pg_database. > The "daticucol" column also suggests that we don't expect to add > other collation providers in the future. Maybe a pair of columns like > (datcollprovider, datcolllocale) would be more future-proof, > or a (datcollprovider, datcolllocale, datcollisdeterministic) > triplet if non-deterministic collations are allowed. I don't expect many new collation providers. So I don't think an EAV-like storage would be helpful. The other problem is that we don't know what we need. For example, the libc provider needs both a collate and a ctype value, so that wouldn't fit into that scheme nicely. > Also, pg_collation has "collversion" to detect a mismatch between > the ICU runtime and existing indexes. I don't see that field > for the db-wide ICU collation, so maybe we currently miss the capability > to detect the mismatch for the db-wide collation? Yeah, I think I need to add a datcollversion field and the associated checks.