The PostgreSQL documentation does a pretty good job of explaining materialized views. Please refer to these resources to learn more:
- CREATE MATERIALIZED VIEW: https://www.postgresql.org/docs/current/static/sql-creatematerializedview.html
- REFRESH MATERIALIZED VIEW: https://www.postgresql.org/docs/current/static/sql-refreshmaterializedview.html
You can also build your own materialized view library. Before PostgreSQL 9.3 incorporated this feature, users commonly applied the techniques described at this URL:
http://tech.jonathangardner.net/wiki/PostgreSQL/Materialized_Views