]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Create a pg_shdepend entry for each role in TO clause of policies.
authorJoe Conway <mail@joeconway.com>
Tue, 28 Jul 2015 23:01:56 +0000 (16:01 -0700)
committerJoe Conway <mail@joeconway.com>
Tue, 28 Jul 2015 23:01:56 +0000 (16:01 -0700)
commit992c9d345f6607c5b2cab2787f7cf72fba96673d
tree0880e72a770ccf8c14fdc550322e7b58746a5684
parent28b11bd1069ed35f45125b4057780cc55b9d716a
Create a pg_shdepend entry for each role in TO clause of policies.

CreatePolicy() and AlterPolicy() omit to create a pg_shdepend entry for
each role in the TO clause. Fix this by creating a new shared dependency
type called SHARED_DEPENDENCY_POLICY and assigning it to each role.

Reported by Noah Misch. Patch by me, reviewed by Alvaro Herrera.
Back-patch to 9.5 where RLS was introduced.
doc/src/sgml/catalogs.sgml
src/backend/catalog/pg_shdepend.c
src/backend/commands/policy.c
src/include/catalog/dependency.h
src/test/regress/expected/rowsecurity.out
src/test/regress/sql/rowsecurity.sql