Re: Fix for REFRESH MATERIALIZED VIEW ownership error message - Mailing list pgsql-hackers

From Dave Cramer
Subject Re: Fix for REFRESH MATERIALIZED VIEW ownership error message
Date
Msg-id CADK3HHKY=4Z-B6j0LtG9N2a7OCzrJ=ic6OZxYQASwkvcm7CDfQ@mail.gmail.com
Whole thread Raw
In response to Re: Fix for REFRESH MATERIALIZED VIEW ownership error message  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers

On Fri, 17 Aug 2018 at 19:35, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
On 2018-Aug-17, Dave Cramer wrote:

> The only place this is used is in aclcheck_error
> case OBJECT_MATVIEW:
> msg = gettext_noop("permission denied for materialized view %s");
> break;

Yes, but do we pass RefreshMatViewStmt->relkind to that routine?  I
don't see that we do.  Maybe I misread the code.

Actually the code path that gets executed is:

case OBJECT_MATVIEW:
msg = gettext_noop("must be owner of materialized view %s");
break; 

as I have the patch applied and now see:

\c - test
You are now connected to database "test" as user "test".
test=> refresh materialized view b;
ERROR:  must be owner of materialized view b


Dave Cramer

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Fix for REFRESH MATERIALIZED VIEW ownership error message
Next
From: Tom Lane
Date:
Subject: Re: Getting NOT NULL constraint from pg_attribute