Re: Implicit rule created for materialized views

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Kevin Grittner <kevin(dot)grittner(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Implicit rule created for materialized views
Date: 2013-06-03 14:14:30
Message-ID: 28428.1370268870@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dave Page <dpage(at)pgadmin(dot)org> writes:
> On Mon, Jun 3, 2013 at 1:06 PM, Kevin Grittner
> <kevin(dot)grittner(at)enterprisedb(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-06-03 14:18:57 Re: erroneous restore into pg_catalog schema
Previous Message Andres Freund 2013-06-03 13:42:48 Re: Vacuum, Freeze and Analyze: the big picture