postgresql/src/test/modules/test_rls_hooks
Bruce Momjian 29275b1d17 Update copyright for 2024
Reported-by: Michael Paquier

Discussion: https://postgr.es/m/ZZKTDPxBBMt3C0J9@paquier.xyz

Backpatch-through: 12
2024-01-03 20:49:05 -05:00
..
expected Improve RLS planning by marking individual quals with security levels. 2017-01-18 12:58:20 -05:00
sql Establish conventions about global object names used in regression tests. 2016-07-17 18:42:43 -04:00
.gitignore RLS fixes, new hooks, and new test module 2015-04-22 12:01:06 -04:00
Makefile Clean test_rls_hooks module 2022-03-23 15:11:45 -04:00
README Fix inconsistencies and typos in the tree, take 11 2019-08-19 16:21:39 +09:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
test_rls_hooks.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
test_rls_hooks.h Update copyright for 2024 2024-01-03 20:49:05 -05:00

README

test_rls_hooks is an example of how to use the hooks provided for RLS to
define additional policies to be used.

Functions
=========
test_rls_hooks_permissive(CmdType cmdtype, Relation relation)
    RETURNS List*

Returns a list of policies which should be added to any existing
policies on the relation, combined with OR.

test_rls_hooks_restrictive(CmdType cmdtype, Relation relation)
    RETURNS List*

Returns a list of policies which should be added to any existing
policies on the relation, combined with AND.