ALTER MATERIALIZED VIEW [ IF EXISTS ] name
action [, ... ]
ALTER MATERIALIZED VIEW [ IF EXISTS ] name
RENAME [ COLUMN ] column_name TO new_column_name
ALTER MATERIALIZED VIEW [ IF EXISTS ] name
RENAME TO new_name
ALTER MATERIALIZED VIEW [ IF EXISTS ] name
SET SCHEMA new_schema
ALTER MATERIALIZED VIEW ALL IN TABLESPACE name [ OWNED BY role_name [, ... ] ]
SET TABLESPACE new_tablespace [ NOWAIT ]
where action is one of:
ALTER [ COLUMN ] column_name SET STATISTICS integer
ALTER [ COLUMN ] column_name SET ( attribute_option = value [, ... ] )
ALTER [ COLUMN ] column_name RESET ( attribute_option [, ... ] )
ALTER [ COLUMN ] column_name SET STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN }
CLUSTER ON index_name
SET WITHOUT CLUSTER
SET ( storage_parameter = value [, ... ] )
RESET ( storage_parameter [, ... ] )
OWNER TO new_owner
SET TABLESPACE new_tablespace
ALTER MATERIALIZED VIEW改变一个现有物化视图的各种辅助属性。
要使用ALTER MATERIALIZED VIEW,你必须拥有该物化视图。要改变一个物化视图的模式, 也必须有在新模式上的CREATE权限。要修改所有者,你必须是新所有角色的直接或间接成员, 并且该角色必须在该物化视图的模式上拥有CREATE权限。 (通过删除然后重建物化视图,这些限制强制修改所有者不做任何你不能做的事情。不过, 一个超级用户可以修改任意视图的所有权。)
ALTER MATERIALIZED VIEW可用的语句的从属形式和动作是 ALTER TABLE可用的一个子集,当用于物化视图时有相同的含义。 参阅ALTER TABLE的描述获取细节。