Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fqImo-0001II-TZ for pgsql-general@arkaria.postgresql.org; Thu, 16 Aug 2018 13:58:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fqImm-0001y8-Q0 for pgsql-general@arkaria.postgresql.org; Thu, 16 Aug 2018 13:58:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fqImb-00013V-Sx for pgsql-general@lists.postgresql.org; Thu, 16 Aug 2018 13:57:49 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fqImX-00020s-HL for pgsql-general@postgresql.org; Thu, 16 Aug 2018 13:57:48 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w7GDvdfr009647; Thu, 16 Aug 2018 09:57:40 -0400 From: Tom Lane To: Alex Kliukin cc: pgsql-general@postgresql.org Subject: Re: regex match and special characters In-reply-to: <1534417178.2357012.1476047168.78425024@webmail.messagingengine.com> References: <1534417178.2357012.1476047168.78425024@webmail.messagingengine.com> Comments: In-reply-to Alex Kliukin message dated "Thu, 16 Aug 2018 12:59:38 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9645.1534427859.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 16 Aug 2018 09:57:39 -0400 Message-ID: <9646.1534427859@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alex Kliukin writes: > Here is a simple SQL statement that gives different results on PostgreSQ= L 9.6 and PostgreSQL 10+. The space character at the end of the string is = actually U+2006 SIX-PER-EM SPACE (http://www.fileformat.info/info/unicode/= char/2006/index.htm) I think the reason for the discrepancy is that in v10 we fixed the regex locale support so that it could properly classify code points above U+7FF, cf https://git.postgresql.org/gitweb/?p=3Dpostgresql.git&a=3Dcommitdiff&h=3Dc= 54159d44ceaba26ceda9fea1804f0de122a8f30 So 10 is giving the right answer (i.e. that \s matches U+2006). 9.x is not, but we're not going to back-patch such a large change. regards, tom lane