| Use Case | Command | Description |
|---|---|---|
| 🗑️ Basic drop | DROP MATERIALIZED VIEW order_summary; | Remove a materialized view |
| ✅ Drop if exists | DROP MATERIALIZED VIEW IF EXISTS order_summary; | Avoid error if the view is missing |
| 🔗 Drop with cascade | DROP MATERIALIZED VIEW order_summary CASCADE; | Also drop dependent objects |
| 📦 Drop multiple views | DROP MATERIALIZED VIEW view1, view2; | Remove several views at once |
| 🛡️ Drop with restrict (default) | DROP MATERIALIZED VIEW order_summary RESTRICT; | Refuse if dependencies exist |
🗑️ DROP MATERIALIZED VIEW — remove a materialized view
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.22-1-g1b0fcb4 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-06 03:27 @216.73.216.52
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-pro / taotoken.net / www.chedong.com - original format