Thread: BUG #18521: RLS should report when non-select operation is refused

BUG #18521: RLS should report when non-select operation is refused

From
PG Bug reporting form
Date:
The following bug has been logged on the website:

Bug reference:      18521
Logged by:          Alain Picard
Email address:      alpic@benchmarkconsulting.com
PostgreSQL version: 15.1
Operating system:   Ubuntu
Description:

When dealing with RLS policies it is possible to have an update operation
for example that is refused and to received a success status.

Even when looking at logs, nothing clearly indicates that the operation was
refused. In the case of debugging, we should also be able to at least be
able to know which policy triggered the refusal.

I would even expect to have a debug mode where it is possible to trace all
of the RLS policies that are invoked, in which order and to easily identify
if and where the operation is denied.