From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: james.inform@pharmapp.de
Subject: BUG #15892: URGENT: Using an ICU collation in a primary key column breaks ILIKE query
Date: Wed, 03 Jul 2019 22:50:17 +0000
Message-ID: <15892-e5d2bea3e8a04a1b@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 15892
Logged by: James Inform
Email address: james.inform@pharmapp.de
PostgreSQL version: 11.4
Operating system: Linux Mint 19 Tara / Mac OS X 10.13.6
Description:
-- This is tested under Linux Mint 19 Tara with uconv v2.1 ICU 60.2
-- and Mac OS X 10.13.6 with uconv v2.1 ICU 58.2
-- PostgreSQL Version 11.4
-- PostgreSQL was built with: ./configure '--prefix=/home/myself/pg114'
'--with-systemd' '--with-icu' '--with-libxml' '--with-libxslt' '--with-perl'
'--with-python' '--disable-rpath' '--with-extra-version= ICU'
-- STEPS to reproduce
-- First you need PostgreSQL 11.4 built with ICU support
create database testdb;
\c testdb;
-- Just create a simple table with one column
create table icutest(data text not null collate "de-x-icu" primary key);
-- Insert a record with uppercase string
insert into icutest values ('MYTEST');
-- This is not giving a match
select * from icutest where data ilike 'mytest';
-- These two queries give the exspected result
select * from icutest where lower(data) ilike 'mytest';
select * from icutest where data ilike ('mytest' collate "default");
-- If you do the same with a non primary source column, then everything
works like exspected
-- I'm not an Expert, but maybe the index behind the primary key is based on
the wrong collation
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, james.inform@pharmapp.de
Subject: Re: BUG #15892: URGENT: Using an ICU collation in a primary key column breaks ILIKE query
In-Reply-To: <15892-e5d2bea3e8a04a1b@postgresql.org>
References: <15892-e5d2bea3e8a04a1b@postgresql.org>
* 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