Skip to main content
Since 1.3.0 You use the ALTER MATERIALIZED VIEW statement to modify some of the WITH clause options for a continuous aggregate view. You can only set the continuous and create_group_indexes options when you create a continuous aggregate. ALTER MATERIALIZED VIEW also supports the following Postgres clauses on the continuous aggregate view:
  • RENAME TO: rename the continuous aggregate view
  • RENAME [COLUMN]: rename the continuous aggregate column
  • SET SCHEMA: set the new schema for the continuous aggregate view
  • SET TABLESPACE: move the materialization of the continuous aggregate view to the new tablespace
  • OWNER TO: set a new owner for the continuous aggregate view

Samples

  • Enable real-time aggregates for a continuous aggregate:
  • Enable hypercore for a continuous aggregate: Since 2.18.0
  • Rename a column for a continuous aggregate:

Arguments

The syntax is:

Returns

For standard ALTER MATERIALIZED VIEW return behavior, see the PostgreSQL ALTER MATERIALIZED VIEW documentation.