aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistscan.c
diff options
context:
space:
mode:
authorStephen Frost <sfrost@snowman.net>2017-05-06 21:46:41 -0400
committerStephen Frost <sfrost@snowman.net>2017-05-06 21:46:41 -0400
commit92b15224b4eac8eeae0616491ccf0c852fa2dff9 (patch)
treed5016715ddfca56474137e7c2249953f3070acbd /src/backend/access/gist/gistscan.c
parenta24a1a2ec44d71cf43bdafc2c17db370cd1908ea (diff)
downloadpostgresql-92b15224b4eac8eeae0616491ccf0c852fa2dff9.tar.gz
postgresql-92b15224b4eac8eeae0616491ccf0c852fa2dff9.zip
RLS: Fix ALL vs. SELECT+UPDATE policy usage
When we add the SELECT-privilege based policies to the RLS with check options (such as for an UPDATE statement, or when we have INSERT ... RETURNING), we need to be sure and use the 'USING' case if the policy is actually an 'ALL' policy (which could have both a USING clause and an independent WITH CHECK clause). This could result in policies acting differently when built using ALL (when the ALL had both USING and WITH CHECK clauses) and when building the policies independently as SELECT and UPDATE policies. Fix this by adding an explicit boolean to add_with_check_options() to indicate when the USING policy should be used, even if the policy has both USING and WITH CHECK policies on it. Reported by: Rod Taylor Back-patch to 9.5 where RLS was introduced.
Diffstat (limited to 'src/backend/access/gist/gistscan.c')
0 files changed, 0 insertions, 0 deletions