mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
Make RLS work with UPDATE ... WHERE CURRENT OF
UPDATE ... WHERE CURRENT OF would not work in conjunction with RLS. Arrange to allow the CURRENT OF expression to be pushed down. Issue noted by Peter Geoghegan. Patch by Dean Rasheed. Back patch to 9.5 where RLS was introduced.
This commit is contained in:
@@ -1492,6 +1492,16 @@ contain_leaked_vars_walker(Node *node, void *context)
|
||||
}
|
||||
break;
|
||||
|
||||
case T_CurrentOfExpr:
|
||||
|
||||
/*
|
||||
* WHERE CURRENT OF doesn't contain function calls. Moreover, it
|
||||
* is important that this can be pushed down into a
|
||||
* security_barrier view, since the planner must always generate
|
||||
* a TID scan when CURRENT OF is present -- c.f. cost_tidscan.
|
||||
*/
|
||||
return false;
|
||||
|
||||
default:
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user