A SQLAlchemy recipe for managing PostgreSQL Materialized views that handles:
- Creating
- Dropping
- Indexing
- Refreshing (including concurrent background refreshes)
Accompanying blog post: http://www.jeffwidman.com/blog/847/using-sqlalchemy-to-create-and-manage-postgresql-materialized-views/
Many thanks to Mike Bayer for his help with this.