Re: Latest patches break one of our unit-test, related to RLS
Laurenz Albe <laurenz.albe@cybertec.at>
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Dominique Devienne <ddevienne@gmail.com>, pgsql-general@postgresql.org
Date: 2025-09-12T12:45:56Z
Lists: pgsql-general
On Fri, 2025-09-12 at 14:22 +0200, Dominique Devienne wrote: > On Thu, Sep 4, 2025 at 5:03 PM Dominique Devienne <ddevienne@gmail.com> wrote: > > OK with 16.9 and 17.5 (we cannot test on beta2 anymore) > > KO with 16.10 and 17.6 (and beta3 too, released at the same time) > > I've tracked down the regression to this particular query, FWIW: > > select rolname, rolsuper, rolinherit, rolcreaterole, > rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, > oid, shobj_description(oid, 'pg_authid') > from pg_roles > where rolname SIMILAR TO $1 AND pg_has_role(oid, 'SET') > order by rolname > > In 17.5, returns 3 rows. > In 17.6, returns 0 rows. That must be commit e3ffc3e91d. That commit fixed a bug in the conversion from SIMILAR TO expressions to POSIX regular expressions. You don't show us that data that match the pattern in 17.5, but not in 17.6. Unless you show us a counterexample, I'd say that the behavior in 17.6 is correct. Minor releases shouldn't change the behavior EXCEPT when the behavior is buggy. Yours, Laurenz Albe
Commits
-
Amend recent fix for SIMILAR TO regex conversion.
- f75ff1b141a5 14.20 landed
- e09adb5b9fc9 17.7 landed
- cdf7feb96562 19 (unreleased) landed
- 9fd531534b64 15.15 landed
- 802308693f2f 18.0 landed
- 308773617d2d 13.23 landed
- 281ad4ed11d2 16.11 landed
-
Fix conversion of SIMILAR TO regexes for character classes
- e3ffc3e91d04 17.6 cited