2 ALTER MATERIALIZED VIEW
4 ALTER MATERIALIZED VIEW — change the definition of a materialized view
8 ALTER MATERIALIZED VIEW [ IF EXISTS ] name
10 ALTER MATERIALIZED VIEW name
11 [ NO ] DEPENDS ON EXTENSION extension_name
12 ALTER MATERIALIZED VIEW [ IF EXISTS ] name
13 RENAME [ COLUMN ] column_name TO new_column_name
14 ALTER MATERIALIZED VIEW [ IF EXISTS ] name
16 ALTER MATERIALIZED VIEW [ IF EXISTS ] name
18 ALTER MATERIALIZED VIEW ALL IN TABLESPACE name [ OWNED BY role_name [, ... ] ]
19 SET TABLESPACE new_tablespace [ NOWAIT ]
21 where action is one of:
23 ALTER [ COLUMN ] column_name SET STATISTICS integer
24 ALTER [ COLUMN ] column_name SET ( attribute_option = value [, ... ] )
25 ALTER [ COLUMN ] column_name RESET ( attribute_option [, ... ] )
26 ALTER [ COLUMN ] column_name SET STORAGE { PLAIN | EXTERNAL | EXTENDED | MAI
28 ALTER [ COLUMN ] column_name SET COMPRESSION compression_method
31 SET ACCESS METHOD new_access_method
32 SET TABLESPACE new_tablespace
33 SET ( storage_parameter [= value] [, ... ] )
34 RESET ( storage_parameter [, ... ] )
35 OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
39 ALTER MATERIALIZED VIEW changes various auxiliary properties of an
40 existing materialized view.
42 You must own the materialized view to use ALTER MATERIALIZED VIEW. To
43 change a materialized view's schema, you must also have CREATE
44 privilege on the new schema. To alter the owner, you must be able to
45 SET ROLE to the new owning role, and that role must have CREATE
46 privilege on the materialized view's schema. (These restrictions
47 enforce that altering the owner doesn't do anything you couldn't do by
48 dropping and recreating the materialized view. However, a superuser can
49 alter ownership of any view anyway.)
51 The statement subforms and actions available for ALTER MATERIALIZED
52 VIEW are a subset of those available for ALTER TABLE, and have the same
53 meaning when used for materialized views. See the descriptions for
54 ALTER TABLE for details.
59 The name (optionally schema-qualified) of an existing
63 Name of an existing column.
66 The name of the extension that the materialized view is to
67 depend on (or no longer dependent on, if NO is specified). A
68 materialized view that's marked as dependent on an extension is
69 automatically dropped when the extension is dropped.
72 New name for an existing column.
75 The user name of the new owner of the materialized view.
78 The new name for the materialized view.
81 The new schema for the materialized view.
85 To rename the materialized view foo to bar:
86 ALTER MATERIALIZED VIEW foo RENAME TO bar;
90 ALTER MATERIALIZED VIEW is a PostgreSQL extension.
94 CREATE MATERIALIZED VIEW, DROP MATERIALIZED VIEW, REFRESH MATERIALIZED