The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Hot answers tagged

7

Case insensitive or accent-insensitive collations cannot be used prior to PostgreSQL 12, because internally PostgreSQL considers that strings with a different binary representation are not equal. When the collation-aware comparator says they are equal, it uses the non-collation-aware strcmp() function as a tie-breaker, to obtain what Unicode calls a "...


3

First let's note that at the time of this answer, PostgreSQL 10 in still in beta stage. Some issues about the ICU integration and how it's documented are still under discussion, and there might be changes before a GA release. ➠ How does one specify the ENCODING, LC_COLLATE, and LC_TYPE to use the new ICU collations? It's not possible currently (and ...


2

TL;DR Check out the pg_collation_actual_version() function.   DETAILS The PostgreSQL documentation for ALTER COLLATION seems to discuss this issue in the "Notes" section: When using collations provided by the ICU library, the ICU-specific version of the collator is recorded in the system catalog when the collation object is created. When the ...


1

Does this mean I have the ICU libraries installed, or not? The configure option that really brings in the library is --with-icu. Currently, checking for this one seems the more reliable way to tell whether ICU has been included in the build. ICU_CFLAGS and ICU_LIBS are paths that are required only if the library is installed where the compiler does not ...


1

I think the answer is... Use MySQL to store dates/datetimes/timestamps in the limited formats that it provides, then use app code -- possibly some library in your app language -- to get at fancier formatting. As a general rule, a database is responsible for storing; the application is responsible for formatting. See also https://dev.mysql.com/doc/refman/5....


Only top voted, non community-wiki answers of a minimum length are eligible