Lack of information on materialized views in information_schema.table_privileges.

From: Jan Przemysław Wójcik <jan(dot)przemyslaw(dot)wojcik(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Lack of information on materialized views in information_schema.table_privileges.
Date: 2017-11-26 09:03:22
Message-ID: 1511687002490-0.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,
after:

create schema test_schema;
create materialized view test_schema.test_mat_view as select 1;
grant select on test_schema.test_mat_view to public;

information_schema.table_privileges does not show privileges on the view:

select grantee, string_agg(privilege_type, ', ') as privileges
from information_schema.table_privileges
where table_schema = 'test_schema' and table_name = 'test_mat_view'
group by grantee;

grantee | privileges
---------+------------
(0 rows)

Should be:

grantee | privileges
----------+---------------------------------------------------------------
postgres | INSERT, SELECT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER
PUBLIC | SELECT
(2 rows)

Of course, privileges are properly defined in pg_class:

select relname, relnamespace::regnamespace, relacl
from pg_class
where relnamespace = 'test_schema'::regnamespace and relname =
'test_mat_view';

relname | relnamespace | relacl
---------------+--------------+-----------------------------------------
test_mat_view | test_schema | {postgres=arwdDxt/postgres,=r/postgres}
(1 rows)

Related post on stackoverflow.com:
https://stackoverflow.com/questions/38728548/list-grants-and-privileges-for-a-materialized-view-in-postgresql

------
Jan Przemysław Wójcik

--
Sent from: http://www.postgresql-archive.org/PostgreSQL-bugs-f2117394.html

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message radudragusi 2017-11-26 11:59:43 BUG #14926: I cannot start pgAdmin
Previous Message Andreas 'ads' Scherbaum 2017-11-25 18:57:06 Re: BUG #14925: sql error