1DROP TABLESPACE() SQL Commands DROP TABLESPACE()
2
3
4
6 DROP TABLESPACE - remove a tablespace
7
8
10 DROP TABLESPACE [ IF EXISTS ] tablespacename
11
12
14 DROP TABLESPACE removes a tablespace from the system.
15
16 A tablespace can only be dropped by its owner or a superuser. The
17 tablespace must be empty of all database objects before it can be
18 dropped. It is possible that objects in other databases may still
19 reside in the tablespace even if no objects in the current database are
20 using the tablespace.
21
23 IF EXISTS
24 Do not throw an error if the tablespace does not exist. A notice
25 is issued in this case.
26
27 tablespacename
28 The name of a tablespace.
29
31 DROP TABLESPACE cannot be executed inside a transaction block.
32
34 To remove tablespace mystuff from the system:
35
36 DROP TABLESPACE mystuff;
37
38
40 DROP TABLESPACE is a PostgreSQL extension.
41
43 CREATE TABLESPACE [create_tablespace(7)], ALTER TABLESPACE
44 [alter_tablespace(l)]
45
46
47
48SQL - Language Statements 2008-06-08 DROP TABLESPACE()