Re: Fix for REFRESH MATERIALIZED VIEW ownership error message

2018-08-19 Thread Jonathan S. Katz
> On Aug 18, 2018, at 11:59 PM, Alvaro Herrera wrote: > > On 2018-Aug-18, Jonathan S. Katz wrote: > >> >>> On Aug 18, 2018, at 8:52 PM, Jonathan S. Katz wrote: >>> On Aug 18, 2018, at 8:45 PM, Michael Paquier wrote: I am not so sure about v11 as it is very close to rel

Re: Fix for REFRESH MATERIALIZED VIEW ownership error message

2018-08-18 Thread Alvaro Herrera
On 2018-Aug-18, Jonathan S. Katz wrote: > > > On Aug 18, 2018, at 8:52 PM, Jonathan S. Katz wrote: > > > >> > >> On Aug 18, 2018, at 8:45 PM, Michael Paquier wrote: > >> > >> I am not so sure about v11 as it is very close to release, surely we can > >> do something for HEAD as that's cosmeti

Re: Fix for REFRESH MATERIALIZED VIEW ownership error message

2018-08-18 Thread Jonathan S. Katz
On Aug 18, 2018, at 8:52 PM, Jonathan S. Katz wrote:On Aug 18, 2018, at 8:45 PM, Michael Paquier wrote:I am not so sure about v11 as it is very close to release, surely we cando something for HEAD as that's cosmetic.  Anyway, if something isproposed, cou

Re: Fix for REFRESH MATERIALIZED VIEW ownership error message

2018-08-18 Thread Jonathan S. Katz
> On Aug 18, 2018, at 8:45 PM, Michael Paquier wrote: > >> On Sat, Aug 18, 2018 at 03:38:47PM -0700, David G. Johnston wrote: >>> On Saturday, August 18, 2018, Dave Cramer wrote: >>> I was referring to: >>> >>> "Materialized views are a type of relation so it is not wrong, just one >>> of man

Re: Fix for REFRESH MATERIALIZED VIEW ownership error message

2018-08-18 Thread Michael Paquier
On Sat, Aug 18, 2018 at 03:38:47PM -0700, David G. Johnston wrote: > On Saturday, August 18, 2018, Dave Cramer wrote: >> I was referring to: >> >> "Materialized views are a type of relation so it is not wrong, just one >> of many instances where we generalize to "relation" based in implementation

Re: Fix for REFRESH MATERIALIZED VIEW ownership error message

2018-08-18 Thread David G. Johnston
On Saturday, August 18, 2018, Dave Cramer wrote: > > I was referring to: > > "Materialized views are a type of relation so it is not wrong, just one > of many instances where we generalize to "relation" based in implementation > details ins team of being explicit about which type of relation is

Re: Fix for REFRESH MATERIALIZED VIEW ownership error message

2018-08-18 Thread Jonathan S. Katz
> On Aug 17, 2018, at 6:30 PM, Alvaro Herrera wrote: > > On 2018-Aug-17, Jonathan S. Katz wrote: > >> Hi, >> >> I Initially pointed out here[1] that running REFRESH MATERIALIZED VIEW as a >> non-superuser or table owner yields the following message: >> >>test=> REFRESH MATERIALIZED VIEW b

Re: Fix for REFRESH MATERIALIZED VIEW ownership error message

2018-08-18 Thread Dave Cramer
On Sat, 18 Aug 2018 at 17:48, Tom Lane wrote: > Dave Cramer writes: > > This is a simple fix why push back ? > > What was being pushed back on, I think, was the claim that this needed to > be back-patched. I'd be inclined not to, since (a) the message is not > wrong, only less specific than it

Re: Fix for REFRESH MATERIALIZED VIEW ownership error message

2018-08-18 Thread Jonathan S. Katz
> On Aug 18, 2018, at 5:48 PM, Tom Lane wrote: > > Dave Cramer writes: >> This is a simple fix why push back ? > > What was being pushed back on, I think, was the claim that this needed to > be back-patched. I'd be inclined not to, since (a) the message is not > wrong, only less specific than

Re: Fix for REFRESH MATERIALIZED VIEW ownership error message

2018-08-18 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Dave Cramer writes: > > This is a simple fix why push back ? > > What was being pushed back on, I think, was the claim that this needed to > be back-patched. I'd be inclined not to, since (a) the message is not > wrong, only less specific than

Re: Fix for REFRESH MATERIALIZED VIEW ownership error message

2018-08-18 Thread Tom Lane
Dave Cramer writes: > This is a simple fix why push back ? What was being pushed back on, I think, was the claim that this needed to be back-patched. I'd be inclined not to, since (a) the message is not wrong, only less specific than it could be, and (b) people tend to get annoyed by unnecessary

Re: Fix for REFRESH MATERIALIZED VIEW ownership error message

2018-08-18 Thread Dave Cramer
On Sat, 18 Aug 2018 at 17:30, Jonathan S. Katz wrote: > > On Aug 18, 2018, at 5:26 PM, David G. Johnston > wrote: > > On Saturday, August 18, 2018, Jonathan S. Katz > wrote: >> >> It’s cosmetic, but it’s a cosmetic bug: it incorrectly tells the user >> that they >> must be the owner of the “rel

Re: Fix for REFRESH MATERIALIZED VIEW ownership error message

2018-08-18 Thread Jonathan S. Katz
> On Aug 18, 2018, at 5:26 PM, David G. Johnston > wrote: > > On Saturday, August 18, 2018, Jonathan S. Katz > wrote: > It’s cosmetic, but it’s a cosmetic bug: it incorrectly tells the user that > they > must be the owner of the “relational” when in reality it’s t

Re: Fix for REFRESH MATERIALIZED VIEW ownership error message

2018-08-18 Thread David G. Johnston
On Saturday, August 18, 2018, Jonathan S. Katz wrote: > > It’s cosmetic, but it’s a cosmetic bug: it incorrectly tells the user that > they > must be the owner of the “relational” when in reality it’s the > materialized view. > Materialized views are a type of relation so it is not wrong, just on

Re: Fix for REFRESH MATERIALIZED VIEW ownership error message

2018-08-17 Thread Dave Cramer
On Fri, 17 Aug 2018 at 19:35, Alvaro Herrera 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->rel

Re: Fix for REFRESH MATERIALIZED VIEW ownership error message

2018-08-17 Thread Alvaro Herrera
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

Re: Fix for REFRESH MATERIALIZED VIEW ownership error message

2018-08-17 Thread Dave Cramer
Dave Cramer da...@postgresintl.com www.postgresintl.com On Fri, 17 Aug 2018 at 18:30, Alvaro Herrera wrote: > On 2018-Aug-17, Jonathan S. Katz wrote: > > > Hi, > > > > I Initially pointed out here[1] that running REFRESH MATERIALIZED VIEW > as a > > non-superuser or table owner yields the foll

Re: Fix for REFRESH MATERIALIZED VIEW ownership error message

2018-08-17 Thread Alvaro Herrera
On 2018-Aug-17, Jonathan S. Katz wrote: > Hi, > > I Initially pointed out here[1] that running REFRESH MATERIALIZED VIEW as a > non-superuser or table owner yields the following message: > > test=> REFRESH MATERIALIZED VIEW blah; > ERROR: must be owner of relation blah > > The error mes

Fix for REFRESH MATERIALIZED VIEW ownership error message

2018-08-17 Thread Jonathan S. Katz
Hi,I Initially pointed out here[1] that running REFRESH MATERIALIZED VIEW as anon-superuser or table owner yields the following message:    test=> REFRESH MATERIALIZED VIEW blah;    ERROR: must be owner of relation blahThe error message should say "...owner of materialized view..."The attached patc