mirror of
https://github.com/postgres/postgres.git
synced 2025-12-10 14:22:35 +03:00
Reject use of ucol_strcollUTF8() before ICU 53
Various bugs can cause crashes, so don't use that function before ICU 53. It will fall back to the code path used for other encodings. Since we now tie the function availability to an ICU version, we don't need the configure test anymore. That also resolves the issue that the test result was previously hardcoded for Windows. researched by Daniel Verite <daniel@manitou-mail.org>, Peter Geoghegan <pg@bowt.ie>, Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/f1438ec6-22aa-4029-9a3b-26f79d330e72%40manitou-mail.org
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user