pgsql: Handle dependencies properly in ALTER POLICY - Mailing list pgsql-committers

From Stephen Frost
Subject pgsql: Handle dependencies properly in ALTER POLICY
Date
Msg-id E1a7UY9-0004kU-SE@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Handle dependencies properly in ALTER POLICY

ALTER POLICY hadn't fully considered partial policy alternation
(eg: change just the roles on the policy, or just change one of
the expressions) when rebuilding the dependencies.  Instead, it
would happily remove all dependencies which existed for the
policy and then only recreate the dependencies for the objects
referred to in the specific ALTER POLICY command.

Correct that by extracting and building the dependencies for all
objects referenced by the policy, regardless of if they were
provided as part of the ALTER POLICY command or were already in
place as part of the pre-existing policy.

Branch
------
master

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

Modified Files
--------------
src/backend/commands/policy.c             |   97 +++++++++++++++++++++++++++++
src/test/regress/expected/rowsecurity.out |   43 +++++++++++++
src/test/regress/sql/rowsecurity.sql      |   31 +++++++++
3 files changed, 171 insertions(+)


pgsql-committers by date:

Previous
From: Stephen Frost
Date:
Subject: pgsql: Handle dependencies properly in ALTER POLICY
Next
From: Tom Lane
Date:
Subject: pgsql: Get rid of the planner's LateralJoinInfo data structure.