From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tim Clarke <tim.clarke@minerva.info>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: accessing cross-schema materialized views
Date: Wed, 31 Mar 2021 18:42:05 -0400
Message-ID: <3337912.1617230525@sss.pgh.pa.us> (raw)
In-Reply-To: <76fe4f3e-5e91-3199-0f70-5f20ba1e142a@minerva.info>
References: <76fe4f3e-5e91-3199-0f70-5f20ba1e142a@minerva.info>
Tim Clarke <tim.clarke@minerva.info> writes:
> We have:
> create materialized view schema1.matview.....
> grant select on table schema1.matview to mygroup
> create view schema2.usingview as select ... from schema1.matview
> grant select on table schema2.using to mygroup
> and yet we receive "permission denied for materialized view" on a user with the mygroup role selecting from schema2.usingview?
The owner of the schema2.usingview is the one who must have
privilege to read the underlying schema1.matview. Our
permissions messages are, I fear, frequently not very good
about saying whose privileges were checked.
regards, tom lane
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-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, tim.clarke@minerva.info
Subject: Re: accessing cross-schema materialized views
In-Reply-To: <3337912.1617230525@sss.pgh.pa.us>
References: <76fe4f3e-5e91-3199-0f70-5f20ba1e142a@minerva.info> <3337912.1617230525@sss.pgh.pa.us>
* 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