From a2a10af36b61e7b40097589c4c75b0a00de6841f Mon Sep 17 00:00:00 2001
From: Jeff Davis <jeff@j-davis.com>
Date: Wed, 11 Dec 2024 15:03:17 -0800
Subject: [PATCH v3 3/3] Change UCS_BASIC to use the builtin PG_UNICODE_FAST
 locale.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

--- CATVERSION ---

The standard specifies the behavior of LOWER() and UPPER() in terms of
Unicode, including that "ß" shall uppercase to "SS". That implies the
Unicode "Full Case Mapping" behavior.

Change the standard-defined UCS_BASIC collation to use Unicode with
Full Case Mappging, instead of the previous ASCII ("C" collation)
semantics.

This behavior change could affect the consistency of expression
indexes using those funcitons with the UCS_BASIC collation. Users
should either REINDEX those indexes, or change the collation to "C" to
match previous behavior.
---
 src/include/catalog/pg_collation.dat | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/include/catalog/pg_collation.dat b/src/include/catalog/pg_collation.dat
index 304654a612e..18883ff098b 100644
--- a/src/include/catalog/pg_collation.dat
+++ b/src/include/catalog/pg_collation.dat
@@ -24,7 +24,7 @@
   collcollate => 'POSIX', collctype => 'POSIX' },
 { oid => '962', descr => 'sorts by Unicode code point, C character semantics',
   collname => 'ucs_basic', collprovider => 'b', collencoding => '6',
-  colllocale => 'C', collversion => '1' },
+  colllocale => 'PG_UNICODE_FAST', collversion => '1' },
 { oid => '963',
   descr => 'sorts using the Unicode Collation Algorithm with default settings',
   collname => 'unicode', collprovider => 'i', collencoding => '-1',
-- 
2.34.1

