Make BYPASSRLS behave like superuser RLS bypass.
authorNoah Misch
Sun, 4 Oct 2015 00:19:57 +0000 (20:19 -0400)
committerNoah Misch
Sun, 4 Oct 2015 00:20:50 +0000 (20:20 -0400)
commit01ba7894f3f72ea57d1cfdc4f40f6231bc6cd9cd
tree8153ebad55cc49f2cb534ec4be5c2e8f96d3071c
parentcfddb5df5a84923160b23890d6086bcbcd1fd655
Make BYPASSRLS behave like superuser RLS bypass.

Specifically, make its effect independent from the row_security GUC, and
make it affect permission checks pertinent to views the BYPASSRLS role
owns.  The row_security GUC thereby ceases to change successful-query
behavior; it can only make a query fail with an error.  Back-patch to
9.5, where BYPASSRLS was introduced.
doc/src/sgml/catalogs.sgml
doc/src/sgml/config.sgml
doc/src/sgml/ddl.sgml
doc/src/sgml/ref/create_role.sgml
src/backend/utils/misc/rls.c
src/include/catalog/pg_authid.h
src/test/regress/expected/rowsecurity.out
src/test/regress/sql/rowsecurity.sql