Permission to refresh materialized view

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Permission to refresh materialized view

Johann Spies-2
We did run this query:

GRANT ALL ON ALL TABLES IN SCHEMA X TO USER Y;

But user Y gets the message that he has to be the owner of a materialized view to be able to refresh it.

Is that intended behaviour?  Is there a way to enable the user to refresh materialized views in that schema?

Regards
Johann

--
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)
Reply | Threaded
Open this post in threaded view
|

Re: Permission to refresh materialized view

Adrian Klaver-4
On 3/13/19 6:27 AM, Johann Spies wrote:
> We did run this query:
>
> /GRANT ALL ON ALL TABLES IN SCHEMA X TO USER Y;/
> /
> /
> But user Y gets the message that he has to be the owner of a
> materialized view to be able to refresh it.

What is the exact message?

>
> Is that intended behaviour?  Is there a way to enable the user to
> refresh materialized views in that schema?

What is the definition of the view?

>
> Regards
> Johann
> //
>
> --
> Because experiencing your loyal love is better than life itself,
> my lips will praise you.  (Psalm 63:3)


--
Adrian Klaver
[hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Permission to refresh materialized view

Day, David-2


-----Original Message-----
From: Adrian Klaver [mailto:[hidden email]]
Sent: Wednesday, March 13, 2019 10:24 AM
To: Johann Spies <[hidden email]>; [hidden email]
Subject: Re: Permission to refresh materialized view

On 3/13/19 6:27 AM, Johann Spies wrote:
> We did run this query:
>
> /GRANT ALL ON ALL TABLES IN SCHEMA X TO USER Y;/ / / But user Y gets
> the message that he has to be the owner of a materialized view to be
> able to refresh it.

What is the exact message?

>
> Is that intended behaviour?  Is there a way to enable the user to
> refresh materialized views in that schema?

What is the definition of the view?

>
> Regards
> Johann
> //
>
> --
> Because experiencing your loyal love is better than life itself, my
> lips will praise you.  (Psalm 63:3)


--
Adrian Klaver
[hidden email]

--

Lacking the actual error message however:

Y might lack usage on the containing schema ?
Y might lack privilege on a function or sequence contained in the view ?

Dave Day


Reply | Threaded
Open this post in threaded view
|

Re: Permission to refresh materialized view

Adrian Klaver-4
In reply to this post by Adrian Klaver-4
On 3/17/19 11:52 PM, Johann Spies wrote:
Please reply to list also.
Ccing list.

>
>
> On Wed, 13 Mar 2019 at 16:24, Adrian Klaver <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     On 3/13/19 6:27 AM, Johann Spies wrote:
>     ...
>      > But user Y gets the message that he has to be the owner of a
>      > materialized view to be able to refresh it.
>
>     What is the exact message?
>
>
> [42501] ERROR: must be owner of materialized view xxx_mv
>
> Regards
> Johann
> --
> Because experiencing your loyal love is better than life itself,
> my lips will praise you.  (Psalm 63:3)


--
Adrian Klaver
[hidden email]

Reply | Threaded
Open this post in threaded view
|

SV: Permission to refresh materialized view

Gustavsson Mikael
From documentation:
"REFRESH MATERIALIZED VIEW completely replaces the contents of a materialized view. To execute this command you must be the owner of the materialized view."

So it is intended behavior.

https://www.postgresql.org/docs/11/sql-refreshmaterializedview.html

________________________________________
Från: Adrian Klaver [[hidden email]]
Skickat: den 18 mars 2019 15:51
Till: Johann Spies
Kopia: pgsql-general
Ämne: Re: Permission to refresh materialized view

On 3/17/19 11:52 PM, Johann Spies wrote:
Please reply to list also.
Ccing list.

>
>
> On Wed, 13 Mar 2019 at 16:24, Adrian Klaver <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     On 3/13/19 6:27 AM, Johann Spies wrote:
>     ...
>      > But user Y gets the message that he has to be the owner of a
>      > materialized view to be able to refresh it.
>
>     What is the exact message?
>
>
> [42501] ERROR: must be owner of materialized view xxx_mv
>
> Regards
> Johann
> --
> Because experiencing your loyal love is better than life itself,
> my lips will praise you.  (Psalm 63:3)


--
Adrian Klaver
[hidden email]