Re: PostgreSQL Windows Turkish Search Problem - Mailing list pgsql-bugs

From Laurenz Albe
Subject Re: PostgreSQL Windows Turkish Search Problem
Date
Msg-id e9427abbe32a10733eb9451fa466e4a591531a27.camel@cybertec.at
Whole thread Raw
In response to PostgreSQL Windows Turkish Search Problem  (Halil İbrahim AYHAN <ibrahimayhan@hotmail.com.tr>)
List pgsql-bugs
On Thu, 2025-09-11 at 07:42 +0000, Halil İbrahim AYHAN wrote:
> I am using PostgreSQL Windows version as Turkish Collation
> The table contains the record "ŞİLİ" and "şili",
> When I Search with ILike, It Does Not Perform Case-Insensitive Searches,
> When I search with uppercase letters, I get 1 result, and when I search with lowercase letters, I get 1 result.
> There is no problem with Turkish Collection in Linux Version and 2 results are given.
> This problem occurs in Windows version.

There is a lack of SQL statements in your report, but I assume
this is either a user error or a shortcoming of the Windows
C library, both of which are not under our control.

Try like this:

  CREATE COLLATION turkish_ci (
     PROVIDER = icu,
     DETERMINISTIC = FALSE,
     LOCALE = 'tr-TR@colStrength=level2'
  );

  CREATE TABLE tr (st text COLLATE turkish_ci);

  INSERT INTO tr VALUES ('ŞİLİ'), ('şili');

  SELECT * FROM tr WHERE st = 'şili';

    st
  ══════
   ŞİLİ
   şili
  (2 rows)

You could also define the column with a different collation and
add the COLLATE clause in the query.

Yours,
Laurenz Albe



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #19050: psql: could not find digest for NID UNDEF
Next
From: Andrey Teplitskiy
Date:
Subject: Re: BUG #18760: ../doc/src/sgml/postgres.sgml:24: element book: validity error : No declaration for attribute id of