Re: Implicit rule created for materialized views - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Implicit rule created for materialized views
Date
Msg-id 28428.1370268870@sss.pgh.pa.us
Whole thread Raw
In response to Re: Implicit rule created for materialized views  (Dave Page <dpage@pgadmin.org>)
List pgsql-hackers
Dave Page <dpage@pgadmin.org> writes:
> On Mon, Jun 3, 2013 at 1:06 PM, Kevin Grittner
> <kevin.grittner@enterprisedb.com> wrote:
>> A materialized view is pretty much like a view, but with the results
>> materialized.

> Yeah, I get that, but what is confusing is that this now seems to be a
> special kind of relation where there is an ON SELECT DO INSTEAD rule
> which isn't actually executed on SELECTs from the view but at some
> arbitrary time in the future.

There is that.  I wondered before if it would be worth the trouble to
invent a distinct pg_rewrite.ev_type value for these things, ie the rule
would be something like "ON REFRESH DO INSTEAD ...".  On balance that
seems like it would force a lot of additional code changes for
questionable benefit, though.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Vacuum, Freeze and Analyze: the big picture
Next
From: Tom Lane
Date:
Subject: Re: erroneous restore into pg_catalog schema