pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Handle dependencies properly in ALTER POLICY
2+ messages / 1 participants
[nested] [flat]

* pgsql: Handle dependencies properly in ALTER POLICY
@ 2015-12-11 20:44  Stephen Frost <sfrost@snowman.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Stephen Frost @ 2015-12-11 20:44 UTC (permalink / raw)
  To: 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(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Handle dependencies properly in ALTER POLICY
@ 2015-12-11 20:44  Stephen Frost <sfrost@snowman.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Stephen Frost @ 2015-12-11 20:44 UTC (permalink / raw)
  To: 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
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/12a54c888cf7bd9c37c4ce420e84cb52debe0184

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(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2015-12-11 20:44 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-12-11 20:44 pgsql: Handle dependencies properly in ALTER POLICY Stephen Frost <sfrost@snowman.net>
2015-12-11 20:44 pgsql: Handle dependencies properly in ALTER POLICY Stephen Frost <sfrost@snowman.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox