9.3 beta and materialized views

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: 9.3 beta and materialized views
Date: 2013-05-16 17:23:30
Message-ID: kn34lb$ach$1@ger.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I'm currently adding the support for materialized views to my SQL tool, and noticed that when creating a materialized view, a rewrite rule is also created that looks just like a rewrite rule for a "normal" view.

Using pg_get_ruledef() I see that the rule is defined like this:

REATE RULE "_RETURN" AS
ON SELECT TO matview_test DO INSTEAD
SELECT <here comes the select of the mview>

As the materialized view should be a "table" that can be selected from, I wonder what the purpose of the rewrite rule is?

Regards
Thomas

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steven Schlansker 2013-05-16 17:27:12 Re: upsert functionality
Previous Message chiru r 2013-05-16 16:42:20 Re: DELETE or TRUNCATE?