diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/pg_config.h.in | 3 | ||||
-rw-r--r-- | src/include/pg_config.h.win32 | 3 | ||||
-rw-r--r-- | src/include/utils/pg_locale.h | 13 |
3 files changed, 13 insertions, 6 deletions
diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index 7a05c7e5b85..dcb7a1a3209 100644 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@ -606,9 +606,6 @@ /* Define to 1 if you have the external array `tzname'. */ #undef HAVE_TZNAME -/* Define to 1 if you have the `ucol_strcollUTF8' function. */ -#undef HAVE_UCOL_STRCOLLUTF8 - /* Define to 1 if you have the <ucred.h> header file. */ #undef HAVE_UCRED_H diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32 index 9d3021ced88..7f60670fa6f 100644 --- a/src/include/pg_config.h.win32 +++ b/src/include/pg_config.h.win32 @@ -457,9 +457,6 @@ /* Define to 1 if you have the external array `tzname'. */ /* #undef HAVE_TZNAME */ -/* Define to 1 if you have the `ucol_strcollUTF8' function. */ -#define HAVE_UCOL_STRCOLLUTF8 1 - /* Define to 1 if the system has the type `uint64'. */ /* #undef HAVE_UINT64 */ diff --git a/src/include/utils/pg_locale.h b/src/include/utils/pg_locale.h index a02d27ba266..f3e04d4d8ce 100644 --- a/src/include/utils/pg_locale.h +++ b/src/include/utils/pg_locale.h @@ -21,6 +21,19 @@ #include "utils/guc.h" +#ifdef USE_ICU +/* + * ucol_strcollUTF8() was introduced in ICU 50, but it is buggy before ICU 53. + * (see + * <https://www.postgresql.org/message-id/flat/f1438ec6-22aa-4029-9a3b-26f79d330e72%40manitou-mail.org>) + */ +#if U_ICU_VERSION_MAJOR_NUM >= 53 +#define HAVE_UCOL_STRCOLLUTF8 1 +#else +#undef HAVE_UCOL_STRCOLLUTF8 +#endif +#endif + /* GUC settings */ extern char *locale_messages; |