drop_view(7l)

drop_view7l

Remove a view

Usage

DROP VIEW name [, ...]

Inputs

name

The name of an existing view.

Outputs

DROP

The message returned if the command is successful.

ERROR: view name does not exist

This message occurs if the specified view does not exist in the database.

Overview

DROP VIEW drops an existing view from the database. To execute this command you must be the owner of the view.

Notes

Refer to CREATE VIEW for information on how to create views.

Usage

This command will remove the view called kinds:

DROP VIEW kinds;

Compatibility

SQL92

SQL92 specifies some additional capabilities for DROP VIEW:

DROP VIEW view { RESTRICT | CASCADE }

Inputs

RESTRICT

Ensures that only a view with no dependent views or integrity constraints can be destroyed.

CASCADE

Any referencing views and integrity constraints will be dropped as well.

Notes

At present, to remove a referenced view from a PostgreSQL database, you must drop it explicitly.

Releases

4 releases since Debian 2.0 (Hamm); the text changed 2 times.

  1. 2.0–2.1
  2. 2.2
  3. 3.0

From postgresql-client 7.2.1-2woody8 in Debian 3.0 (Woody). Parsed by carta from the page's man source.