]> begriffs open source - ai-pg/blob - full-docs/txt/sql-droptablespace.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / sql-droptablespace.txt
1
2 DROP TABLESPACE
3
4    DROP TABLESPACE — remove a tablespace
5
6 Synopsis
7
8 DROP TABLESPACE [ IF EXISTS ] name
9
10 Description
11
12    DROP TABLESPACE removes a tablespace from the system.
13
14    A tablespace can only be dropped by its owner or a superuser. The
15    tablespace must be empty of all database objects before it can be
16    dropped. It is possible that objects in other databases might still
17    reside in the tablespace even if no objects in the current database are
18    using the tablespace. Also, if the tablespace is listed in the
19    temp_tablespaces setting of any active session, the DROP might fail due
20    to temporary files residing in the tablespace.
21
22 Parameters
23
24    IF EXISTS
25           Do not throw an error if the tablespace does not exist. A notice
26           is issued in this case.
27
28    name
29           The name of a tablespace.
30
31 Notes
32
33    DROP TABLESPACE cannot be executed inside a transaction block.
34
35 Examples
36
37    To remove tablespace mystuff from the system:
38 DROP TABLESPACE mystuff;
39
40 Compatibility
41
42    DROP TABLESPACE is a PostgreSQL extension.
43
44 See Also
45
46    CREATE TABLESPACE, ALTER TABLESPACE