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

Regexps vs. locale

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Regexps vs. locale
Date: 2008-12-08 08:11:58
Message-ID: 87ljurozld.fsf@news-spur.riddles.org.uk (view raw or flat)
Thread:
Lists: pgsql-hackers
This came up on irc:

postgres=# show lc_ctype;
  lc_ctype   
-------------
 fr_FR.UTF-8

postgres=# show server_encoding;
 server_encoding 
-----------------
 UTF8
(1 row)

postgres=# select E'\303\201' ILIKE  E'\303\241';
 ?column? 
----------
 t
(1 row)

postgres=# select E'\303\201' ~*  E'\303\241';
 ?column? 
----------
 f
(1 row)

Obviously, this happens because the locale support functions in
backend/regex/regc_locale.c are (presumably intentionally) crippled so
as not to support non-ascii chars, despite all the code there using
wide chars for everything otherwise.

Why is this? It does not appear to be a documented restriction.

-- 
Andrew (irc:RhodiumToad)

Responses

pgsql-hackers by date

Next:From: Greg StarkDate: 2008-12-08 08:59:45
Subject: Re: Multiplexing SUGUSR1
Previous:From: Heikki LinnakangasDate: 2008-12-08 08:04:24
Subject: Multiplexing SUGUSR1

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