Re: Sv: Re: Sv: Re: regex match and special characters

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Andreas Joseph Krogh <andreas(at)visena(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Sv: Re: Sv: Re: regex match and special characters
Date: 2018-08-16 15:38:47
Message-ID: 8b8d9250-1ee3-6aff-b580-592c7c759586@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 08/16/2018 08:19 AM, Adrian Klaver wrote:
> On 08/16/2018 08:13 AM, Adrian Klaver wrote:
>
>>
>>
>> Wonder if the OP has standard_conforming_strings='off' and
>> escape_string_warning='off'?
>
> In the above referring to 9.6.9 instance.

Well that theory is no good:

test=# select version();
version

-------------------------------------------------------------------------------------
PostgreSQL 9.6.7 on x86_64-pc-linux-gnu, compiled by gcc (SUSE Linux)
4.8.5, 64-bit
(1 row)

test=# set standard_conforming_strings='off';
SET
test=# show standard_conforming_strings;
standard_conforming_strings
-----------------------------
off

test=# show escape_string_warning;
escape_string_warning
-----------------------
off

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

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

test=# set escape_string_warning='on';
SET
test=# set standard_conforming_strings='on';
SET

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

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

>>
>>
>>
>>> --
>>> *Andreas Joseph Krogh*
>>> CTO / Partner - Visena AS
>>> Mobile: +47 909 56 963
>>> andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
>>> www.visena.com <https://www.visena.com>
>>> <https://www.visena.com>
>>
>>
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message PO 2018-08-16 15:41:10 pg_upgrade (and recovery) pitfalls
Previous Message Adrian Klaver 2018-08-16 15:19:04 Re: Sv: Re: Sv: Re: regex match and special characters