Make BYPASSRLS behave like superuser RLS bypass.
authorNoah Misch <noah@leadboat.com>
Sun, 4 Oct 2015 00:19:57 +0000 (20:19 -0400)
committerNoah Misch <noah@leadboat.com>
Sun, 4 Oct 2015 00:19:57 +0000 (20:19 -0400)
commit3cb0a7e75aaa9a7826c769068970ce2200e61023
tree3aa82c69eed4d228694e2708278da04ce7ed3eb4
parent23fc0b485d6dfa49ff20fff6c5661be4b12a5bff
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