Skip to content

Supplementary Release Information#

Improve Query Performance in PostgreSQL connector#

Note

The following instructions apply to only existing users who have configured the PostgresSQL connector in their environment.

If you are facing issues in the query performance of your PostgreSQL connector when the row-level filter is applied on a view, replace the existing function privacera_security.CURRENT_AVAILABLE_ROLES() in the privacera_security schema of your database with the following function:

create or replace function privacera_security.CURRENT_AVAILABLE_ROLES() returns text[] as $$ WITH RECURSIVE cte AS( SELECT pg_roles.oid, pg_roles.rolname FROM pg_roles WHERE pg_roles.rolname = CURRENT_USER UNION ALL SELECT m.roleid, pgr.rolname FROM cte cte_1 JOIN pg_auth_members m ON m.member = cte_1.oid JOIN pg_roles pgr ON pgr.oid = m.roleid) SELECT array_agg(cte.rolname::text) AS my_roles FROM cte; $$ language sql STABLE;

Last update: October 8, 2021