Re: regex match and special characters - Mailing list pgsql-general

From Oleksii Kliukin
Subject Re: regex match and special characters
Date
Msg-id D46B147F-6532-4C2A-808F-AADAA160698B@hintbits.com
Whole thread Raw
In response to Re: Sv: Re: Sv: Re: regex match and special characters  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: regex match and special characters
List pgsql-general
Hi Adrian,

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

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


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


Both are set to ‘on’ for me for all versions (I believe those are default settings). I have 12devel indeed on my test system alongside 9.6, but I’ve 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’s 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

pgsql-general by date:

Previous
From:
Date:
Subject: AW: CTE with JOIN of two tables is much faster than a regular query
Next
From: Tom Lane
Date:
Subject: Re: CTE with JOIN of two tables is much faster than a regular query