3 PostgreSQL documentation
6 <refentry id=
"SQL-ALTERTABLESPACE">
8 <refentrytitle id=
"SQL-ALTERTABLESPACE-TITLE">ALTER TABLESPACE
</refentrytitle>
9 <manvolnum>7</manvolnum>
10 <refmiscinfo>SQL - Language Statements
</refmiscinfo>
14 <refname>ALTER TABLESPACE
</refname>
15 <refpurpose>change the definition of a tablespace
</refpurpose>
18 <indexterm zone=
"sql-altertablespace">
19 <primary>ALTER TABLESPACE
</primary>
24 ALTER TABLESPACE
<replaceable>name
</replaceable> RENAME TO
<replaceable>newname
</replaceable>
25 ALTER TABLESPACE
<replaceable>name
</replaceable> OWNER TO
<replaceable>newowner
</replaceable>
30 <title>Description
</title>
33 <command>ALTER TABLESPACE
</command> changes the definition of
38 You must own the tablespace to use
<command>ALTER TABLESPACE<
/>.
39 To alter the owner, you must also be a direct or indirect member of the new
41 (Note that superusers have these privileges automatically.)
46 <title>Parameters
</title>
50 <term><replaceable class=
"parameter">name
</replaceable></term>
53 The name of an existing tablespace.
59 <term><replaceable class=
"parameter">newname
</replaceable></term>
62 The new name of the tablespace. The new name cannot
63 begin with
<literal>pg_
</literal>, as such names
64 are reserved for system tablespaces.
70 <term><replaceable class=
"parameter">newowner
</replaceable></term>
73 The new owner of the tablespace.
81 <title>Examples
</title>
84 Rename tablespace
<literal>index_space
</literal> to
<literal>fast_raid
</literal>:
86 ALTER TABLESPACE index_space RENAME TO fast_raid;
91 Change the owner of tablespace
<literal>index_space
</literal>:
93 ALTER TABLESPACE index_space OWNER TO mary;
99 <title>Compatibility
</title>
102 There is no
<command>ALTER TABLESPACE
</command> statement in
108 <title>See Also
</title>
110 <simplelist type=
"inline">
111 <member><xref linkend=
"sql-createtablespace" endterm=
"sql-createtablespace-title"></member>
112 <member><xref linkend=
"sql-droptablespace" endterm=
"sql-droptablespace-title"></member>