1DROP MATERIALIZED VIEW(7)PostgreSQL 14.3 DocumentationDROP MATERIALIZED VIEW(7)
2
3
4
6 DROP_MATERIALIZED_VIEW - remove a materialized view
7
9 DROP MATERIALIZED VIEW [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
10
12 DROP MATERIALIZED VIEW drops an existing materialized view. To execute
13 this command you must be the owner of the materialized view.
14
16 IF EXISTS
17 Do not throw an error if the materialized view does not exist. A
18 notice is issued in this case.
19
20 name
21 The name (optionally schema-qualified) of the materialized view to
22 remove.
23
24 CASCADE
25 Automatically drop objects that depend on the materialized view
26 (such as other materialized views, or regular views), and in turn
27 all objects that depend on those objects (see Section 5.14).
28
29 RESTRICT
30 Refuse to drop the materialized view if any objects depend on it.
31 This is the default.
32
34 This command will remove the materialized view called order_summary:
35
36 DROP MATERIALIZED VIEW order_summary;
37
39 DROP MATERIALIZED VIEW is a PostgreSQL extension.
40
42 CREATE MATERIALIZED VIEW (CREATE_MATERIALIZED_VIEW(7)), ALTER
43 MATERIALIZED VIEW (ALTER_MATERIALIZED_VIEW(7)), REFRESH MATERIALIZED
44 VIEW (REFRESH_MATERIALIZED_VIEW(7))
45
46
47
48PostgreSQL 14.3 2022 DROP MATERIALIZED VIEW(7)