From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Oleksii Kliukin <alexk@hintbits.com>
Cc: Andreas Joseph Krogh <andreas@visena.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: regex match and special characters
Date: Sat, 18 Aug 2018 09:51:42 -0700
Message-ID: <1c5ff920-f8ff-fdc9-1dac-33be0f7ef714@aklaver.com> (raw)
In-Reply-To: <D46B147F-6532-4C2A-808F-AADAA160698B@hintbits.com>
References: <VisenaEmail.3c.a2f490fd2f459412.1654333b814@tc7-visena>
<abb828a5-3483-c595-4316-a9ee48837e86@aklaver.com>
<D46B147F-6532-4C2A-808F-AADAA160698B@hintbits.com>
On 08/18/2018 08:12 AM, Oleksii Kliukin wrote:
> Hi Adrian,
>
>> On 16. Aug 2018, at 18:13, Adrian Klaver <adrian.klaver@aklaver.com
>> <mailto: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?
Yes it was on Postgres 10. I got reversed in my thinking. A subsequent post:
https://www.postgresql.org/message-id/8b8d9250-1ee3-6aff-b580-592c7c759586%40aklaver.com
shows the behavior you saw on 9.6. What happens when I work through my
thought process on line:(
>
> Cheers,
> Oleksii
--
Adrian Klaver
adrian.klaver@aklaver.com
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: adrian.klaver@aklaver.com, alexk@hintbits.com, andreas@visena.com
Subject: Re: regex match and special characters
In-Reply-To: <1c5ff920-f8ff-fdc9-1dac-33be0f7ef714@aklaver.com>
References: <VisenaEmail.3c.a2f490fd2f459412.1654333b814@tc7-visena> <abb828a5-3483-c595-4316-a9ee48837e86@aklaver.com> <D46B147F-6532-4C2A-808F-AADAA160698B@hintbits.com> <1c5ff920-f8ff-fdc9-1dac-33be0f7ef714@aklaver.com>
* 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