Managing views
Obtaining view information
You can query system tables
VIEWS
and
VIEW_COLUMNS
to obtain information about existing views—for example, a view's definition and the attributes of columns that comprise that view. You can also query system table
VIEW_TABLES
to examine view-related dependencies—for example, to determine how many views reference a table before you drop it.
Renaming a view
Use
ALTER VIEW
to rename a view.
Dropping a view
Use
DROP VIEW
to drop a view. Only the specified view is dropped. Vertica does not support CASCADE
functionality for views, and does not check for dependencies. Dropping a view causes any view that references it to fail.
Disabling and re-enabling views
If you drop a table that is referenced by a view, Vertica does not drop the view. However, attempts to use that view or access information about it from system table
VIEW_COLUMNS
return an error that the referenced table does not exist. If you restore that table, Vertica also re-enables usage of the view.