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 1sP7Nm-002xMI-8D for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Jul 2024 21:19:18 +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 1sP7Nj-00CNOs-6p for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Jul 2024 21:19:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sP7Ni-00CNOj-Nh for pgsql-hackers@lists.postgresql.org; Wed, 03 Jul 2024 21:19:15 +0000 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sP7Ng-000HLI-EH for pgsql-hackers@postgresql.org; Wed, 03 Jul 2024 21:19:14 +0000 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-7066c9741fbso6481b3a.2 for ; Wed, 03 Jul 2024 14:19:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20230601.gappssmtp.com; s=20230601; t=1720041550; x=1720646350; 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=vN/xlXcg1psopQ91daIHbZBxRzzTC0Dq8QIvM231ovk=; b=DoeaLFcPTEHfolp+ig/Gw7YprH95Vkae/qHyll8bNaArkYkeqHvfkeeJt8xFu+ldnU Kkg9jaASny4OYXOaKCBBrKkCBdCQmqT3IFsk7HxIbDn+4wNs0x3fWG9ZG52+ub6838nF 7VaR9x8t+E5nQlV3b3VyGtcuqWLae9xVYVFSICzC7nlUsGw/T684XpOHmtOm9+lG3Edo TjJV8khREOvxrKb1YGAgRGsGDzixk4hxiMBOBbrm76hECXHkumSVou5Aq/OQZm6S2v4Q JMS1iMHdC70WXJYrBiC34dg6mSvyr9Kc4yQ05mdLw63qjSCsj86xtaIKqnnr7mVz4c6U zvWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720041550; x=1720646350; 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=vN/xlXcg1psopQ91daIHbZBxRzzTC0Dq8QIvM231ovk=; b=Q0ABB3UePomMqcnjWoxNTufJ6Dp5bCNytXi4UUk1ZyAPNq04U4oSrTfbzglFwO+L6G UJ0zFZhuXR4/2Fpr+Wzv2UGJvlNcQE3YX+FIG2z90NGdbJir/o/HgLqOzfmmCLprVCWt egOG/NIfdY3u5TRj2/ggRRbazEWClhjoBMn7ZXMguwSPcxkvfY+z30zCjr9wcZCjvuZR RTUKSfoWt0J7ysWKGm9Olww61l/Xt/6hHDvyzRZ4G4KqBiHN5g0sI4sXEEG7Fm2lR8MU VYzw3woSml/zNTKZwyjBnQ5xoMgHN0RT3fnf5zv66nMkZ6H2YCahOmQMj4KxZVvUbFjh iZ8g== X-Forwarded-Encrypted: i=1; AJvYcCXDhk0e9Bftw91b96E7Df7cljXCLTYsNBNqeHzkLTl8NuJZWkMLDEUAesjAEUjK8M99gUV52K0kNqU+5+Wxmfz82OzbF/dm4/PE33+Y X-Gm-Message-State: AOJu0Yz8OXhkWkuX7UHQrOuLNrcMEIKehz0gdlNRBPFqRZtOwDehU+oG uAy378Eli7EZq6xGhyhQZLl3a9ITyKWjC8cYBiiHJ7x2NGgLrAnn4UiGYcHHsQ== X-Google-Smtp-Source: AGHT+IEM4F5Jm6lKhEgvxN/FAX/Lllwka4sXss8vIT6E4g5grV5aregOZB8AbMotEQ0fVXjzLUttCg== X-Received: by 2002:a05:6a00:10c7:b0:705:9526:3c0d with SMTP id d2e1a72fcca58-70aaad3ab65mr15795285b3a.12.1720041549498; Wed, 03 Jul 2024 14:19:09 -0700 (PDT) Received: from [172.24.2.43] ([12.126.244.130]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7080246c8edsm10868383b3a.58.2024.07.03.14.19.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:19:08 -0700 (PDT) Message-ID: Subject: Re: Built-in CTYPE provider From: Jeff Davis To: Noah Misch , Peter Eisentraut Cc: Daniel Verite , Robert Haas , Jeremy Schneider , pgsql-hackers@postgresql.org Date: Wed, 03 Jul 2024 14:19:07 -0700 In-Reply-To: <20240702230333.8d.nmisch@google.com> References: <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> <20240702165145.af.nmisch@google.com> <1200e97b-3a52-43c6-8b16-20cf45f58249@eisentraut.org> <20240702230333.8d.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 Tue, 2024-07-02 at 16:03 -0700, Noah Misch wrote: > Each packager can choose their dependencies so the v16 providers > don't have > the problem.=C2=A0 With the $SUBJECT provider, a packager won't have that > option. While nothing needs to be changed for 17, I agree that we may need to be careful in future releases not to break things. Broadly speaking, you are right that we may need to freeze Unicode updates or be more precise about versioning. But there's a lot of nuance to the problem, so I don't think we should pre-emptively promise either of those things right now. Consider: * Unless I made a mistake, the last three releases of Unicode (14.0, 15.0, and 15.1) all have the exact same behavior for UPPER() and LOWER() -- even for unassigned code points. It would be silly to promise to stay with 15.1 and then realize that moving to 16.0 doesn't create any actual problem. * Unicode also offers "case folding", which has even stronger stability guarantees, and I plan to propose that soon. When implemented, it would be preferred over LOWER()/UPPER() in index expressions for most use cases. * While someone can pin libc+ICU to particular versions, it's impossible when using the official packages, and additionally requires using something like [1], which just became available last year. I don't think it's reasonable to put it forth as a matter-of-fact solution. * Let's keep some perspective: we've lived for a long time with ALL text indexes at serious risk of breakage. In contrast, the concerns you are raising now are about certain kinds of expression indexes over data containing certain unassigned code points. I am not dismissing that concern, but the builtin provider moves us in the right direction and let's not lose sight of that. Given that no code changes for v17 are proposed, I suggest that we refrain from making any declarations until the next version of Unicode is released. If the pattern holds, that will be around September, which still leaves time to make reasonable decisions for v18. Regards, Jeff Davis [1] https://github.com/awslabs/compat-collation-for-glibc