BUG #5780: Case insensitive regular expressions

From: "Thomas Bakketun" <thomasb(at)copyleft(dot)no>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5780: Case insensitive regular expressions
Date: 2010-12-01 17:27:42
Message-ID: 201012011727.oB1HRgWY095398@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 5780
Logged by: Thomas Bakketun
Email address: thomasb(at)copyleft(dot)no
PostgreSQL version: 8.4.5
Operating system: Ubuntu 10.04.1 LTS
Description: Case insensitive regular expressions
Details:

Apparently case insensitivity in regular expressions only works for ASCII
characters.

ksys(at)nallemaja:~$ psql -l
List of databases
Name | Owner | Encoding | Collation | Ctype | Access
privileges
-----------+----------+----------+-------------+-------------+--------------
---------
ksys | ksys | UTF8 | nb_NO.UTF-8 | nb_NO.UTF-8 |
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
s2ksys | ksys | UTF8 | nb_NO.UTF-8 | nb_NO.UTF-8 |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
:
postgres=CTc/postgres
template1 | postgres | UTF8 | nb_NO.UTF-8 | nb_NO.UTF-8 |
template2 | postgres | UTF8 | nb_NO.UTF-8 | nb_NO.UTF-8 |
test1 | ksys | UTF8 | nb_NO.UTF-8 | nb_NO.UTF-8 |
(7 rows)

ksys(at)nallemaja:~$ psql ksys
psql (8.4.5)
Type "help" for help.

ksys=> select 'Øst' ilike 'øst', 'Øst' ~* 'øst';
?column? | ?column?
----------+----------
t | f
(1 row)

The different behavior of ilike and case insensitive regular expressions is
surprising. I would have expected both to return true. The documentation
makes it clear ilike depends on the current locale, but not so regarding
regular expressions.

Browse pgsql-bugs by date

  From Date Subject
Next Message Grant Hutchins and Peter Jaros 2010-12-02 15:44:29 BUG #5781: unaccent() function should be marked IMMUTABLE
Previous Message Euler Taveira de Oliveira 2010-12-01 14:19:24 Re: BUG #5778: pgAdminIII 1.12.1 Japanese Translation File