pgsql: Apply SELECT policies in INSERT/UPDATE+RETURNING - Mailing list pgsql-committers

From Stephen Frost
Subject pgsql: Apply SELECT policies in INSERT/UPDATE+RETURNING
Date
Msg-id E1Zj4Ma-0003Sx-Ka@gemulon.postgresql.org
Whole thread Raw
Responses Re: pgsql: Apply SELECT policies in INSERT/UPDATE+RETURNING
List pgsql-committers
Apply SELECT policies in INSERT/UPDATE+RETURNING

Similar to 7d8db3e, given that INSERT+RETURNING requires SELECT rights
on the table, apply the SELECT policies as WCOs to the tuples being
inserted.  Apply the same logic to UPDATE+RETURNING.

Back-patch to 9.5 where RLS was added.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/bd9014768035dd70f8cc33c215a8b929c2e13a35

Modified Files
--------------
src/backend/rewrite/rowsecurity.c |   32 +++++++++++++++++++++++++++++---
1 file changed, 29 insertions(+), 3 deletions(-)


pgsql-committers by date:

Previous
From: Stephen Frost
Date:
Subject: pgsql: Do not write out WCOs in Query
Next
From: Stephen Frost
Date:
Subject: pgsql: Apply SELECT policies in INSERT/UPDATE+RETURNING