pg_ivm/expected
Yugo Nagata 99a176ab97 Fix row level security checks during view maintenance
The view maintenance is performed under the view owner privilege.
If a modified table has a RLS policy, the policy must be applied
to relation for the pre-update-state table and the delta table
that contained inserted or deleted tuples. Previously, the security
quals were set to each ENR in a subquery that represents such
relation. However, the security check on the delta table was not
properly handled, and this caused that rows that must not be
accessed from the view owner could appear in the view contents
when the view was refreshed incrementally during a query containing
multiple types of commands, like a modifying CTE that contains
INSERT and UPDATE, or a MERGE command.

This patch fixes it by setting RLS policy to a subquery that
presents the pre-update-state table and the delta able instead of
to each RLS. Also, this change makes the code more simple and easy
to maintain.

CVE-2023-22847
2023-03-02 14:42:37 +09:00
..
create_immv.out Fix segmentation fault in incorrect view def (#39) 2022-12-15 19:03:49 +09:00
pg_ivm.out Fix row level security checks during view maintenance 2023-03-02 14:42:37 +09:00
refresh_immv.out Improve refresh_immv behavior a bit 2022-06-23 11:33:06 +09:00