How Do I Use ICU Collation on a PostgresSQL Server Installed in Windows OS Like CentOS?

Asked 2 years ago, Updated 2 years ago, 49 views

How do I use ICU Collation on PostgresSQL server ver.10 that I installed on Windows OS like CentOS?

We would like to trace this article.

windows postgresql

2022-09-29 21:41

2 Answers

Even for Windows versions, the ICU appears to be installed, and the following commands succeeded:

CREATE TABLE t(text COLLATE "ja-x-icu");
CREATE COLLECTION digitslast (provider=icu, locale='ja-u-kr-latn-digit');

However, when you do the following, no alphanumeric characters come before you.

 select * from order by t collate "digitslast";

The document 23.2.Match Order Support page contains the following information, which is not an error, but specifying the match order does not appear to be working.

By design, the ICU accepts any string as the locale name and uses the fallback procedure described in the document to match the nearest locale provided by the ICU.
Therefore, there is no direct feedback if the installed ICU actually configured the matching order with features that it does not support.
Therefore, we recommend that you create an application-level test case to verify that the match order definition meets the requirements.

This issue appears to be a link issue with the ICU when compiling PostgreSQL, so VC++ knowledge is required to correct it.If you don't want to learn VC++, you should use the Linux version honestly.I've been crying because of these problems with Windows and the difficulty of compiling with VC++, so I try to use the basic Linux version.

For Windows OS, you can use Linux for free using WSL, Vagrant, Docker, and PostgreSQL is a network connection, so there is no problem using it from apps on Windows OS.


2022-09-29 21:41

As you can see from the fact that the distribution file contains icu*53.dll, it was built using ICU53.Just in case

 C:\>pg_config --configure
--enable-thread-safe --enable-nls --with-ldap --with-opensl --with-ossp-uuid --with-libxml --with-libxslt --with-icu --with-tcl --with-perl --with-python

But it contains --with-icu.By the way, ICU support on Windows and Add MSVC build system support for ICU REL_10_BETA2 or later source code may be incorporated.

I chased the source code, but found only two points:

I would like to trace this article

What can't we actually do?


2022-09-29 21:41

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.