Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIsqc-0000D0-P3 for pgsql-bugs@arkaria.postgresql.org; Sun, 26 Nov 2017 09:03:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIsqa-0004nB-VJ for pgsql-bugs@arkaria.postgresql.org; Sun, 26 Nov 2017 09:03:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eIsqa-0004mx-QD for pgsql-bugs@lists.postgresql.org; Sun, 26 Nov 2017 09:03:32 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eIsqS-0000LH-In for pgsql-bugs@postgresql.org; Sun, 26 Nov 2017 09:03:31 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 833279A907B3 for ; Sun, 26 Nov 2017 02:03:22 -0700 (MST) Date: Sun, 26 Nov 2017 02:03:22 -0700 (MST) From: =?UTF-8?Q?Jan_Przemys=C5=82aw_W=C3=B3jcik?= To: pgsql-bugs@postgresql.org Message-ID: <1511687002490-0.post@n3.nabble.com> Subject: Lack of information on materialized views in information_schema.table_privileges. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi,=20 after: =09 =09create schema test_schema; =09create materialized view test_schema.test_mat_view as select 1; =09grant select on test_schema.test_mat_view to public; information_schema.table_privileges does not show privileges on the view: =09 =09select grantee, string_agg(privilege_type, ', ') as privileges =09from information_schema.table_privileges =09where table_schema =3D 'test_schema' and table_name =3D 'test_mat_view' =09group by grantee; =09 grantee | privileges=20 =09---------+------------ =09(0 rows) Should be: =09 grantee | privileges = =20 =09----------+-------------------------------------------------------------= -- =09 postgres | INSERT, SELECT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGE= R =09 PUBLIC | SELECT =09(2 rows) =09 Of course, privileges are properly defined in pg_class:=09 =09 =09select relname, relnamespace::regnamespace, relacl =09from pg_class =09where relnamespace =3D 'test_schema'::regnamespace and relname =3D 'test_mat_view'; =09=09relname | relnamespace | relacl = =20 =09---------------+--------------+----------------------------------------- =09 test_mat_view | test_schema | {postgres=3DarwdDxt/postgres,=3Dr/postgr= es} =09(1 rows) Related post on stackoverflow.com: https://stackoverflow.com/questions/38728548/list-grants-and-privileges-for= -a-materialized-view-in-postgresql ------ Jan Przemys=C5=82aw W=C3=B3jcik -- Sent from: http://www.postgresql-archive.org/PostgreSQL-bugs-f2117394.html