1DROP TABLESPACE(7)               SQL Commands               DROP TABLESPACE(7)
2
3
4

NAME

6       DROP TABLESPACE - remove a tablespace
7
8

SYNOPSIS

10       DROP TABLESPACE [ IF EXISTS ] tablespacename
11
12

DESCRIPTION

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 might still
19       reside in the tablespace even if no objects in the current database are
20       using  the  tablespace.  Also,  if  the  tablespace  is  listed  in the
21       temp_tablespaces setting of any active session, the DROP might fail due
22       to temporary files residing in the tablespace.
23

PARAMETERS

25       IF EXISTS
26              Do not throw an error if the tablespace does not exist. A notice
27              is issued in this case.
28
29       tablespacename
30              The name of a tablespace.
31

NOTES

33       DROP TABLESPACE cannot be executed inside a transaction block.
34

EXAMPLES

36       To remove tablespace mystuff from the system:
37
38       DROP TABLESPACE mystuff;
39
40

COMPATIBILITY

42       DROP TABLESPACE is a PostgreSQL extension.
43

SEE ALSO

45       CREATE    TABLESPACE    [create_tablespace(7)],    ALTER     TABLESPACE
46       [alter_tablespace(7)]
47
48
49
50SQL - Language Statements         2011-09-22                DROP TABLESPACE(7)
Impressum