Skip site navigation (1) Skip section navigation (2)

Regular expression

From: "Vyacheslav Kalinin" <vka(at)mgcp(dot)com>
To: PGSQL <pgsql-general(at)postgresql(dot)org>
Subject: Regular expression
Date: 2008-04-26 19:48:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general

Case insensitive pattern matching gives strange results for non-ascii
character (such as UTF-8 encoded cyrillic letters):
test=# select 'б' ~* 'Б' ;
(1 row)
( 'б' and 'Б' are lower and upper case variants of cyrillic 'B')

at the same time:
test=# select 'б' ilike 'Б' ;
(1 row)

(PG 8.3 on Linux, UTF-8 locale)

Also, what could be the reason for that cyrillic letters are not treated by
regexp engine as the part of [:alpha:], [:alnum:], \w etc. classes? Or they
never meant to be?


pgsql-general by date

Next:From: Tom LaneDate: 2008-04-26 20:02:56
Subject: Re: Regular expression
Previous:From: Tom LaneDate: 2008-04-26 17:18:54
Subject: Re: timestamp with time zone output incorrect

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group