postgresql/src/bin/initdb
Peter Eisentraut 3a671e1f7c Fix global ICU collations for ICU < 54
createdb() didn't check for collation attributes validity, which has
to be done explicitly on ICU < 54.  It also forgot to close the ICU collator
opened during the check which leaks some memory.

To fix both, add a new check_icu_locale() that does all the appropriate
verification and close the ICU collator.

initdb also had some partial check for ICU < 54.  To have consistent error
reporting across major ICU versions, and get rid of the need to include ucol.h,
remove the partial check there.  The backend will report an error if needed
during the post-boostrap iniitialization phase.

Author: Julien Rouhaud <julien.rouhaud@free.fr>
Discussion: https://www.postgresql.org/message-id/20220319041459.qqqiqh335sga5ezj@jrouhaud
2022-03-20 10:21:45 +01:00
..
po Translation updates 2021-06-21 12:33:50 +02:00
t Fix global ICU collations for ICU < 54 2022-03-20 10:21:45 +01:00
.gitignore Move wchar.c and encnames.c to src/common/. 2020-01-16 15:58:55 -05:00
Makefile Fix global ICU collations for ICU < 54 2022-03-20 10:21:45 +01:00
findtimezone.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
initdb.c Fix global ICU collations for ICU < 54 2022-03-20 10:21:45 +01:00
nls.mk Translation updates 2021-05-10 14:36:21 +02:00