]> begriffs open source - ai-pg/blob - full-docs/txt/sql-dropview.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / sql-dropview.txt
1
2 DROP VIEW
3
4    DROP VIEW — remove a view
5
6 Synopsis
7
8 DROP VIEW [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
9
10 Description
11
12    DROP VIEW drops an existing view. To execute this command you must be
13    the owner of the view.
14
15 Parameters
16
17    IF EXISTS
18           Do not throw an error if the view does not exist. A notice is
19           issued in this case.
20
21    name
22           The name (optionally schema-qualified) of the view to remove.
23
24    CASCADE
25           Automatically drop objects that depend on the view (such as
26           other views), and in turn all objects that depend on those
27           objects (see Section 5.15).
28
29    RESTRICT
30           Refuse to drop the view if any objects depend on it. This is the
31           default.
32
33 Examples
34
35    This command will remove the view called kinds:
36 DROP VIEW kinds;
37
38 Compatibility
39
40    This command conforms to the SQL standard, except that the standard
41    only allows one view to be dropped per command, and apart from the IF
42    EXISTS option, which is a PostgreSQL extension.
43
44 See Also
45
46    ALTER VIEW, CREATE VIEW