ALTER MATERIALIZED VIEW¶
Warning
Materialized views are experimental. The SPI and behavior may change in future releases.
To enable, set experimental.legacy-materialized-views = false
in configuration properties. ALTER MATERIALIZED VIEW ... SET PROPERTIES is not supported
when legacy_materialized_views=true.
Synopsis¶
ALTER MATERIALIZED VIEW [ IF EXISTS ] name SET PROPERTIES (property_name = value [, ...])
Description¶
Change properties on an existing materialized view. The set of properties that can be changed is connector-specific; some properties (typically those that determine the physical identity of the storage) are fixed at creation time. See Connectors for the authoritative list of updatable properties.
The optional IF EXISTS clause causes the error to be suppressed if the materialized view
does not exist.
Setting a property to NULL is not supported. To change a property, the new value must be
non-null. Properties not mentioned in the SET PROPERTIES clause are left unchanged.
Examples¶
Change a property on a materialized view:
ALTER MATERIALIZED VIEW users SET PROPERTIES (x = 'y');
Use IF EXISTS to suppress an error when the view may not exist:
ALTER MATERIALIZED VIEW IF EXISTS users SET PROPERTIES (x = 'y');
For connector-specific examples, see Connectors.
See Also¶
CREATE MATERIALIZED VIEW, DROP MATERIALIZED VIEW, REFRESH MATERIALIZED VIEW, SHOW CREATE MATERIALIZED VIEW, Materialized Views