pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: baurzhansahariev@gmail.com
Subject: BUG #18218: NOT LIKE ANY returns same result as LIKE ANY when array items are wrapped into E''
Date: Thu, 30 Nov 2023 10:54:36 +0000
Message-ID: <18218-8cbdd922e41ea291@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      18218
Logged by:          Baurzhan Sakhariyev
Email address:      baurzhansahariev@gmail.com
PostgreSQL version: 15.0
Operating system:   MacOS
Description:        

https://www.db-fiddle.com/f/cpNjWRLmQT6UFb2wEo2LoG/0

select 'TextToMatch' like any (array[E'Te\%tch', E'nomatch']); -- true,
correct
select 'TextToMatch' NOT like any (array[E'Te\%tch', E'nomatch']); -- true
but must be false because it's a negated version of the expression above

Please note, that versions without E'' work as expected. 
select 'TextToMatch' like any (array['Te\%tch', 'nomatch']); -- false
select 'TextToMatch' NOT like any (array['Te\%tch', 'nomatch']); -- true



view thread (4+ messages)  latest in thread

Message-ID: <18218-8cbdd922e41ea291@postgresql.org>
Permalink:  ../18218-8cbdd922e41ea291@postgresql.org/
Also on:    postgresql.org/message-id/18218-8cbdd922e41ea291@postgresql.org

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, baurzhansahariev@gmail.com
  Subject: Re: BUG #18218: NOT LIKE ANY returns same result as LIKE ANY when array items are wrapped into E''
  In-Reply-To: <18218-8cbdd922e41ea291@postgresql.org>

* 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