public inbox for [email protected]
help / color / mirror / Atom feedFrom: Dominique Devienne <[email protected]>
To: Laurenz Albe <[email protected]>
Cc: [email protected]
Subject: Re: Latest patches break one of our unit-test, related to RLS
Date: Fri, 12 Sep 2025 15:29:33 +0200
Message-ID: <CAFCRh-_OBKtabe8MO0vUocNSq_O3_b852AXknPiNhL0tNUBGQg@mail.gmail.com> (raw)
In-Reply-To: <CAFCRh--M1y2YpJJMb6undzvyvhd4geKtRWFkDyr1shHvvoOkpQ@mail.gmail.com>
References: <CAFCRh-8NwJd0jq6P=R3qhHyqU7hw0BTor3W0SvUcii24et+zAw@mail.gmail.com>
<CAFCRh-93hsRvoJqQCwXq06=AJJJ_s783gVsGHKc-QjgOO6jGVg@mail.gmail.com>
<[email protected]>
<CAFCRh--DPWEHpRmdr-Jfw4guYqjc9TM_QyVH7SR4B=Le5gGe3Q@mail.gmail.com>
<CAFCRh--M1y2YpJJMb6undzvyvhd4geKtRWFkDyr1shHvvoOkpQ@mail.gmail.com>
On Fri, Sep 12, 2025 at 3:24 PM Dominique Devienne <[email protected]> wrote:
> On Fri, Sep 12, 2025 at 3:11 PM Dominique Devienne <[email protected]> wrote:
> So I don't see how my `... where v similar to 'foo[\d\w]_%'` is incorrect.
> So again, is this a bug / regression or not? Thanks, --DD
If I use (x|y) instead of [xy] it seems to behave correctly.
Whether x is the full-length POSIX class, or the shorthand notation.
This DOES look like a bug, no? I've done regexes for a long time,
and these two forms should be equivalent IMHO. --DD
postgres=# show server_version;
server_version
----------------
18rc1
(1 row)
postgres=# with t(v) as (values ('foo:bar'), ('foo/bar'), ('foo0bar'))
select v from t where v similar to 'foo[\d\w]_%';
v
---
(0 rows)
postgres=# with t(v) as (values ('foo:bar'), ('foo/bar'), ('foo0bar'))
select v from t where v similar to 'foo[[[:digit:]][[:word:]]]_%';
v
---
(0 rows)
postgres=# with t(v) as (values ('foo:bar'), ('foo/bar'), ('foo0bar'))
select v from t where v similar to 'foo([[:digit:]]|[[:word:]])_%';
v
---------
foo0bar
(1 row)
postgres=# with t(v) as (values ('foo:bar'), ('foo/bar'), ('foo0bar'))
select v from t where v similar to 'foo(\d|\w)_%';
v
---------
foo0bar
(1 row)
view thread (2+ messages)
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: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Latest patches break one of our unit-test, related to RLS
In-Reply-To: <CAFCRh-_OBKtabe8MO0vUocNSq_O3_b852AXknPiNhL0tNUBGQg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox