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 1sOSBG-00ELda-TT for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Jul 2024 01:19:39 +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 1sOSBF-00557j-Bn for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Jul 2024 01:19:37 +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 1sOSAw-0051bn-Lu for pgsql-hackers@lists.postgresql.org; Tue, 02 Jul 2024 01:19:19 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sOSAq-0047rY-1U for pgsql-hackers@postgresql.org; Tue, 02 Jul 2024 01:19:17 +0000 Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-2c722e54db8so2504544a91.2 for ; Mon, 01 Jul 2024 18:19:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20230601.gappssmtp.com; s=20230601; t=1719883151; x=1720487951; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=iMVOKT/YXOQ0p/J65dZt8cnm1oPOgo6dv/l2bmXpN9A=; b=X8AGpVNdZZt2lRpFZFw48I4G9d3li6Oo6q7NVU8xPq3BjXu9d9r87+Vzx+d39eVl2U uwnwIA1u/t9YZrDnrz/qawBr7ueVj+ZAlLcNcwpataZfU8QYHltd+cNapeOyL9KemfjZ HAMYkD2EPDed4gQZ8o5iqkFmW3fFODAE4EsgwveIyxMFP236hP2y6ifqKKR2a4EEHV6i eHbw0QAwhqRcLdbXBa8AyphJBbeC5Py8UzBQL1phyyUaDrnav8a3qWmp8kiJCHzQwZ0q CUKPAhMTsjdz4FKsxqtjCjdIE4SVERlynveUKMJ63sJDRnXfpWeryaQNjcj7wBX6+4tu Ukgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719883151; x=1720487951; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=iMVOKT/YXOQ0p/J65dZt8cnm1oPOgo6dv/l2bmXpN9A=; b=iG+0jI6Ge1jx48XKenLH2b6ruGxFqxGJ85RFzHLWSK+q6zdjiGmIIXVBHcc+nL/8CL 5auzkGjWsXF71fR2Un0uQiR9MRPt+yy7SNr1z3HQGm3DtgGqmzpfOFukLx/rmDLdFif7 tFsjRT5Ekt6m4RexN9dwyuI8EdPK25QnxvSEJcghwcr6tkX1S43+c9OjbpR6WSsqMIDT T5pw//yDMIfUjU/dBvtQPmrvsHWsN9lzTrYXdVVezLxWcSzpoq7r1ZYDrQFpqsYRLTHI mdxsY2qK80FKhgL4seScXU4jJNruLUKV/I9/y63AW0jZ8MUfq3mlQBsYveJRi3IlO6zg MaKQ== X-Forwarded-Encrypted: i=1; AJvYcCXtJPGxvGI6id4LXYJjdud+4QXJsCOpqb8BMaVg8q6GYBgX0ZwYdMTwk9PBNpxdCOUaq7Jht2/v0e+2yKtIba/C6qPvKmpM+kDgRQhN X-Gm-Message-State: AOJu0YxWVVNW4TxejYLRzkzB1WnihjZpKgRwyyhdkv2iIqwtiuTMgO/H 1gCtDQ/32UitVUzrnjzpo1prrLW9BTL85bozcJre8ojPB9vTNaMnfVFThTlkX0+03QQgQZlNEf4 = X-Google-Smtp-Source: AGHT+IGT4wXNe9rip+v4/swB/0fgyQ+QOiCgGoVxQRG5GR92D/ZrVvvM3GFimh9HQrkndoZAbgf9Wg== X-Received: by 2002:a17:90a:d90f:b0:2c2:c61f:e09 with SMTP id 98e67ed59e1d1-2c93d706eaamr5786734a91.20.1719883150617; Mon, 01 Jul 2024 18:19:10 -0700 (PDT) Received: from jeff-laptop.lan (c-76-102-242-158.hsd1.ca.comcast.net. [76.102.242.158]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c91ce6f033sm7510048a91.28.2024.07.01.18.19.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jul 2024 18:19:10 -0700 (PDT) Message-ID: Subject: Re: Built-in CTYPE provider From: Jeff Davis To: Noah Misch Cc: Peter Eisentraut , Daniel Verite , Robert Haas , Jeremy Schneider , pgsql-hackers@postgresql.org Date: Mon, 01 Jul 2024 18:19:08 -0700 In-Reply-To: <20240701230352.2c.nmisch@google.com> References: <6bdb98e68b2b05aa71f7f934e227738eac84ecee.camel@j-davis.com> <19b34a70-f5cf-4faf-88dc-917db44ed48d@eisentraut.org> <846a7e1fa2024918b58ff7583523a2f3de9a11b4.camel@j-davis.com> <3117d30aa911b408b90420f4f280fa0c3b5851be.camel@j-davis.com> <4135cf11-206d-40ed-96c0-9363c1232379@eisentraut.org> <7451f81ba0cb512222ab759de8ca1cffe44e9acb.camel@j-davis.com> <1f309153-8198-4efa-86dd-8c304ec0040c@eisentraut.org> <20240629220857.fb.nmisch@google.com> <1ecfeb4d2b1b7f119fa917d3052a3aecfaf4f425.camel@j-davis.com> <20240701230352.2c.nmisch@google.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2024-07-01 at 16:03 -0700, Noah Misch wrote: > I agree the v17 code is fine.=C2=A0 Today, a user can (with difficulty) > choose > dependency libraries so regexp_matches() is IMMUTABLE, as marked.=C2=A0 I > don't > want $SUBJECT to be the ctype that, at some post-v17 version, can't > achieve > that with unpatched PostgreSQL. We aren't forcing anyone to use the builtin "C.UTF-8" locale. Anyone can still use the builtin "C" locale (which never changes), or another provider if they can sort out the difficulties (and live with the consequences) of pinning the dependencies to a specific version. > =C2=A0 Let's change the documentation to say this > provider uses a particular snapshot of Unicode data, taken around > PostgreSQL > 17.=C2=A0 We plan never to change that data, so IMMUTABLE functions can > rely on the > data. We can discuss this in the context of version 18 or the next time we plan to update Unicode. I don't think we should make such a promise in version 17. > =C2=A0 If we provide a newer Unicode data set in the future, we'll provid= e > it > in such a way that DDL must elect the new data.=C2=A0 How well would that > suit your > vision for this feature? Thomas tried tracking collation versions along with individual objects, and it had to be reverted (ec48314708). It fits my vision to do something like that as a way of tightening things up. But there are some open design questions we need to settle, along with a lot of work. So I don't think we should pre-emptively block all Unicode updates waiting for it. > =C2=A0 An alternative would be to make pg_upgrade reject > operating on a cluster that contains use of $SUBJECT. That wouldn't help anyone. Regards, Jeff Davis