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