ICU warnings during make installcheck and text_extensions test
От | Oleg Tselebrovskiy |
---|---|
Тема | ICU warnings during make installcheck and text_extensions test |
Дата | |
Msg-id | b54921f95e23b4391b1613e9053a3d58@postgrespro.ru обсуждение исходный текст |
Список | pgsql-hackers |
Greetings, everyone! When you try to run installcheck using a cluster that was initialized with ICU (./initdb -D ../data --locale-provider=icu --icu-locale='en_US_POSIX') and NO_LOCALE=1 you get a warning: # +++ regress install-check in src/test/regress +++ # using postmaster on Unix socket, default port WARNING: could not convert locale name "C" to language tag: U_ILLEGAL_ARGUMENT_ERROR WARNING: ICU locale "C" has unknown language "c" HINT: To disable ICU locale validation, set the parameter "icu_validation_level" to "disabled". This happens with PostgreSQL 16, 17 and master While this case is somewhat superficial (you need ICU and NO_LOCALE), when you try to run installcheck of test_extensions test module (using a cluster initialized with ICU) you will get the same warnings due to NO_LOCALE=1 in Makefile There could be an argument "if you are using ICU and don't want warnings just set icu_validation_level=disabled in postgresql.conf", but then installcheck fails because of collate.icu.utf8 like this: CREATE COLLATION testx (provider = icu, locale = '@colStrength=primary;nonsense=yes'); DROP COLLATION testx; -WARNING: could not convert locale name "@colStrength=primary;nonsense=yes" to language tag: U_ILLEGAL_ARGUMENT_ERROR CREATE COLLATION testx (provider = icu, locale = 'nonsense-nowhere'); DROP COLLATION testx; -WARNING: ICU locale "nonsense-nowhere" has unknown language "nonsense" -HINT: To disable ICU locale validation, set the parameter "icu_validation_level" to "disabled". CREATE COLLATION test4 FROM nonsense; And we definitely want to check warnings there So for now I propose adding icu_validation_level=disabled to pg_regress when we were passed NO_LOCALE=1 (patch is attached) Also since locale 'C' isn't converted to anything with ICU since f3a01af, maybe we want to somehow handle NO_LOCALE with ICU in a special way? Maybe only during tests? On another none, test test_extensions from src/test/modules/test_extensions fails during installcheck when the cluster was initialized with ICU locale. It was already reported at [1]. This test fails on current REL_17_STABLE (2530367) and master (2a5e709) One way to fix it is to just skip the test if we find ICU locale provider (patch attached bellow), but I'm not sure this is the optimal way. In [1] there was an attempt to replace \dx+ with function with collation-independent output [1] https://www.postgresql.org/message-id/a2fd691f8d9f1325cec1283b161d6a8e@postgrespro.ru
Вложения
В списке pgsql-hackers по дате отправления: