pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alex Kliukin <alexk@hintbits.com>
Cc: pgsql-general@postgresql.org
Subject: Re: regex match and special characters
Date: Thu, 16 Aug 2018 09:57:39 -0400
Message-ID: <9646.1534427859@sss.pgh.pa.us> (raw)
In-Reply-To: <1534417178.2357012.1476047168.78425024@webmail.messagingengine.com>
References: <1534417178.2357012.1476047168.78425024@webmail.messagingengine.com>

Alex Kliukin <alexk@hintbits.com> writes:
> Here is a simple SQL statement that gives different results on PostgreSQL 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=postgresql.git&a=commitdiff&h=c54159d44ceaba26ceda9fea1...

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




view thread (6+ messages)  latest in thread

Message-ID: <9646.1534427859@sss.pgh.pa.us>
Permalink:  ../9646.1534427859@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9646.1534427859@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alexk@hintbits.com
  Subject: Re: regex match and special characters
  In-Reply-To: <9646.1534427859@sss.pgh.pa.us>
  References: <1534417178.2357012.1476047168.78425024@webmail.messagingengine.com> <9646.1534427859@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox