DROP_MATERIALIZED_VIEW - remove a materialized view
| Use Case | Command | Description |
|---|---|---|
| Drop a materialized view | DROP MATERIALIZED VIEW order_summary; | Remove the materialized view |
| Drop if exists (avoid error) | DROP MATERIALIZED VIEW IF EXISTS order_summary; | No error if view missing, just notice |
| Drop with cascading dependencies | DROP MATERIALIZED VIEW order_summary CASCADE; | Drop view and all dependent objects |
| Drop multiple views at once | DROP MATERIALIZED VIEW view1, view2, view3; | Remove several views in one command |
DROP MATERIALIZED VIEW [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
DROP MATERIALIZED VIEW drops an existing materialized view. To execute this command you must be the owner of the materialized view.
This command will remove the materialized view called order_summary:
DROP MATERIALIZED VIEW order_summary;
DROP MATERIALIZED VIEW is a PostgreSQL extension.
CREATE MATERIALIZED VIEW (CREATE_MATERIALIZED_VIEW(7)), ALTER MATERIALIZED VIEW (ALTER_MATERIALIZED_VIEW(7)), REFRESH MATERIALIZED VIEW (REFRESH_MATERIALIZED_VIEW(7))
Generated by phpman v4.9.26-5-g7740029 Author: Che Dong Under GNU General Public License
2026-08-23 23:09 @216.73.216.102
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)