On Thu, Jul 31, 2025 at 1:50 PM PG Bug reporting form
<noreply@postgresql.org> wrote:
> When applying UPPER() to the Greek word 'κόσμος', PostgreSQL returns
> 'ΚΌΣΜΟΣ'. However, applying LOWER() to that result returns 'κόσμοσ' instead
> of the original 'κόσμος'.
Hi,
For built-in collations, context-sensitive case mappings are a
forthcoming feature which will be available in PG18 later this year,
with the pg_unicode_fast collation:
CREATE TABLE example (
a text COLLATE PG_UNICODE_FAST,
b text COLLATE PG_C_UTF8
);
INSERT INTO example VALUES ('κόσμος', 'κόσμος');
SELECT LOWER(UPPER(a)), LOWER(UPPER(b)) FROM example;
lower | lower
--------+--------
κόσμος | κόσμοσ
(1 row)
--
John Naylor
Amazon Web Services