Re: Latest patches break one of our unit-test, related to RLS - Mailing list pgsql-general

From Michael Paquier
Subject Re: Latest patches break one of our unit-test, related to RLS
Date
Msg-id aMioU500pBYs_mBz@paquier.xyz
Whole thread Raw
In response to Re: Latest patches break one of our unit-test, related to RLS  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Sat, Sep 13, 2025 at 05:00:20PM -0400, Tom Lane wrote:
> Laurenz Albe <laurenz.albe@cybertec.at> writes:
> > I came up with the attached patch set.
>
> I did some more work on the comments, adjusted a couple of places that
> could be simplified, and pushed it.

My apologies for the silence here.

The timing of the events is interesting.  I have been pinged about
this issue on Friday evening/night time here:
https://www.postgresql.org/message-id/202509121631.dtn5kw5er2m5@alvherre.pgsql

For a fix applied as of cdf7feb96562 roughly 24 hours after this ping.
The timing was a bit bad for me, because I was already gone for what
was a long weekend in Japan, just back today.  So it was a bit hard
for me to look at anything

> I didn't really love the "fix it and then explain it afterward"
> approach.  It's hard to review a patch if you don't understand the
> logic.  I considered swapping the order of the two patches, but
> eventually just merged them into one.

Merging both things makes sense as well here.

Ugh, yes.  That was wrong.  With the fix, '%' is translated:
-   Filter: (f1 ~ '^(?:[\a].*)$'::text)
Before the fix, not translated.
+   Filter: (f1 ~ '^(?:[\a]%)$'::text)

Thanks for the report, the analysis, and the commit.
--
Michael

Attachment

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: How to use _estrict or \unrestirct in python