Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 4B0ED11158A for ; Tue, 14 Feb 2012 14:28:28 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RxN74-0002KI-1V for pgsql-bugs@postgresql.org; Tue, 14 Feb 2012 18:28:28 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id q1EISBha011042; Tue, 14 Feb 2012 13:28:12 -0500 (EST) To: albert.cieszkowski@cc.com.pl cc: pgsql-bugs@postgresql.org Subject: Re: BUG #6457: Regexp not processing word (with special characters on ends) correctly (UTF-8) In-reply-to: References: Comments: In-reply-to albert.cieszkowski@cc.com.pl message dated "Tue, 14 Feb 2012 13:20:43 +0000" Date: Tue, 14 Feb 2012 13:28:11 -0500 Message-ID: <11041.1329244091@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201202/113 X-Sequence-Number: 32456 albert.cieszkowski@cc.com.pl writes: > peimp=> select 'Świnoujście' ~* '\mŚwinoujście\M'; > ?column? > ---------- > f > (1 row) Oh, I see the reason for this: the code in cclass() in regc_locale.c doesn't go further up than U+00FF, so no codes above that will be thought to be letters (or members of any other character class). Clearly we need to go further when we are dealing with UTF8. I'm not sure what a sane limit would be though. (It would be nice if there were a more efficient way to get this information than laboriously iterating through all the possible character codes. It doesn't look like we're even trying to cache the results, ick.) regards, tom lane