-
- Downloads
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.
Showing
- doc/src/sgml/catalogs.sgml 10 additions, 0 deletionsdoc/src/sgml/catalogs.sgml
- src/backend/catalog/pg_shdepend.c 2 additions, 0 deletionssrc/backend/catalog/pg_shdepend.c
- src/backend/commands/policy.c 61 additions, 26 deletionssrc/backend/commands/policy.c
- src/include/catalog/dependency.h 5 additions, 0 deletionssrc/include/catalog/dependency.h
- src/test/regress/expected/rowsecurity.out 55 additions, 0 deletionssrc/test/regress/expected/rowsecurity.out
- src/test/regress/sql/rowsecurity.sql 44 additions, 0 deletionssrc/test/regress/sql/rowsecurity.sql
Loading
Please register or sign in to comment