> On http://github.com/pbaros/postgres can be seen changes and my attempt
> to implement materialized views. The first commit to the repository
> implements following:
>
> Materialized view can be created, dropped and used in SELECT statement.
>
> CREATE MATERIALIZED VIEW mvname AS SELECT ...;
> DROP MATERIALIZED VIEW mvname [CASCADE];
> SELECT * FROM mvname;
>
> also works:
> COMMENT ON MATERIALIZED VIEW mvname IS 'etc.';
> SELECT pg_get_viewdef(mvname);
... also you can look at enclosed patch.