From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Halil İbrahim AYHAN <ibrahimayhan@hotmail.com.tr>
To: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: PostgreSQL Windows Turkish Search Problem
Date: Thu, 11 Sep 2025 15:24:40 +0200
Message-ID: <e9427abbe32a10733eb9451fa466e4a591531a27.camel@cybertec.at> (raw)
In-Reply-To: <DB5PR10MB91944DFA22D80BE615EF5653EC09A@DB5PR10MB9194.EURPRD10.PROD.OUTLOOK.COM>
References: <DB5PR10MB91944DFA22D80BE615EF5653EC09A@DB5PR10MB9194.EURPRD10.PROD.OUTLOOK.COM>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: laurenz.albe@cybertec.at, ibrahimayhan@hotmail.com.tr, pgsql-bugs@lists.postgresql.org
Subject: Re: PostgreSQL Windows Turkish Search Problem
In-Reply-To: <e9427abbe32a10733eb9451fa466e4a591531a27.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox