Improve support for UNICODE collation on older ICU
authorPeter Eisentraut <peter@eisentraut.org>
Mon, 13 Mar 2023 08:04:41 +0000 (09:04 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Mon, 13 Mar 2023 08:08:58 +0000 (09:08 +0100)
The recently added standard collation UNICODE (0d21d4b9bc) doesn't
give consistent results on some build farm members with old ICU
versions.  Apparently, the ICU locale specification 'und' (language
tag style) misbehaves on some older ICU versions.  Replacing it with
'' (ICU locale ID style) fixes it at least on some OS versions.  Let's
see what the build farm says.

src/bin/initdb/initdb.c
src/include/catalog/catversion.h

index d48b7b6060c9e2679b86d4aa3c631d46e66a2f32..68d430ed63ec84aece43cefcaa5e3bf6358a6cac 100644 (file)
@@ -1498,7 +1498,7 @@ setup_collation(FILE *cmdfd)
         * that they win if libc defines a locale with the same name.
         */
        PG_CMD_PRINTF("INSERT INTO pg_collation (oid, collname, collnamespace, collowner, collprovider, collisdeterministic, collencoding, colliculocale)"
-                                 "VALUES (pg_nextoid('pg_catalog.pg_collation', 'oid', 'pg_catalog.pg_collation_oid_index'), 'unicode', 'pg_catalog'::regnamespace, %u, '%c', true, -1, 'und');\n\n",
+                                 "VALUES (pg_nextoid('pg_catalog.pg_collation', 'oid', 'pg_catalog.pg_collation_oid_index'), 'unicode', 'pg_catalog'::regnamespace, %u, '%c', true, -1, '');\n\n",
                                  BOOTSTRAP_SUPERUSERID, COLLPROVIDER_ICU);
 
        PG_CMD_PRINTF("INSERT INTO pg_collation (oid, collname, collnamespace, collowner, collprovider, collisdeterministic, collencoding, collcollate, collctype)"
index 5d1b957ed44bd340f7f7366060ff363f05ed9e44..989c3ada3817a05e9d766cc4cacc88bc4f82a663 100644 (file)
@@ -57,6 +57,6 @@
  */
 
 /*                                                     yyyymmddN */
-#define CATALOG_VERSION_NO     202303101
+#define CATALOG_VERSION_NO     202303131
 
 #endif