Re: regex match and special characters

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Oleksii Kliukin <alexk(at)hintbits(dot)com>
Cc: Andreas Joseph Krogh <andreas(at)visena(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: regex match and special characters
Date: 2018-08-18 16:51:42
Message-ID: 1c5ff920-f8ff-fdc9-1dac-33be0f7ef714@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 08/18/2018 08:12 AM, Oleksii Kliukin wrote:
> Hi Adrian,
>
>> On 16. Aug 2018, at 18:13, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com
>> <mailto:adrian(dot)klaver(at)aklaver(dot)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(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tim Cross 2018-08-19 02:56:52 Re: AW: CTE with JOIN of two tables is much faster than a regular query
Previous Message kpi6288 2018-08-18 16:33:30 AW: CTE with JOIN of two tables is much faster than a regular query