]> granicus.if.org Git - postgresql/commit
Add support for restrictive RLS policies
authorStephen Frost <sfrost@snowman.net>
Mon, 5 Dec 2016 20:50:55 +0000 (15:50 -0500)
committerStephen Frost <sfrost@snowman.net>
Mon, 5 Dec 2016 20:50:55 +0000 (15:50 -0500)
commit093129c9d9fc231649b3cc27b8086443ccbbbc22
tree5e41352a48f7a33a68687623da2fb48dce9b9174
parent2bbdc6875d03bb826a4fd113eac45a72c68bc929
Add support for restrictive RLS policies

We have had support for restrictive RLS policies since 9.5, but they
were only available through extensions which use the appropriate hooks.
This adds support into the grammer, catalog, psql and pg_dump for
restrictive RLS policies, thus reducing the cases where an extension is
necessary.

In passing, also move away from using "AND"d and "OR"d in comments.
As pointed out by Alvaro, it's not really appropriate to attempt
to make verbs out of "AND" and "OR", so reword those comments which
attempted to.

Reviewed By: Jeevan Chalke, Dean Rasheed
Discussion: https://postgr.es/m/20160901063404.GY4028@tamriel.snowman.net
21 files changed:
doc/src/sgml/catalogs.sgml
doc/src/sgml/ddl.sgml
doc/src/sgml/ref/alter_policy.sgml
doc/src/sgml/ref/create_policy.sgml
src/backend/catalog/system_views.sql
src/backend/commands/policy.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/parser/gram.y
src/backend/rewrite/rowsecurity.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.h
src/bin/pg_dump/t/002_pg_dump.pl
src/bin/psql/describe.c
src/bin/psql/tab-complete.c
src/include/catalog/pg_policy.h
src/include/nodes/parsenodes.h
src/include/rewrite/rowsecurity.h
src/test/regress/expected/rowsecurity.out
src/test/regress/expected/rules.out
src/test/regress/sql/rowsecurity.sql