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



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to