On Tue, 5 Nov 2024 at 16:17, Peter Eisentraut <pe...@eisentraut.org> wrote:
>
> New patch version.

What happened with the RLS support? It looks like you moved the code
to expand virtual generated columns back to the first loop in
fireRIRrules(), which doesn't work because RLS policies might contain
references to virtual generated columns.

In the v7 patch, it was done in a separate loop, after the RLS policy
loop, which I thought was fine, except that I didn't like having a
whole new loop, opening and closing all the relations in the query.
Was there some other problem with that approach?

What I originally had in mind was doing it at the end of the RLS
policy loop, rather than adding another loop, as in the attached delta
patch. This passes all the current tests, and appears to work fine in
the new tests with RLS policies referring to virtual generated
columns.

Regards,
Dean

Attachment: rls-fix.patch.no-cfbot
Description: Binary data

Reply via email to