Re: Latest patches break one of our unit-test, related to RLS

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Dominique Devienne <ddevienne(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Latest patches break one of our unit-test, related to RLS
Date: 2025-09-15 23:59:15
Message-ID: aMioU500pBYs_mBz@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Sep 13, 2025 at 05:00:20PM -0400, Tom Lane wrote:
> Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Westermann (DWE) 2025-09-16 09:09:59 EDB Windows Installer on Windows Server 2025
Previous Message Adrian Klaver 2025-09-15 14:17:50 Re: How to use \restrict or \unrestirct in python