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 1fr2uw-0003BA-EJ for pgsql-general@arkaria.postgresql.org; Sat, 18 Aug 2018 15:13:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fr2uu-0005R6-Tx for pgsql-general@arkaria.postgresql.org; Sat, 18 Aug 2018 15:13:28 +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 1fr2ut-0005Qy-U7 for pgsql-general@lists.postgresql.org; Sat, 18 Aug 2018 15:13:28 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fr2um-00081z-48 for pgsql-general@lists.postgresql.org; Sat, 18 Aug 2018 15:13:27 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 161CE20D87; Sat, 18 Aug 2018 11:13:18 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Sat, 18 Aug 2018 11:13:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hintbits.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= mesmtp; bh=9Tg18R18DWvfreQ5oLPv3R/woj3VFC89DH5TyUhNVnM=; b=a0Ekb YCJhIjWYCHrsmcFYo46JdUxn3NAcIHGoxT5uBWO5xkeS5fstYdn0njKozxqwI46c 0S9tKeeXcV+/xwwgnpglH2fLGKDonAESYqw2z2lfJmWh2jkXhFgIixnaakCkFQ1X ihmHVw26TChyeEjrSutCFiXktcjcMpRjCvknGw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=9Tg18R18DWvfreQ5oLPv3R/woj3VF C89DH5TyUhNVnM=; b=p1BJrmnv/o7FTTQVDRBEbUz6D9/uv2hB4QXIoiTV9c5N+ 0nVNy//W1jYM84ovrArcnJ36J8v4PeVqo488CcDIWSTRarkey0ki5RsUAlylNGOo iEBX3TfgPIAXiUaOVP7XxfzaDwGz2uWZ0fZ9fsGSOajuIRhcYOYGbsuNrJlTJbme YFYO3fOUAMq/n5fIbpX4bZcY6DUkUHihjRsqA3Fy7DmtIY/ZAmiuvjAgqMzUGsys GTSAx8XLoArjNlXXZWhmU071Y6CVghL5KItvyMos6zc+cq3pLrKa9jNEOdBfcgiY LEvas7JC6GfBTVDtt9sGUuzzHrmAPUbAVMCyNBwcQ== X-ME-Proxy: X-ME-Sender: Received: from [192.168.88.116] (unknown [31.135.125.72]) by mail.messagingengine.com (Postfix) with ESMTPA id 48645E4074; Sat, 18 Aug 2018 11:13:16 -0400 (EDT) From: Oleksii Kliukin Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_3C822DF3-559C-4140-BAA3-F2929911C0FD" Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: regex match and special characters Date: Sat, 18 Aug 2018 18:12:43 +0300 In-Reply-To: Cc: Andreas Joseph Krogh , pgsql-general@lists.postgresql.org To: Adrian Klaver References: X-Mailer: Apple Mail (2.3445.9.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_3C822DF3-559C-4140-BAA3-F2929911C0FD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Adrian, > On 16. Aug 2018, at 18:13, Adrian Klaver = wrote: >=20 > test=3D# select 'abcd'||chr(8198) ~ 'abcd\s'; > ?column? > ---------- > t > (1 row) >=20 >=20 > Wonder if the OP has standard_conforming_strings=3D'off' and > escape_string_warning=3D'off'? >=20 Both are set to =E2=80=98on=E2=80=99 for me for all versions (I believe = those are default settings). I have 12devel indeed on my test system = alongside 9.6, but I=E2=80=99ve tried it as well on PostgreSQL 10 = running on a different distro with different locale settings and it = produced the same result (check being true).=20 I think Tom=E2=80=99s answer solves it, although I am wondering how did = you get true in the statement quoted above on PostgreSQL 9.6, perhaps = that result is actually from PostgreSQL 10? Cheers, Oleksii= --Apple-Mail=_3C822DF3-559C-4140-BAA3-F2929911C0FD Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi = Adrian,

On 16. Aug 2018, at 18:13, = Adrian Klaver <adrian.klaver@aklaver.com> wrote:

test=3D# select = 'abcd'||chr(8198) ~ 'abcd\s';
?column?
----------
t
(1 = row)


Wonder if the = OP has standard_conforming_strings=3D'off' and
escape_string_warning=3D'off'?


Both are set to =E2=80=98on=E2=80=99 = for me for all versions (I believe those are default settings). I have = 12devel indeed on my test system alongside 9.6, but I=E2=80=99ve tried = it as well on PostgreSQL 10 running on a different distro with different = locale settings and it produced the same result (check being = true). 

I = think Tom=E2=80=99s answer solves it, although I am wondering how did = you get true in the statement quoted above on PostgreSQL 9.6, perhaps = that result is actually from PostgreSQL 10?

Cheers,
Oleksii
= --Apple-Mail=_3C822DF3-559C-4140-BAA3-F2929911C0FD--