From: Jan Przemysław Wójcik <jan.przemyslaw.wojcik@gmail.com>
To: pgsql-bugs@postgresql.org
Subject: Lack of information on materialized views in information_schema.table_privileges.
Date: Sun, 26 Nov 2017 02:03:22 -0700 (MST)
Message-ID: <1511687002490-0.post@n3.nabble.com> (raw)
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-p...
------
Jan Przemysław Wójcik
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-bugs-f2117394.html
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: jan.przemyslaw.wojcik@gmail.com
Subject: Re: Lack of information on materialized views in information_schema.table_privileges.
In-Reply-To: <1511687002490-0.post@n3.nabble.com>
References: <1511687002490-0.post@n3.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox