Re: docs: note ownership requirement for refreshing materialized views

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: "Jonathan S(dot) Katz" <jonathan(dot)katz(at)excoventures(dot)com>
Cc: Dian Fay <dian(dot)m(dot)fay(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: docs: note ownership requirement for refreshing materialized views
Date: 2018-08-16 01:15:34
Message-ID: 20180816011534.GK3681@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 15, 2018 at 09:06:34PM -0400, Jonathan S. Katz wrote:
> I played around with this feature a bit and did see this was the case.
> Also while playing around I noticed the error message was as such:
>
> test=> REFRESH MATERIALIZED VIEW blah;
> ERROR: must be owner of relation blah
>
> But it’s not a relation, it’s a materialized view. I attached a patch
> that I think should fix this. Kudos to Dave Cramer who was
> sitting next to me helping me to locate files and confirm assumptions.

A relation may be a materialized view, no? The ACL check happens in
RangeVarCallbackOwnsTable by the way (look at ExecRefreshMatView in
matview.c).
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shinoda, Noriyoshi (PN Japan GCS Delivery) 2018-08-16 01:18:21 Update comment in errcodes.txt correctly
Previous Message Jonathan S. Katz 2018-08-16 01:06:34 Re: docs: note ownership requirement for refreshing materialized views