Re: Docs and tests for RLS policies applied by command type - Mailing list pgsql-hackers

From Dean Rasheed
Subject Re: Docs and tests for RLS policies applied by command type
Date
Msg-id CAEZATCUsiVwCHnAcy-H90exNcNNz35t8EF7PJtQvVEfsms_ytQ@mail.gmail.com
Whole thread Raw
In response to Re: Docs and tests for RLS policies applied by command type  (jian he <jian.universality@gmail.com>)
List pgsql-hackers
On Tue, 28 Oct 2025 at 03:34, jian he <jian.universality@gmail.com> wrote:
>
> while reading the doc, this description in UPDATE section:
> """
> Note, however, that unlike a standalone UPDATE command, if the existing row does
> not pass the USING expressions, an error will be thrown (the UPDATE path will
> never be silently avoided).
> ""
>
> I think the above statement also applies to MERGE ... THEN UPDATE.
> Perhaps the table “Policies Applied by Command Type” already conveys this,
> but I’m not sure.

Yeah, reading through the text on that page in more detail, there are
a number of other omissions, or places that aren't quite fully
correct, so I've gone through those and attempted to improve things.

Also, I think it would be better if the table made the distinction
between policy checks that just filter out rows, without throwing an
error, and checks that do cause an error to be thrown.

v4 attached.

Regards,
Dean

Attachment

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Reorganize GUC structs
Next
From: Álvaro Herrera
Date:
Subject: BRIN autosummarization lacking a snapshot