Re: Materialized views WIP patch

Lists: pgsql-hackers
From: "Kevin Grittner" <kgrittn(at)mail(dot)com>
To: "Robert Haas" <robertmhaas(at)gmail(dot)com>,"Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
Cc: "David Johnston" <polobo(at)yahoo(dot)com>,"Dimitri Fontaine" <dimitri(at)2ndquadrant(dot)fr>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>, "Pgsql Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Materialized views WIP patch
Date: 2012-11-28 20:25:46
Message-ID: 20121128202546.69290@gmx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Robert Haas wrote:

> I don't particularly like syntaxes involving DO or LOAD because
> those words already have strong associations with completely
> unrelated features. Now, if we don't want to do that and we don't
> want to use ALTER for a data-modifying command either, another
> option would be to invent a new toplevel command:
>
> REFRESH <view_name>;
>
> Of course, that does introduce another keyword, but the penalty
> for a new unreserved keyword is pretty small.

Of the alternatives to LOAD MATERIALIZED VIEW, something involving
REFRESH seems the best to me. The question is whether REFRESH
MATERIALIZED VIEW (or just REFRESH) is more clear, and whether it
is so by enough to merit another keyword. Of course, there is a
chance that we may wind up needing that keyword for declaring
incremental updates anyway, so it might be a matter of *when* we do
it rather than *whether* we do it -- depending on the yet-to-be-
determined syntax for specifying incremental updates.

My personal preference is still for LOAD MATERIALIZED VIEW because
it implies a complete regeneration rather than something more
incremental, but I realize that is subjective.

-Kevin


From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Kevin Grittner <kgrittn(at)mail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, David Johnston <polobo(at)yahoo(dot)com>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Materialized views WIP patch
Date: 2012-11-29 05:38:03
Message-ID: CAFj8pRAMgrh7c+UJKmvL0shJMMEOKXby4G+Bo14D9XwQ37p+2g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

2012/11/28 Kevin Grittner <kgrittn(at)mail(dot)com>:
> Robert Haas wrote:
>
>> I don't particularly like syntaxes involving DO or LOAD because
>> those words already have strong associations with completely
>> unrelated features. Now, if we don't want to do that and we don't
>> want to use ALTER for a data-modifying command either, another
>> option would be to invent a new toplevel command:
>>
>> REFRESH <view_name>;
>>
>> Of course, that does introduce another keyword, but the penalty
>> for a new unreserved keyword is pretty small.
>
> Of the alternatives to LOAD MATERIALIZED VIEW, something involving
> REFRESH seems the best to me. The question is whether REFRESH
> MATERIALIZED VIEW (or just REFRESH) is more clear, and whether it
> is so by enough to merit another keyword. Of course, there is a
> chance that we may wind up needing that keyword for declaring
> incremental updates anyway, so it might be a matter of *when* we do
> it rather than *whether* we do it -- depending on the yet-to-be-
> determined syntax for specifying incremental updates.
>
> My personal preference is still for LOAD MATERIALIZED VIEW because
> it implies a complete regeneration rather than something more
> incremental, but I realize that is subjective.

In this context I prefer REFRESH keyword - I have a LOAD associated
with BULKLOAD, a this is different

Regards

Pavel

>
> -Kevin