 SELECT 
    'CREATE OR REPLACE MATERIALIZED VIEW ' || schemaname || '.' || viewname || ' AS ' || definition
FROM pg_views 
    WHERE schemaname != 'pg_catalog'  
    and schemaname != 'information_schema'
;
