DROP_MATERIALIZED_VIEW(7pg13)
π DROP_MATERIALIZED_VIEW π
okay so bestie, welcome to the DROP_MATERIALIZED_VIEW page from the PostgreSQL 13.23 Documentation β manual DROP_MATERIALIZED_VIEW(7pg13) β and it's literally the guide for yeeting a materialized view. π
β¨
πΈ NAME πΈ
DROP_MATERIALIZED_VIEW β remove a materialized view. no cap, that's the whole vibe. π¦
β¨ SYNOPSIS β¨
DROP MATERIALIZED VIEW [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
π DESCRIPTION π
DROP MATERIALIZED VIEW drops an existing materialized view. π«Ά
ok but listen: to execute this command you must be the owner of the materialized view. fr fr, owner energy only. π
π§ PARAMETERS π§
IF EXISTSβ do not throw an error if the materialized view does not exist. A notice is issued in this case. lowkey polite. πnameβ the name (optionally schema-qualified) of the materialized view to remove. yes, schema-qualified is allowed. π«CASCADEβ automatically drop objects that depend on the materialized view (such as other materialized views, or regular views), and in turn all objects that depend on those objects (see Section 5.14). it's giving domino effect. π₯RESTRICTβ refuse to drop the materialized view if any objects depend on it. This is the default. protective bestie behavior. π‘οΈ
π EXAMPLES π
this command will remove the materialized view called order_summary:
DROP MATERIALIZED VIEW order_summary;
slay, gone. πβ¨
π COMPATIBILITY π
DROP MATERIALIZED VIEW is a PostgreSQL extension. iykyk. π§
π SEE ALSO π
CREATE MATERIALIZED VIEW(CREATE_MATERIALIZED_VIEW(7))ALTER MATERIALIZED VIEW(ALTER_MATERIALIZED_VIEW(7))REFRESH MATERIALIZED VIEW(REFRESH_MATERIALIZED_VIEW(7))
PostgreSQL 13.23 Β· 2025 Β· DROP MATE...IZED VIEW(7) β mwah, that's the page, bestie ππ
π¦ where this page comes from
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms