Re: Version 17.6 changed how similar works compared to version 17.5
Laurenz Albe <laurenz.albe@cybertec.at>
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Stephan Springl <springl-psql@bfw-online.de>, pgsql-bugs@lists.postgresql.org
Date: 2025-09-14T10:43:20Z
Lists: pgsql-bugs
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Amend recent fix for SIMILAR TO regex conversion.
- e09adb5b9fc9 17.7 cited
-
Fix conversion of SIMILAR TO regexes for character classes
- e3ffc3e91d04 17.6 cited
On Fri, 2025-09-12 at 15:45 +0200, Stephan Springl wrote:
> version 17.6 changed how similar works compared to version 17.5.
>
> With file f as
> cat >f <<END
> drop table t;
> create table t (p varchar (1));
> insert into t values ('_');
> select * from t;
> select * from t where p similar to '[\_]%';
> END
>
> psql -f f
>
> gives:
>
> DROP TABLE
> CREATE TABLE
> INSERT 0 1
> p
> ---
> _
> (1 row)
>
> p
> ---
> (0 rows)
>
> The expression with similar does not find the row. With version 17.5, the row
> was found, as wanted.
This bug was fixed in commit e09adb5b9f [1], and the fix will be shipped with
the next minor releases.
Yours,
Laurenz Albe
[1]: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=e09adb5b9fc9dec27c7ff9e9592723d7d8098b03