Other Resources
Postgres as a Service
Deploy a Managed Postgres Cluster in Minutes! Enterprise-ready and Oracle compatible.
![]() |
![]() |
![]() |
3.3.36 CREATE VIEWCREATE VIEW -- define a new viewAS queryCREATE VIEW defines a view of a query. The view is not physically materialized. Instead, the query is run every time the view is referenced in a query.CREATE OR REPLACE VIEW is similar, but if a view of the same name already exists, it is replaced.If a schema name is given (for example, CREATE VIEW myschema.myview ...) then the view is created in the specified schema. Otherwise it is created in the current schema. The view name must be distinct from the name of any other view, table, sequence, or index in the same schema.A query (that is, a SELECT statement) which will provide the columns and rows of the view.Refer to SELECT for more information about valid queries.Currently, views are read only - the system will not allow an insert, update, or delete on a view. You can get the effect of an updatable view by creating rules that rewrite inserts, etc. on the view into appropriate actions on other tables. See the CREATE RULE command in the Advanced Server documentation set.
![]() |
![]() |
![]() |