Will there ever be support for Row Level Security on Materialized Views?

Поиск
Список
Период
Сортировка
От Ken Tanzer
Тема Will there ever be support for Row Level Security on Materialized Views?
Дата
Msg-id CAD3a31XAm0VF0LMH-rOEkqaJmYrzbh2RYCe3c4p9k_rwzsR7pg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Will there ever be support for Row Level Security on Materialized Views?  (Ken Tanzer <ken.tanzer@gmail.com>)
Список pgsql-general
Hi.  My question is similar to one that was asked but apparently never answered a couple of years ago on this list. (https://www.postgresql.org/message-id/20160112023419.GA30965%40moraine.isi.edu)

Basically, I'm wondering whether materialized views are likely to ever support row-level security.

I've been toying with using MVs to address some performance issues, until coming across this issue.

As explanation of the use case, I've got a DB that is shared across multiple sites ("segments").  Each site is a different DB user, and access to data is controlled by a function (has_segment_access).

So for a table, and a view, we use:
CREATE POLICY tbl_client_sites ON tbl_client FOR ALL USING (has_segment_access(agency_segment_code));
CREATE VIEW client AS SELECT * FROM tbl_client WHERE has_segment_access(agency_segment_code);
I'd been thinking I could just materialize some of these views, but then they are frozen data, like a table.  But unlike a table, you can't apply RLS.  Hence the email.  Any insight or development crystal-balling appreciated.  Thanks!

Ken


-- 
AGENCY Software  
A Free Software data system
By and for non-profits
(253) 245-3801

learn more about AGENCY or
follow the discussion.

В списке pgsql-general по дате отправления:

Предыдущее
От: Michal
Дата:
Сообщение: Re: Immutable function WAY slower than Stable function?
Следующее
От: 김세훈
Дата:
Сообщение: using graph model with PostgreSQL