Find views that have the security invoker option. Such option is possible starting from PostgreSQL 15. In case of using such views one cannot create a system where data is accessed through views and the users (applications) do not have direct access to the base tables.
Type
Problem detection (Each row in the result could represent a flaw in the design)
SELECT
pg_namespace.nspname,
pg_class.relname
FROM
pg_catalog.pg_class,
pg_catalog.pg_namespace
WHERE pg_catalog.pg_class.relnamespace=pg_catalog.pg_namespace.oid
AND 'security_invoker=true'=ANY(pg_catalog.pg_class.reloptions)
ORDER BY nspname, relname;
Collections
This query belongs to the following collections:
Name
Description
Find problems by overview
Queries that results point to different aspects of database that might have problems. A human reviewer has to decide based on the results as to whether there are problems or not .
Categories
This query is classified under the following categories:
Name
Description
Derived tables
Queries of this category provide information about the derived tables (views, materialized views), which are used to implement virtual data layer.
Security
Queries of this category provide information about the security measures.